From be7d2d1de28ae61bdc04e6a1667760f32f3bd55e Mon Sep 17 00:00:00 2001 From: Prabir Pradhan Date: Mon, 22 May 2023 18:56:48 +0000 Subject: [PATCH] Register and update input settings after boot Some changes input settings have dependencies on other parts of the system. For example, the show_key_presses setting adds a window to WM when enabled. To account for this, only register and update input settings after the system is running. Bug: 283782679 Test: manual Change-Id: I622ffdc762537a277f90293eaa1b17b17eae68a2 --- .../java/com/android/server/input/InputManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java index 662591e3d2647..4cb22dbcf308e 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java @@ -500,8 +500,6 @@ public class InputManagerService extends IInputManager.Stub // Add ourselves to the Watchdog monitors. Watchdog.getInstance().addMonitor(this); - - mSettingsObserver.registerAndUpdate(); } // TODO(BT) Pass in parameter for bluetooth system @@ -512,6 +510,8 @@ public class InputManagerService extends IInputManager.Stub mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class); + mSettingsObserver.registerAndUpdate(); + synchronized (mLidSwitchLock) { mSystemReady = true;