Dark theme resets when new user is created

Fixes: 169106225
Test: manual create secondary users
Change-Id: I55f3e5cdcd9260f20c4f291be821ef076cb7daf7
This commit is contained in:
Jay Aliomer
2020-10-26 15:50:40 -04:00
parent 03bc25f7db
commit 58cb003ab2

View File

@@ -501,7 +501,7 @@ final class UiModeManagerService extends SystemService {
}
/**
* Updates the night mode setting in Settings.Global and returns if the value was successfully
* Updates the night mode setting in Settings.Secure and returns if the value was successfully
* changed.
*
* @param context A valid context
@@ -516,7 +516,8 @@ final class UiModeManagerService extends SystemService {
int oldNightMode = mNightMode;
if (mSetupWizardComplete) {
mNightMode = Secure.getIntForUser(context.getContentResolver(),
Secure.UI_NIGHT_MODE, mNightMode, userId);
Secure.UI_NIGHT_MODE, res.getInteger(
com.android.internal.R.integer.config_defaultNightMode), userId);
mOverrideNightModeOn = Secure.getIntForUser(context.getContentResolver(),
Secure.UI_NIGHT_MODE_OVERRIDE_ON, 0, userId) != 0;
mOverrideNightModeOff = Secure.getIntForUser(context.getContentResolver(),