aboutsummaryrefslogtreecommitdiffstats
path: root/sdk
diff options
context:
space:
mode:
authorDanesh M <danesh@cyngn.com>2016-05-11 18:59:00 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-05-13 13:35:13 -0700
commit68665286e88abdd369bbf48ac77fc2422f9f3b9b (patch)
tree297a50caeb6bcdec983b05bb12f9ff91157f5af8 /sdk
parent61137013376ee0bd5ddcd07343f05ca044876485 (diff)
downloadvendor_cmsdk-68665286e88abdd369bbf48ac77fc2422f9f3b9b.zip
vendor_cmsdk-68665286e88abdd369bbf48ac77fc2422f9f3b9b.tar.gz
vendor_cmsdk-68665286e88abdd369bbf48ac77fc2422f9f3b9b.tar.bz2
CMSettings : Move force_show_navbar to global
Keep feature inline with 12.1, only allow owner to control the feature and mirror across users. Also add additional checks for moved settings. Change-Id: Ida11b71bc5ce9463628f8c5d76e59902d47d59bb
Diffstat (limited to 'sdk')
-rw-r--r--sdk/src/java/cyanogenmod/providers/CMSettings.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/sdk/src/java/cyanogenmod/providers/CMSettings.java b/sdk/src/java/cyanogenmod/providers/CMSettings.java
index 6e8b234..80dc2b3 100644
--- a/sdk/src/java/cyanogenmod/providers/CMSettings.java
+++ b/sdk/src/java/cyanogenmod/providers/CMSettings.java
@@ -530,6 +530,11 @@ public final class CMSettings {
/** @hide */
public static boolean putStringForUser(ContentResolver resolver, String name, String value,
int userId) {
+ if (MOVED_TO_SECURE.contains(name)) {
+ Log.w(TAG, "Setting " + name + " has moved from CMSettings.System"
+ + " to CMSettings.Secure, value is unchanged.");
+ return false;
+ }
return sNameValueCache.putStringForUser(resolver, name, value, userId);
}
@@ -2093,6 +2098,13 @@ public final class CMSettings {
CALL_METHOD_GET_SECURE,
CALL_METHOD_PUT_SECURE);
+ /** @hide */
+ protected static final ArraySet<String> MOVED_TO_GLOBAL;
+ static {
+ MOVED_TO_GLOBAL = new ArraySet<>(1);
+ MOVED_TO_GLOBAL.add(Global.DEV_FORCE_SHOW_NAVBAR);
+ }
+
// region Methods
/**
@@ -2156,6 +2168,11 @@ public final class CMSettings {
/** @hide */
public static String getStringForUser(ContentResolver resolver, String name,
int userId) {
+ if (MOVED_TO_GLOBAL.contains(name)) {
+ Log.w(TAG, "Setting " + name + " has moved from CMSettings.Secure"
+ + " to CMSettings.Global, value is unchanged.");
+ return CMSettings.Global.getStringForUser(resolver, name, userId);
+ }
return sNameValueCache.getStringForUser(resolver, name, userId);
}
@@ -2173,6 +2190,11 @@ public final class CMSettings {
/** @hide */
public static boolean putStringForUser(ContentResolver resolver, String name, String value,
int userId) {
+ if (MOVED_TO_GLOBAL.contains(name)) {
+ Log.w(TAG, "Setting " + name + " has moved from CMSettings.Secure"
+ + " to CMSettings.Global, value is unchanged.");
+ return false;
+ }
return sNameValueCache.putStringForUser(resolver, name, value, userId);
}
@@ -2483,6 +2505,7 @@ public final class CMSettings {
/**
* Developer options - Navigation Bar show switch
+ * @deprecated
* @hide
*/
public static final String DEV_FORCE_SHOW_NAVBAR = "dev_force_show_navbar";
@@ -3298,6 +3321,12 @@ public final class CMSettings {
* <p>{@link cyanogenmod.providers.WeatherContract.WeatherColumns.TempUnit#FAHRENHEIT}</p>
*/
public static final String WEATHER_TEMPERATURE_UNIT = "weather_temperature_unit";
+
+ /**
+ * Developer options - Navigation Bar show switch
+ * @hide
+ */
+ public static final String DEV_FORCE_SHOW_NAVBAR = "dev_force_show_navbar";
// endregion
/**