android / android/security-samples
Does not work on Pixel C
- Dominant language
- Kotlin
- Stars
- 1k
- Forks
- 450
- PR merge metrics
- No merged PRs in 30d
Description
**Issue by [debbiefu](https://github.com/debbiefu)**
_Tuesday Jul 12, 2016 at 08:06 GMT_
_Originally opened as https://github.com/googlesamples/android-DirectBoot/issues/7_
----
07-12 03:24:22.197 492 526 E Parcel : Class not found when unmarshalling: com.example.android.directboot.alarms.Alarm
07-12 03:24:22.197 492 526 E Parcel : java.lang.ClassNotFoundException: com.example.android.directboot.alarms.Alarm
07-12 03:24:22.197 492 526 E Parcel : at java.lang.Class.classForName(Native Method)
07-12 03:24:22.197 492 526 E Parcel : at java.lang.Class.forName(Class.java:400)
07-12 03:24:22.197 492 526 E Parcel : at android.os.Parcel.readParcelableCreator(Parcel.java:2490)
07-12 03:24:22.197 492 526 E Parcel : at android.os.Parcel.readParcelable(Parcel.java:2444)
07-12 03:24:22.197 492 526 E Parcel : at android.os.Parcel.readValue(Parcel.java:2347)
07-12 03:24:22.197 492 526 E Parcel : at android.os.Parcel.readArrayMapInternal(Parcel.java:2700)
07-12 03:24:22.197 492 526 E Parcel : at android.os.BaseBundle.unparcel(BaseBundle.java:269)
07-12 03:24:22.197 492 526 E Parcel : at android.os.Bundle.putAll(Bundle.java:226)
07-12 03:24:22.197 492 526 E Parcel : at android.content.Intent.fillIn(Intent.java:8171)
07-12 03:24:22.197 492 526 E Parcel : at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:240)
07-12 03:24:22.197 492 526 E Parcel : at com.android.server.am.PendingIntentRecord.sendWithResult(PendingIntentRecord.java:209)
07-12 03:24:22.197 492 526 E Parcel : at com.android.server.am.ActivityManagerService.sendIntentSender(ActivityManagerService.java:7084)
07-12 03:24:22.197 492 526 E Parcel : at android.app.PendingIntent.send(PendingIntent.java:806)
07-12 03:24:22.197 492 526 E Parcel : at com.android.server.AlarmManagerService$DeliveryTracker.deliverLocked(AlarmManagerService.java:2984)
07-12 03:24:22.197 492 526 E Parcel : at com.android.server.AlarmManagerService.deliverAlarmsLocked(AlarmManagerService.java:2424)
07-12 03:24:22.197 492 526 E Parcel : at com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:2543)
07-12 03:24:22.197 492 526 E Parcel : Caused by: java.lang.ClassNotFoundException: com.example.android.directboot.alarms.Alarm
07-12 03:24:22.197 492 526 E Parcel : at java.lang.Class.classForName(Native Method)
07-12 03:24:22.197 492 526 E Parcel : at java.lang.BootClassLoader.findClass(ClassLoader.java:1346)
07-12 03:24:22.197 492 526 E Parcel : at java.lang.BootClassLoader.loadClass(ClassLoader.java:1406)
07-12 03:24:22.197 492 526 E Parcel : at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
07-12 03:24:22.197 492 526 E Parcel : ... 16 more
07-12 03:24:22.197 492 526 E Parcel : Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
--------- beginning of crash
07-12 03:24:22.204 3178 3215 E AndroidRuntime: FATAL EXCEPTION: IntentService[com.example.android.directboot.alarms.AlarmIntentService]
07-12 03:24:22.204 3178 3215 E AndroidRuntime: Process: com.example.android.directboot, PID: 3178
07-12 03:24:22.204 3178 3215 E AndroidRuntime: java.lang.NullPointerException: Attempt to read from field 'int com.example.android.directboot.alarms.Alarm.hour' on a null object reference
07-12 03:24:22.204 3178 3215 E AndroidRuntime: at com.example.android.directboot.alarms.AlarmIntentService.onHandleIntent(AlarmIntentService.java:54)
07-12 03:24:22.204 3178 3215 E AndroidRuntime: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)
07-12 03:24:22.204 3178 3215 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
07-12 03:24:22.204 3178 3215 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
07-12 03:24:22.204 3178 3215 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:61)
Contributor guide
Research direction
Start by reproducing the failure on a Pixel C and read AlarmIntentService.onHandleIntent at line 54, along with the Alarm class named in the stack trace. Trace how the alarm is passed through the PendingIntent and verify that the service no longer crashes and the alarm is delivered correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100