Skip to content

Instantly share code, notes, and snippets.

Avatar

Ralf Wondratschek vRallev

View GitHub Profile
View Setup Java Agent
/*
* Adds a Java agent that sets a defaultUncaughtExceptionHandler for all jvm test modules,
* to ensure that exceptions thrown in Rx subscriptions (and coroutines?) aren't lost.
*
* Usually, one would do this with a JUnit RunListener, but Gradle doesn't support JUnit
* RunListeners, see https://github.com/gradle/gradle/issues/1330
*
* This workaround adds a test dependency for all modules to the module containing the uncaught
* exception handler. This module contains a Java agent, which is called before JUnit runs. To
* setup the agent we compile the jar and add the filepath as JVM argument.
View Kotlin.kt
@Dao
interface NoteDao {
@Insert(onConflict = OnConflictStrategy.ABORT)
fun insert(note: Note): Long
@Update(onConflict = OnConflictStrategy.ABORT)
fun update(note: Note): Int
@Query("SELECT * FROM notes")
fun observeAllNotes(): Flowable<Note>
View VerifyError XmlUtils
Android: 4.2.1
Manufacturer: HUAWEI
Model: HUAWEI G700-U10
Date: Sun Feb 28 17:28:24 CET 2016
java.lang.VerifyError: com/evernote/android/job/a/a/c
at com.evernote.android.job.util.support.PersistableBundleCompat.saveToXml(PersistableBundleCompat.java:237)
at com.evernote.android.job.JobRequest$Builder.fillContentValues(JobRequest.java:464)
at com.evernote.android.job.JobRequest$Builder.access$000(JobRequest.java:338)
access$1202
View SecurityException interact across users
Android: 5.0
Manufacturer: Alco
Model: RCT6303W87DK
Date: Fri Jan 15 07:47:08 CST 2016
java.lang.SecurityException: get application info: Neither user 1010096 nor current process has android.permission.INTERACT_ACROSS_USERS.
at android.os.Parcel.readException(Parcel.java:1540)
at android.os.Parcel.readException(Parcel.java:1493)
at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:214)
at android.app.AlarmManager.setImpl(AlarmManager.java:414)
View AlarmManager null crash
Android: 5.1.1 (rooted)
Manufacturer: samsung
Model: GT-N7000
Date: Fri Jan 15 11:31:59 GMT+02:00 2016
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.AlarmManager.cancel(android.app.PendingIntent)' on a null object reference
at com.evernote.android.job.v14.JobProxy14.cancel(JobProxy14.java:75)
at com.evernote.android.job.JobManager.cancelInner(JobManager.java:304)
at com.evernote.android.job.JobManager.cancel(JobManager.java:279)
at com.evernote.android.job.JobRequest.cancelAndEdit(JobRequest.java:269)
View Enum crash
Android: 5.0.2
Manufacturer: samsung
Model: SM-T535
Date: Thu Nov 12 23:17:44 GMT+01:00 2015
java.lang.AssertionError: impossible
at java.lang.Enum$1.create(Enum.java:45)
at java.lang.Enum$1.create(Enum.java:35)
at libcore.util.BasicLruCache.get(BasicLruCache.java:54)
at java.lang.Enum.getSharedConstants(Enum.java:211)
View PackageManager died
java.lang.RuntimeException: java.lang.RuntimeException: Package manager has died
at com.evernote.android.job.JobExecutor.execute(JobExecutor.java:80)
at com.evernote.android.job.JobProxy$Common.executeJobRequest(JobProxy.java:132)
at com.evernote.android.job.v14.PlatformAlarmService$1.run(PlatformAlarmService.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.RuntimeException: Package manager has died
at android.app.ApplicationPackageManager.checkPermission(ApplicationPackageManager.java:357)
at com.evernote.android.job.util.JobUtil.hasWakeLockPermission(JobUtil.java:88)
View JobScheduler crash 2
Android: 5.1.1
Manufacturer: samsung
Model: SM-G920F
Date: Fri Oct 09 07:33:11 GMT+03:00 2015
java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.job.IJobScheduler.cancel(int)' on a null object reference
at android.app.JobSchedulerImpl.cancel(JobSchedulerImpl.java:51)
at com.evernote.android.job.v21.JobProxy21.cancel(JobProxy21.java:97)
at com.evernote.android.job.JobManager.cancelInner(JobManager.java:309)
at com.evernote.android.job.JobManager.cancel(JobManager.java:284)
View Wake lock permission crash
Android: 6.0
Manufacturer: LGE
Model: Nexus 5
Date: Tue Oct 06 19:00:00 PDT 2015
java.lang.RuntimeException: Unable to start receiver com.evernote.android.job.v14.PlatformAlarmReceiver: java.lang.SecurityException: Neither user 10127 nor current process has android.permission.WAKE_LOCK.
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2732)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)
at android.os.Handler.dispatchMessage(Handler.java:102)
View JobScheduler crash
Android: 5.1.1
Manufacturer: OnePlus
Model: A0001
Date: Wed Oct 07 07:07:34 EDT 2015
java.lang.NullPointerException: Attempt to invoke interface method 'java.util.List android.app.job.IJobScheduler.getAllPendingJobs()' on a null object reference
at android.app.JobSchedulerImpl.getAllPendingJobs(JobSchedulerImpl.java:67)
at com.evernote.android.job.v21.JobProxy21.isPlatformJobScheduled(JobProxy21.java:102)
at com.evernote.android.job.JobManager.rescheduleTasksIfNecessary(JobManager.java:407)
at com.evernote.android.job.JobManager.access$000(JobManager.java:80)