HelloCW
HelloCW

Reputation: 2255

Why does BIG_PICTURE_STYLE notification cause the error "java.lang.IllegalArgumentException: Unknown component"?

There is a sample code about Notifications in the project user-interface-samples.

Image A will be displayed when I launch BIG_PICTURE_STYLE notification, the app will crash when I click "Yes", "No" or "Maybe" button in Image A, the error information are listed below.

What cause the error?

BTW, I test it in Android Studio emulator with API 30.

2020-07-09 10:49:55.319 591-690/system_process E/InputDispatcher: channel '7f94cc PopupWindow:9728008 (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-07-09 10:49:57.850 591-691/system_process E/InputClassifier: Could not add the event to the queue. Resetting
2020-07-09 10:49:57.874 591-691/system_process E/InputClassifier: Could not add the event to the queue. Resetting
2020-07-09 10:49:57.909 591-691/system_process E/InputClassifier: Could not add the event to the queue. Resetting
2020-07-09 10:49:58.012 591-691/system_process E/InputClassifier: Could not add the event to the queue. Resetting
2020-07-09 10:49:58.027 591-691/system_process E/InputClassifier: Could not add the event to the queue. Resetting
2020-07-09 10:49:58.093 591-691/system_process E/InputClassifier: Could not add the event to the queue. Resetting
2020-07-09 10:49:58.279 0-0/? E/ICMPv6: RA: ndisc_router_discovery failed to add default route
2020-07-09 10:50:01.549 412-412/? E/OMXNodeInstance: setConfig(0xece41120:google.vorbis.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
2020-07-09 10:50:01.550 412-412/? E/OMXNodeInstance: getConfig(0xece41120:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2020-07-09 10:50:03.627 591-611/system_process E/JobScheduler.Background: App com.google.android.gms became active but still in NEVER bucket
2020-07-09 10:50:03.922 25492-25492/com.android.systemui E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.android.systemui, PID: 25492
    java.lang.ClassCastException: android.os.Parcelable[] cannot be cast to android.app.RemoteInputHistoryItem[]
        at com.android.systemui.statusbar.notification.collection.NotificationEntry.isLastMessageFromReply(NotificationEntry.java:546)
        at com.android.systemui.statusbar.phone.NotificationIconAreaController.shouldShowNotificationIcon(NotificationIconAreaController.java:282)
        at com.android.systemui.statusbar.phone.NotificationIconAreaController.updateIconsForLayout(NotificationIconAreaController.java:385)
        at com.android.systemui.statusbar.phone.NotificationIconAreaController.updateStatusBarIcons(NotificationIconAreaController.java:322)
        at com.android.systemui.statusbar.phone.NotificationIconAreaController.updateNotificationIcons(NotificationIconAreaController.java:301)
        at com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.updateIconAreaViews(NotificationStackScrollLayout.java:5773)
        at com.android.systemui.statusbar.phone.NotificationPanelViewController.updateNotificationViews(NotificationPanelViewController.java:2888)
        at com.android.systemui.statusbar.phone.StatusBarNotificationPresenter.updateNotificationViews(StatusBarNotificationPresenter.java:312)
        at com.android.systemui.statusbar.notification.NotificationEntryManager.updateNotifications(NotificationEntryManager.java:673)
        at com.android.systemui.statusbar.notification.NotificationEntryManager.updateNotificationInternal(NotificationEntryManager.java:641)
        at com.android.systemui.statusbar.notification.NotificationEntryManager.updateNotification(NotificationEntryManager.java:660)
        at com.android.systemui.statusbar.notification.NotificationEntryManager$2.onNotificationPosted(NotificationEntryManager.java:355)
        at com.android.systemui.statusbar.NotificationListener.lambda$onNotificationPosted$1(NotificationListener.java:121)
        at com.android.systemui.statusbar.NotificationListener.lambda$onNotificationPosted$1$NotificationListener(Unknown Source:0)
        at com.android.systemui.statusbar.-$$Lambda$NotificationListener$NvFmU0XrVPuc5pizHcri9I0apkw.run(Unknown Source:6)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
2020-07-09 10:50:03.949 591-690/system_process E/InputDispatcher: channel 'EmbeddedWindow{ u0 Internal} (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-07-09 10:50:03.949 591-690/system_process E/InputDispatcher: channel '14229ee com.android.systemui.ImageWallpaper (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-07-09 10:50:03.949 591-690/system_process E/InputDispatcher: channel 'd39bfb2 StatusBar (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-07-09 10:50:03.954 415-439/? E/IPCThreadState: attemptIncStrongHandle(76): Not supported
2020-07-09 10:50:03.961 591-690/system_process E/InputDispatcher: channel '66aea81 NotificationShade (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-07-09 10:50:03.961 591-690/system_process E/InputDispatcher: channel 'd76e476 NavigationBar0 (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-07-09 10:50:03.961 591-690/system_process E/InputDispatcher: channel 'ba4aa7f AssistPreviewPanel (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-07-09 10:50:03.970 591-606/system_process E/BiometricService: Enabled callback binder died
2020-07-09 10:50:03.971 591-3477/system_process E/FingerprintService: Lockout reset callback binder died
2020-07-09 10:50:04.093 25775-25775/? E/ndroid.systemu: Unknown bits set in runtime_flags: 0x200000
2020-07-09 10:50:04.321 25775-25775/com.android.systemui E/ActivityThread: Failed to find provider info for com.google.android.apps.turbo.estimated_time_remaining
2020-07-09 10:50:04.357 25775-25775/com.android.systemui E/NavigationModeController: updateCurrentInteractionMode: mode=0
2020-07-09 10:50:04.402 412-412/? E/OMXNodeInstance: getConfig(0xece41120:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2020-07-09 10:50:04.534 25775-25813/com.android.systemui E/vol.VolumeDialogControl: isCaptionsServiceEnabled failed to check for captions component
    java.lang.IllegalArgumentException: Unknown component: ComponentInfo{com.google.android.as/com.google.android.apps.miphone.aiai.captions.CaptionsService}
        at android.os.Parcel.createExceptionOrNull(Parcel.java:2377)
        at android.os.Parcel.createException(Parcel.java:2357)
        at android.os.Parcel.readException(Parcel.java:2340)
        at android.os.Parcel.readException(Parcel.java:2282)
        at android.content.pm.IPackageManager$Stub$Proxy.getComponentEnabledSetting(IPackageManager.java:6738)
        at android.app.ApplicationPackageManager.getComponentEnabledSetting(ApplicationPackageManager.java:2708)
        at com.android.systemui.volume.VolumeDialogControllerImpl.onGetCaptionsComponentStateW(VolumeDialogControllerImpl.java:441)
        at com.android.systemui.volume.VolumeDialogControllerImpl.access$2000(VolumeDialogControllerImpl.java:92)
        at com.android.systemui.volume.VolumeDialogControllerImpl$W.handleMessage(VolumeDialogControllerImpl.java:825)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.os.HandlerThread.run(HandlerThread.java:67)
     Caused by: android.os.RemoteException: Remote stack trace:
        at com.android.server.pm.PackageManagerService.getComponentEnabledSetting(PackageManagerService.java:21110)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3184)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4305)
        at android.os.Binder.execTransactInternal(Binder.java:1154)
        at android.os.Binder.execTransact(Binder.java:1123)
2020-07-09 10:50:04.586 412-412/? E/OMXNodeInstance: getConfig(0xece41120:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2020-07-09 10:50:04.678 412-412/? E/OMXNodeInstance: getConfig(0xece41120:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2020-07-09 10:50:05.149 591-2805/system_process E/system_server: Invalid class loader spec: =UnsupportedClassLoaderContext=
2020-07-09 10:50:05.149 591-2805/system_process E/PackageDexUsage: Unsupported context?
2020-07-09 10:50:05.314 591-3802/system_process E/WindowManager: Window Session Crash
    java.lang.IllegalArgumentException: Requested window null does not exist
        at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:5432)
        at com.android.server.wm.Session.actionOnWallpaper(Session.java:355)
        at com.android.server.wm.Session.setWallpaperZoomOut(Session.java:381)
        at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:1154)
        at com.android.server.wm.Session.onTransact(Session.java:138)
        at android.os.Binder.execTransactInternal(Binder.java:1159)
        at android.os.Binder.execTransact(Binder.java:1123)
2020-07-09 10:50:05.907 25775-25775/com.android.systemui E/Elmyra/GestureSensor: ContextHubClient null
2020-07-09 10:50:06.564 25775-25775/com.android.systemui E/StatusBar: couldn't inflate view for notification com.example.android.wearable.wear.wearnotifications/0x378
    java.lang.ClassCastException: android.os.Parcelable[] cannot be cast to android.app.RemoteInputHistoryItem[]
        at android.app.Notification$Builder.applyStandardTemplateWithActions(Notification.java:5371)
        at android.app.Notification$Builder.access$2300(Notification.java:3423)
        at android.app.Notification$Style.getStandardView(Notification.java:6534)
        at android.app.Notification$BigPictureStyle.makeBigContentView(Notification.java:6831)
        at android.app.Notification$Builder.createBigContentView(Notification.java:5475)
        at com.android.systemui.statusbar.notification.row.NotificationContentInflater.createExpandedView(NotificationContentInflater.java:648)
        at com.android.systemui.statusbar.notification.row.NotificationContentInflater.createRemoteViews(NotificationContentInflater.java:295)
        at com.android.systemui.statusbar.notification.row.NotificationContentInflater.access$1600(NotificationContentInflater.java:69)
        at com.android.systemui.statusbar.notification.row.NotificationContentInflater$AsyncInflationTask.doInBackground(NotificationContentInflater.java:776)
        at com.android.systemui.statusbar.notification.row.NotificationContentInflater$AsyncInflationTask.doInBackground(NotificationContentInflater.java:694)
        at android.os.AsyncTask$3.call(AsyncTask.java:394)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.os.HandlerThread.run(HandlerThread.java:67)

Image A

enter image description here

Upvotes: 3

Views: 1419

Answers (1)

Amani
Amani

Reputation: 3979

In stacktrace you should look from top to bottom and in the top the exception is ClassCastException when you want to cast a Parcelable[] to RemoteInputHistoryItem[]

when you click "Yes", "No" or "Maybe" button in Image A you do that cast and the cast fails.

java.lang.ClassCastException: android.os.Parcelable[] cannot be cast to android.app.RemoteInputHistoryItem[]

Upvotes: 1

Related Questions