Merge "Don't persist new night mode setting in car mode" into qt-r1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
46b9bb83bf
@@ -413,15 +413,15 @@ final class UiModeManagerService extends SystemService {
|
|||||||
try {
|
try {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mNightMode != mode) {
|
if (mNightMode != mode) {
|
||||||
if (UserManager.get(getContext()).isPrimaryUser()) {
|
|
||||||
SystemProperties.set(SYSTEM_PROPERTY_DEVICE_THEME,
|
|
||||||
Integer.toString(mode));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only persist setting if not in car mode
|
// Only persist setting if not in car mode
|
||||||
if (!mCarModeEnabled) {
|
if (!mCarModeEnabled) {
|
||||||
Secure.putIntForUser(getContext().getContentResolver(),
|
Secure.putIntForUser(getContext().getContentResolver(),
|
||||||
Secure.UI_NIGHT_MODE, mode, user);
|
Secure.UI_NIGHT_MODE, mode, user);
|
||||||
|
|
||||||
|
if (UserManager.get(getContext()).isPrimaryUser()) {
|
||||||
|
SystemProperties.set(SYSTEM_PROPERTY_DEVICE_THEME,
|
||||||
|
Integer.toString(mode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mNightMode = mode;
|
mNightMode = mode;
|
||||||
|
|||||||
Reference in New Issue
Block a user