OSDN Git Service

STOPSHIP: Add UidCpuPower global setting
authorMarissa Wall <marissaw@google.com>
Fri, 2 Feb 2018 17:35:58 +0000 (09:35 -0800)
committerMarissa Wall <marissaw@google.com>
Fri, 2 Feb 2018 17:38:12 +0000 (09:38 -0800)
This will help us run P/H experiments by controlling the
uid cpu power system property through P/H.

b/70517018
Test: Will manually test it later through opt-in P/H experiment

Change-Id: I2cb26f429e867acbed7ff553cc18b447932af655

core/java/android/provider/Settings.java
core/tests/coretests/src/android/provider/SettingsBackupTest.java
services/core/java/com/android/server/am/GlobalSettingsToPropertiesMapper.java

index 1f0d683..1caaabe 100644 (file)
@@ -10296,6 +10296,16 @@ public final class Settings {
         public static final String SYS_VDSO = "sys_vdso";
 
         /**
+        * Uid CpuPower global setting. This links the uid.cpupower system property.
+        * The following values are supported:
+        * 0 -> /proc/uid_cpupower/* are disabled
+        * 1 -> /proc/uid_cpupower/* are enabled
+        * Any other value defaults to enabled.
+        * @hide
+        */
+        public static final String UID_CPUPOWER = "uid_cpupower";
+
+        /**
          * An integer to reduce the FPS by this factor. Only for experiments. Need to reboot the
          * device for this setting to take full effect.
          *
index 0083b01..a304e82 100644 (file)
@@ -385,6 +385,7 @@ public class SettingsBackupTest {
                     Settings.Global.TZINFO_UPDATE_METADATA_URL,
                     Settings.Global.INSTALLED_INSTANT_APP_MIN_CACHE_PERIOD,
                     Settings.Global.INSTALLED_INSTANT_APP_MAX_CACHE_PERIOD,
+                    Settings.Global.UID_CPUPOWER,
                     Settings.Global.UNINSTALLED_INSTANT_APP_MIN_CACHE_PERIOD,
                     Settings.Global.UNINSTALLED_INSTANT_APP_MAX_CACHE_PERIOD,
                     Settings.Global.UNUSED_STATIC_SHARED_LIB_MIN_CACHE_PERIOD,
index d6c6f96..9c2ee87 100644 (file)
@@ -41,6 +41,7 @@ class GlobalSettingsToPropertiesMapper {
     //  {Settings.Global.SETTING_NAME, "system_property_name"},
         {Settings.Global.SYS_VDSO, "sys.vdso"},
         {Settings.Global.FPS_DEVISOR, ThreadedRenderer.DEBUG_FPS_DIVISOR},
+        {Settings.Global.UID_CPUPOWER, "uid.cpupower"},
     };