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

Commit 8d66a3a1 authored by Jay Aliomer's avatar Jay Aliomer
Browse files

Twilight Dark theme yet again not working

Test: manual
Fixes: 156807966
Change-Id: Iecab6c50440e1e26f8027c11f85b77d261093f48
parent db48450e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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();
@@ -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);
@@ -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();
            }