Move KEY_BURN_IN_PROTECTION to Settings.Global
Bug: 173802026 Test: manual test Change-Id: I33aa06c68e4327534a0d2cc7c13bae2596a5add4 (cherry picked from commit 0f2a065a5ea736ae649cb2641b80f27bc123d615)
This commit is contained in:
committed by
Yeabkal Assegid Wubshit
parent
936413580d
commit
d7935a531f
@@ -16764,6 +16764,12 @@ public final class Settings {
|
||||
*/
|
||||
public static final String WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS =
|
||||
"wear_activity_auto_resume_timeout_ms";
|
||||
|
||||
/**
|
||||
* If burn in protection is enabled.
|
||||
* @hide
|
||||
*/
|
||||
public static final String BURN_IN_PROTECTION_ENABLED = "burn_in_protection";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -310,6 +310,7 @@ public class GlobalSettingsValidators {
|
||||
VALIDATORS.put(
|
||||
Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS,
|
||||
NON_NEGATIVE_INTEGER_VALIDATOR);
|
||||
VALIDATORS.put(Global.Wearable.BURN_IN_PROTECTION_ENABLED, BOOLEAN_VALIDATOR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5380,6 +5380,20 @@ public class SettingsProvider extends ContentProvider {
|
||||
initGlobalSettingsDefaultValForWearLocked(
|
||||
Settings.Global.Wearable.COMPANION_OS_VERSION,
|
||||
Settings.Global.Wearable.COMPANION_OS_VERSION_UNDEFINED);
|
||||
final boolean defaultBurnInProtectionEnabled =
|
||||
getContext()
|
||||
.getResources()
|
||||
.getBoolean(
|
||||
com.android
|
||||
.internal
|
||||
.R
|
||||
.bool
|
||||
.config_enableBurnInProtection);
|
||||
final boolean forceBurnInProtection =
|
||||
SystemProperties.getBoolean("persist.debug.force_burn_in", false);
|
||||
initGlobalSettingsDefaultValForWearLocked(
|
||||
Settings.Global.Wearable.BURN_IN_PROTECTION_ENABLED,
|
||||
defaultBurnInProtectionEnabled || forceBurnInProtection);
|
||||
|
||||
// TODO(b/164398026): add necessary initialization logic for all entries.
|
||||
currentVersion = 204;
|
||||
|
||||
@@ -657,7 +657,8 @@ public class SettingsBackupTest {
|
||||
Settings.Global.Wearable.OEM_SETUP_VERSION,
|
||||
Settings.Global.Wearable.MASTER_GESTURES_ENABLED,
|
||||
Settings.Global.Wearable.UNGAZE_ENABLED,
|
||||
Settings.Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS);
|
||||
Settings.Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS,
|
||||
Settings.Global.Wearable.BURN_IN_PROTECTION_ENABLED);
|
||||
|
||||
private static final Set<String> BACKUP_DENY_LIST_SECURE_SETTINGS =
|
||||
newHashSet(
|
||||
|
||||
Reference in New Issue
Block a user