Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7c267748 authored by jhenrique09's avatar jhenrique09 Committed by Bruno Martins
Browse files

DisplayPolicy: Fix watchdog when adding new display

* Fixes system crashing after connected to Android Auto or started screen record

That was introduced on toggle navbar commit

Only register content observer if default display

Full log:

2020-03-24 21:54:54.125 1487-1580/? W/Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in monitor com.android.server.am.ActivityManagerService on foreground thread (android.fg), Blocked in handler on main thread (main), Blocked in handler on ui thread (android.ui), Blocked in handler on display thread (android.display), Blocked in handler on animation thread (android.anim)
2020-03-24 21:54:54.126 1487-1580/? W/Watchdog: android.fg annotated stack trace:
2020-03-24 21:54:54.127 1487-1580/? W/Watchdog:     at com.android.server.am.ActivityManagerService.monitor(ActivityManagerService.java:17558)
2020-03-24 21:54:54.127 1487-1580/? W/Watchdog:     - waiting to lock <0x003cd137> (a com.android.server.am.ActivityManagerService)
2020-03-24 21:54:54.127 1487-1580/? W/Watchdog:     at com.android.server.Watchdog$HandlerChecker.run(Watchdog.java:234)
2020-03-24 21:54:54.127 1487-1580/? W/Watchdog:     at android.os.Handler.handleCallback(Handler.java:883)
2020-03-24 21:54:54.127 1487-1580/? W/Watchdog:     at android.os.Handler.dispatchMessage(Handler.java:100)
2020-03-24 21:54:54.127 1487-1580/? W/Watchdog:     at android.os.Looper.loop(Looper.java:214)
2020-03-24 21:54:54.128 1487-1580/? W/Watchdog:     at android.os.HandlerThread.run(HandlerThread.java:67)
2020-03-24 21:54:54.128 1487-1580/? W/Watchdog:     at com.android.server.ServiceThread.run(ServiceThread.java:44)
2020-03-24 21:54:54.129 1487-1580/? W/Watchdog: main annotated stack trace:
2020-03-24 21:54:54.129 1487-1580/? W/Watchdog:     at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:15573)
2020-03-24 21:54:54.129 1487-1580/? W/Watchdog:     - waiting to lock <0x003cd137> (a com.android.server.am.ActivityManagerService)
2020-03-24 21:54:54.129 1487-1580/? W/Watchdog:     at android.app.ActivityManager.broadcastStickyIntent(ActivityManager.java:3985)
2020-03-24 21:54:54.129 1487-1580/? W/Watchdog:     at android.app.ActivityManager.broadcastStickyIntent(ActivityManager.java:3975)
2020-03-24 21:54:54.129 1487-1580/? W/Watchdog:     at com.android.server.BatteryService.lambda$sendBatteryChangedIntentLocked$0(BatteryService.java:717)
2020-03-24 21:54:54.129 1487-1580/? W/Watchdog:     at com.android.server.-$$Lambda$BatteryService$2x73lvpB0jctMSVP4qb9sHAqRPw.run(Unknown Source:2)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at android.os.Handler.handleCallback(Handler.java:883)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at android.os.Handler.dispatchMessage(Handler.java:100)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at android.os.Looper.loop(Looper.java:214)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at com.android.server.SystemServer.run(SystemServer.java:543)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at com.android.server.SystemServer.main(SystemServer.java:355)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at java.lang.reflect.Method.invoke(Native Method)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
2020-03-24 21:54:54.130 1487-1580/? W/Watchdog:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:908)
2020-03-24 21:54:54.132 1487-1580/? W/Watchdog: android.ui annotated stack trace:
2020-03-24 21:54:54.132 1487-1580/? W/Watchdog:     at com.android.server.am.ActivityManagerService.checkContentProviderAccess(ActivityManagerService.java:6506)
2020-03-24 21:54:54.132 1487-1580/? W/Watchdog:     - waiting to lock <0x003cd137> (a com.android.server.am.ActivityManagerService)
2020-03-24 21:54:54.132 1487-1580/? W/Watchdog:     at com.android.server.am.ActivityManagerService$LocalService.checkContentProviderAccess(ActivityManagerService.java:17777)
2020-03-24 21:54:54.132 1487-1580/? W/Watchdog:     at com.android.server.content.ContentService.registerContentObserver(ContentService.java:341)
2020-03-24 21:54:54.132 1487-1580/? W/Watchdog:     at android.content.ContentResolver.registerContentObserver(ContentResolver.java:2263)
2020-03-24 21:54:54.133 1487-1580/? W/Watchdog:     at com.android.server.wm.DisplayPolicy$SettingsObserver.<init>(DisplayPolicy.java:441)
2020-03-24 21:54:54.133 1487-1580/? W/Watchdog:     at com.android.server.wm.DisplayPolicy.<init>(DisplayPolicy.java:626)
2020-03-24 21:54:54.133 1487-1580/? W/Watchdog:     at com.android.server.wm.DisplayContent.<init>(DisplayContent.java:940)
2020-03-24 21:54:54.133 1487-1580/? W/Watchdog:     at com.android.server.wm.RootWindowContainer.createDisplayContent(RootWindowContainer.java:240)
2020-03-24 21:54:54.133 1487-1580/? W/Watchdog:     at com.android.server.wm.ActivityDisplay.createDisplayContent(ActivityDisplay.java:171)
2020-03-24 21:54:54.133 1487-1580/? W/Watchdog:     at com.android.server.wm.ActivityDisplay.<init>(ActivityDisplay.java:166)
2020-03-24 21:54:54.133 1487-1580/? W/Watchdog:     at com.android.server.wm.RootActivityContainer.getActivityDisplayOrCreate(RootActivityContainer.java:315)
2020-03-24 21:54:54.134 1487-1580/? W/Watchdog:     at com.android.server.wm.RootActivityContainer.onDisplayAdded(RootActivityContainer.java:1361)
2020-03-24 21:54:54.134 1487-1580/? W/Watchdog:     - locked <0x0a80b901> (a com.android.server.wm.WindowManagerGlobalLock)
2020-03-24 21:54:54.134 1487-1580/? W/Watchdog:     at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.handleMessage(DisplayManagerGlobal.java:696)
2020-03-24 21:54:54.134 1487-1580/? W/Watchdog:     at android.os.Handler.dispatchMessage(Handler.java:107)
2020-03-24 21:54:54.134 1487-1580/? W/Watchdog:     at android.os.Looper.loop(Looper.java:214)
2020-03-24 21:54:54.135 1487-1580/? W/Watchdog:     at android.os.HandlerThread.run(HandlerThread.java:67)
2020-03-24 21:54:54.135 1487-1580/? W/Watchdog:     at com.android.server.ServiceThread.run(ServiceThread.java:44)
2020-03-24 21:54:54.135 1487-1580/? W/Watchdog:     at com.android.server.UiThread.run(UiThread.java:43)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog: android.display annotated stack trace:
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     at com.android.server.wm.WindowManagerService.requestTraversal(WindowManagerService.java:5415)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     - waiting to lock <0x0a80b901> (a com.android.server.wm.WindowManagerGlobalLock)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     at com.android.server.wm.WindowManagerService$LocalService.requestTraversalFromDisplayManager(WindowManagerService.java:7139)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     at com.android.server.display.DisplayManagerService$DisplayManagerHandler.handleMessage(DisplayManagerService.java:1636)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     at android.os.Handler.dispatchMessage(Handler.java:107)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     at android.os.Looper.loop(Looper.java:214)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     at android.os.HandlerThread.run(HandlerThread.java:67)
2020-03-24 21:54:54.136 1487-1580/? W/Watchdog:     at com.android.server.ServiceThread.run(ServiceThread.java:44)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog: android.anim annotated stack trace:
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog:     at com.android.server.wm.InputMonitor$1.run(InputMonitor.java:117)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog:     - waiting to lock <0x0a80b901> (a com.android.server.wm.WindowManagerGlobalLock)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog:     at android.os.Handler.handleCallback(Handler.java:883)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog:     at android.os.Handler.dispatchMessage(Handler.java:100)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog:     at android.os.Looper.loop(Looper.java:214)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog:     at android.os.HandlerThread.run(HandlerThread.java:67)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog:     at com.android.server.ServiceThread.run(ServiceThread.java:44)
2020-03-24 21:54:54.137 1487-1580/? W/Watchdog: *** GOODBYE!

Change-Id: Ia43a922251803be94de8618eb442dcf132e479e9
parent 93796da5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment