Skip to content

Commit 8aa11f6

Browse files
rmp22neobuddy89
authored andcommitted
fixing ShadeDialogContextRepo crash
8:03.430 2440 2440 E ShadeDialogContextRepo: Couldn't get dialog context for displayId=0. Returning default one 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: java.lang.IllegalStateException: This should be instantiated only when either StatusBarConnectedDisplays or ShadeWindowGoesAround or cursorHotCorner are enabled. 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.display.data.repository.DisplayWindowPropertiesRepositoryImpl.<init>(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:35) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get3(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:715) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:96) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at dagger.internal.DoubleCheck.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:14) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContextOrDefault(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:46) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContext(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:33) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl.getContext$1(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:3) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1$$ExternalSyntheticLambda0.invoke(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:14) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.animation.ActivityTransitionAnimator.startIntentWithAnimation(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:307) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1.run(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:80) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.handleCallback(Handler.java:1041) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.dispatchMessage(Handler.java:103) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.dispatchMessage(Looper.java:315) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loopOnce(Looper.java:251) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loop(Looper.java:349) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at android.app.ActivityThread.main(ActivityThread.java:9067) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at java.lang.reflect.Method.invoke(Native Method) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593) 01-06 12:58:03.430 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: Couldn't get dialog context for displayId=0. Returning default one 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: java.lang.IllegalStateException: This should be instantiated only when either StatusBarConnectedDisplays or ShadeWindowGoesAround or cursorHotCorner are enabled. 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.display.data.repository.DisplayWindowPropertiesRepositoryImpl.<init>(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:35) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get3(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:715) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:96) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at dagger.internal.DoubleCheck.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:14) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContextOrDefault(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:46) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContext(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:33) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl.getContext$1(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:3) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1$$ExternalSyntheticLambda0.invoke(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:84) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.animation.ActivityTransitionAnimator.startIntentWithAnimation(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:307) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1.run(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:80) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.handleCallback(Handler.java:1041) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.dispatchMessage(Handler.java:103) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.dispatchMessage(Looper.java:315) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loopOnce(Looper.java:251) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loop(Looper.java:349) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at android.app.ActivityThread.main(ActivityThread.java:9067) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at java.lang.reflect.Method.invoke(Native Method) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593) 01-06 12:58:03.434 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: Couldn't get dialog context for displayId=0. Returning default one 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: java.lang.IllegalStateException: This should be instantiated only when either StatusBarConnectedDisplays or ShadeWindowGoesAround or cursorHotCorner are enabled. 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.display.data.repository.DisplayWindowPropertiesRepositoryImpl.<init>(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:35) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get3(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:715) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:96) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at dagger.internal.DoubleCheck.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:14) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContextOrDefault(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:46) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContext(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:33) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl.getContext$1(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:3) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1$$ExternalSyntheticLambda0.invoke(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:92) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.animation.ActivityTransitionAnimator.startIntentWithAnimation(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:307) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1.run(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:80) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.handleCallback(Handler.java:1041) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.dispatchMessage(Handler.java:103) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.dispatchMessage(Looper.java:315) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loopOnce(Looper.java:251) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loop(Looper.java:349) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at android.app.ActivityThread.main(ActivityThread.java:9067) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at java.lang.reflect.Method.invoke(Native Method) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593) 01-06 12:58:03.438 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: Couldn't get dialog context for displayId=0. Returning default one 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: java.lang.IllegalStateException: This should be instantiated only when either StatusBarConnectedDisplays or ShadeWindowGoesAround or cursorHotCorner are enabled. 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.display.data.repository.DisplayWindowPropertiesRepositoryImpl.<init>(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:35) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get3(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:715) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.dagger.DaggerReferenceGlobalRootComponent$ReferenceSysUIComponentImpl$SwitchingProvider.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:96) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at dagger.internal.DoubleCheck.get(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:14) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContextOrDefault(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:46) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.shade.domain.interactor.ShadeDialogContextInteractorImpl.getContext(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:33) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl.getContext$1(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:3) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1$$ExternalSyntheticLambda0.invoke(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:100) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.animation.ActivityTransitionAnimator.startIntentWithAnimation(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:307) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.systemui.statusbar.phone.LegacyActivityStarterInternalImpl$startActivityDismissingKeyguard$runnable$1.run(go/retraceme 72c579ceb01122ff1cb014d1b6f305a3c734b2a386d5105a246f105cfb7379b4:80) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.handleCallback(Handler.java:1041) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at android.os.Handler.dispatchMessage(Handler.java:103) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.dispatchMessage(Looper.java:315) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loopOnce(Looper.java:251) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at android.os.Looper.loop(Looper.java:349) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at android.app.ActivityThread.main(ActivityThread.java:9067) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at java.lang.reflect.Method.invoke(Native Method) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593) 01-06 12:58:03.442 2440 2440 E ShadeDialogContextRepo: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929) Change-Id: I0819895e20ee4abc326920f84f741bb01cdbc070 Signed-off-by: rmp22 <[email protected]> Signed-off-by: Pranav Vashi <[email protected]>
1 parent c4892cd commit 8aa11f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeDialogContextInteractor.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ constructor(
7979
}
8080

8181
private fun getContextOrDefault(displayId: Int): Context {
82+
if (displayId == Display.DEFAULT_DISPLAY) {
83+
return defaultContext
84+
}
85+
8286
return try {
8387
traceSection({ "Getting dialog context for displayId=$displayId" }) {
8488
val displayWindowProperties =

0 commit comments

Comments
 (0)