Set EvenDimmer to true by default
- Read from setting with true as fallback Bug: 336476693 Test: atest DisplayServiceTests Test: manual up/downgrade with settings / off Change-Id: I5279db2b35af9e84057d8f89bbbe9f26c62237c6
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.display;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -79,7 +80,8 @@ public class EvenDimmerPreferenceController extends TogglePreferenceController {
|
||||
}
|
||||
|
||||
private boolean getEvenDimmerActivated() {
|
||||
return Settings.Secure.getFloat(mContext.getContentResolver(),
|
||||
Settings.Secure.EVEN_DIMMER_ACTIVATED, 0) == 1;
|
||||
return Settings.Secure.getFloatForUser(mContext.getContentResolver(),
|
||||
Settings.Secure.EVEN_DIMMER_ACTIVATED,
|
||||
/* def= */ 1.0f, UserHandle.USER_CURRENT) == 1.0f;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user