googlearchive / android-directboot Goto Github PK
View Code? Open in Web Editor NEWMigrated:
Home Page: https://github.com/android/security
License: Apache License 2.0
Migrated:
Home Page: https://github.com/android/security
License: Apache License 2.0
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)
I saw the fatal exception when launching DirectBoot sample app.
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.directboot/com.example.android.directboot.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
My proposed change is using @style/Theme.AppCompat instead of @style/AppTheme.
From:
<application
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
To:
<application
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/Theme.AppCompat"
When I set alarm clock and alarm manager don't work in time that I set. It has delay about 3-10 minutes.
The app is crashing when an alarm fires, presumably because getting the alarm back from the intent extra is failing. I'm able to reproduce this consistently using a Nexus 5x running P3 (Build NPD35K).
Logcat output:
05-20 17:17:58.391 900 2840 E Parcel : Class not found when unmarshalling: com.example.android.directboot.alarms.Alarm
05-20 17:17:58.391 900 2840 E Parcel : java.lang.ClassNotFoundException: com.example.android.directboot.alarms.Alarm
05-20 17:17:58.391 900 2840 E Parcel : at java.lang.Class.classForName(Native Method)
05-20 17:17:58.391 900 2840 E Parcel : at java.lang.Class.forName(Class.java:400)
05-20 17:17:58.391 900 2840 E Parcel : at android.os.Parcel.readParcelableCreator(Parcel.java:2490)
05-20 17:17:58.391 900 2840 E Parcel : at android.os.Parcel.readParcelable(Parcel.java:2444)
05-20 17:17:58.391 900 2840 E Parcel : at android.os.Parcel.readValue(Parcel.java:2347)
05-20 17:17:58.391 900 2840 E Parcel : at android.os.Parcel.readArrayMapInternal(Parcel.java:2700)
05-20 17:17:58.391 900 2840 E Parcel : at android.os.BaseBundle.unparcel(BaseBundle.java:269)
05-20 17:17:58.391 900 2840 E Parcel : at android.os.Bundle.putAll(Bundle.java:226)
05-20 17:17:58.391 900 2840 E Parcel : at android.content.Intent.fillIn(Intent.java:8175)
05-20 17:17:58.391 900 2840 E Parcel : at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:235)
05-20 17:17:58.391 900 2840 E Parcel : at com.android.server.am.PendingIntentRecord.send(PendingIntentRecord.java:203)
05-20 17:17:58.391 900 2840 E Parcel : at android.app.PendingIntent.send(PendingIntent.java:806)
05-20 17:17:58.391 900 2840 E Parcel : at com.android.server.AlarmManagerService$DeliveryTracker.deliverLocked(AlarmManagerService.java:2972)
05-20 17:17:58.391 900 2840 E Parcel : at com.android.server.AlarmManagerService.deliverAlarmsLocked(AlarmManagerService.java:2418)
05-20 17:17:58.391 900 2840 E Parcel : at com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:2536)
05-20 17:17:58.391 900 2840 E Parcel : Caused by: java.lang.ClassNotFoundException: com.example.android.directboot.alarms.Alarm
05-20 17:17:58.391 900 2840 E Parcel : at java.lang.Class.classForName(Native Method)
05-20 17:17:58.391 900 2840 E Parcel : at java.lang.BootClassLoader.findClass(ClassLoader.java:1346)
05-20 17:17:58.391 900 2840 E Parcel : at java.lang.BootClassLoader.loadClass(ClassLoader.java:1406)
05-20 17:17:58.391 900 2840 E Parcel : at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
05-20 17:17:58.391 900 2840 E Parcel : ... 15 more
05-20 17:17:58.391 900 2840 E Parcel : Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
05-20 17:17:58.393 900 2840 W Bundle : Failed to parse Bundle, but defusing quietly
05-20 17:17:58.393 900 2840 W Bundle : android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.android.directboot.alarms.Alarm
05-20 17:17:58.393 900 2840 W Bundle : at android.os.Parcel.readParcelableCreator(Parcel.java:2518)
05-20 17:17:58.393 900 2840 W Bundle : at android.os.Parcel.readParcelable(Parcel.java:2444)
05-20 17:17:58.393 900 2840 W Bundle : at android.os.Parcel.readValue(Parcel.java:2347)
05-20 17:17:58.393 900 2840 W Bundle : at android.os.Parcel.readArrayMapInternal(Parcel.java:2700)
05-20 17:17:58.393 900 2840 W Bundle : at android.os.BaseBundle.unparcel(BaseBundle.java:269)
05-20 17:17:58.393 900 2840 W Bundle : at android.os.Bundle.putAll(Bundle.java:226)
05-20 17:17:58.393 900 2840 W Bundle : at android.content.Intent.fillIn(Intent.java:8175)
05-20 17:17:58.393 900 2840 W Bundle : at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:235)
05-20 17:17:58.393 900 2840 W Bundle : at com.android.server.am.PendingIntentRecord.send(PendingIntentRecord.java:203)
05-20 17:17:58.393 900 2840 W Bundle : at android.app.PendingIntent.send(PendingIntent.java:806)
05-20 17:17:58.393 900 2840 W Bundle : at com.android.server.AlarmManagerService$DeliveryTracker.deliverLocked(AlarmManagerService.java:2972)
05-20 17:17:58.393 900 2840 W Bundle : at com.android.server.AlarmManagerService.deliverAlarmsLocked(AlarmManagerService.java:2418)
05-20 17:17:58.393 900 2840 W Bundle : at com.android.server.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:2536)
--------- beginning of system
05-20 17:17:58.413 900 900 D ConditionProviders.SCP: onReceive android.app.action.NEXT_ALARM_CLOCK_CHANGED
05-20 17:17:58.413 900 900 D ConditionProviders.SCP: notifyCondition condition://android/schedule?days=6.7&start=23.30&end=10.0&exitAtAlarm=false STATE_FALSE reason=!meetsSchedule
05-20 17:17:58.413 900 900 D ConditionProviders.SCP: notifyCondition condition://android/schedule?days=1.2.3.4.5&start=22.0&end=7.0&exitAtAlarm=false STATE_FALSE reason=!meetsSchedule
05-20 17:17:58.414 900 900 D ConditionProviders.SCP: Scheduling evaluate for Fri May 20 22:00:00 EDT 2016 (1463796000000), in +4h42m1s587ms, now=Fri May 20 17:17:58 EDT 2016 (1463779078413)
--------- beginning of crash
05-20 17:17:58.416 7642 7750 E AndroidRuntime: FATAL EXCEPTION: IntentService[com.example.android.directboot.alarms.AlarmIntentService]
05-20 17:17:58.416 7642 7750 E AndroidRuntime: Process: com.example.android.directboot, PID: 7642
05-20 17:17:58.416 7642 7750 E AndroidRuntime: java.lang.NullPointerException: Attempt to read from field 'int com.example.android.directboot.alarms.Alarm.hour' on a null object reference
05-20 17:17:58.416 7642 7750 E AndroidRuntime: at com.example.android.directboot.alarms.AlarmIntentService.onHandleIntent(AlarmIntentService.java:54)
05-20 17:17:58.416 7642 7750 E AndroidRuntime: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:67)
05-20 17:17:58.416 7642 7750 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
05-20 17:17:58.416 7642 7750 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
05-20 17:17:58.416 7642 7750 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:61)
05-20 17:17:58.420 900 911 W ActivityManager: Force finishing activity com.example.android.directboot/.MainActivity
I am seeing this FATAL exception after boot saying:
java.lang.RuntimeException: Unable to instantiate receiver com.example.android.directboot.BootBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "com.example.android.directboot.BootBroadcastReceiver" on path: DexPathList
Pre-conditions
Android SDK Preview N 2
Nexus 6P(Build number: NPC91K)
Result:
Alarm scheduled at "04-22 18:41"
But only got log after unlock the device:
04-22 18:42:29.821 4523 4523 I BootBroadcastReceiver: Received action: android.intent.action.LOCKED_BOOT_COMPLETED, user unlocked: true
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.