Loading services/core/java/com/android/server/UiModeManagerService.java +4 −1 Original line number Diff line number Diff line Loading @@ -337,6 +337,8 @@ final class UiModeManagerService extends SystemService { mWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG); mWindowManager = LocalServices.getService(WindowManagerInternal.class); mAlarmManager = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE); TwilightManager twilightManager = getLocalService(TwilightManager.class); if (twilightManager != null) mTwilightManager = twilightManager; mLocalPowerManager = LocalServices.getService(PowerManagerInternal.class); initPowerSave(); Loading Loading @@ -381,7 +383,6 @@ final class UiModeManagerService extends SystemService { com.android.internal.R.bool.config_enableCarDockHomeLaunch); mUiModeLocked = res.getBoolean(com.android.internal.R.bool.config_lockUiMode); mNightModeLocked = res.getBoolean(com.android.internal.R.bool.config_lockDayNightMode); mTwilightManager = getLocalService(TwilightManager.class); final PackageManager pm = context.getPackageManager(); mTelevision = pm.hasSystemFeature(PackageManager.FEATURE_TELEVISION) || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK); Loading @@ -391,6 +392,8 @@ final class UiModeManagerService extends SystemService { // Update the initial, static configurations. SystemServerInitThreadPool.submit(() -> { synchronized (mLock) { TwilightManager twilightManager = getLocalService(TwilightManager.class); if (twilightManager != null) mTwilightManager = twilightManager; updateNightModeFromSettingsLocked(context, res, UserHandle.getCallingUserId()); updateSystemProperties(); } Loading Loading
services/core/java/com/android/server/UiModeManagerService.java +4 −1 Original line number Diff line number Diff line Loading @@ -337,6 +337,8 @@ final class UiModeManagerService extends SystemService { mWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, TAG); mWindowManager = LocalServices.getService(WindowManagerInternal.class); mAlarmManager = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE); TwilightManager twilightManager = getLocalService(TwilightManager.class); if (twilightManager != null) mTwilightManager = twilightManager; mLocalPowerManager = LocalServices.getService(PowerManagerInternal.class); initPowerSave(); Loading Loading @@ -381,7 +383,6 @@ final class UiModeManagerService extends SystemService { com.android.internal.R.bool.config_enableCarDockHomeLaunch); mUiModeLocked = res.getBoolean(com.android.internal.R.bool.config_lockUiMode); mNightModeLocked = res.getBoolean(com.android.internal.R.bool.config_lockDayNightMode); mTwilightManager = getLocalService(TwilightManager.class); final PackageManager pm = context.getPackageManager(); mTelevision = pm.hasSystemFeature(PackageManager.FEATURE_TELEVISION) || pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK); Loading @@ -391,6 +392,8 @@ final class UiModeManagerService extends SystemService { // Update the initial, static configurations. SystemServerInitThreadPool.submit(() -> { synchronized (mLock) { TwilightManager twilightManager = getLocalService(TwilightManager.class); if (twilightManager != null) mTwilightManager = twilightManager; updateNightModeFromSettingsLocked(context, res, UserHandle.getCallingUserId()); updateSystemProperties(); } Loading