OSDN Git Service

STOPSHIP: Roll forward: 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>
Tue, 20 Feb 2018 22:25:27 +0000 (14:25 -0800)
This will help us run P/H experiments by controlling the
uid cpu power system property through P/H.

b/70517018
Test: adb shell settings put global sys_uidcpupower 1
      verify via getprop sys.uidcpupower

Change-Id: I8cf7365be885ef4910e37d3f993ba3079e15a37d

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

index 021c22c..f71b6db 100644 (file)
@@ -10315,6 +10315,16 @@ public final class Settings {
         public static final String SYS_VDSO = "sys_vdso";
 
         /**
+        * UidCpuPower global setting. This links the sys.uidcpupower 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 SYS_UIDCPUPOWER = "sys_uidcpupower";
+
+        /**
          * 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 5bb9abe..26e68f1 100644 (file)
@@ -374,6 +374,7 @@ public class SettingsBackupTest {
                     Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES,
                     Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE,
                     Settings.Global.SYS_VDSO,
+                    Settings.Global.SYS_UIDCPUPOWER,
                     Settings.Global.FPS_DEVISOR,
                     Settings.Global.TCP_DEFAULT_INIT_RWND,
                     Settings.Global.TETHER_DUN_APN,
index 71fd71b..d7d18a9 100644 (file)
@@ -42,6 +42,7 @@ class GlobalSettingsToPropertiesMapper {
         {Settings.Global.SYS_VDSO, "sys.vdso"},
         {Settings.Global.FPS_DEVISOR, ThreadedRenderer.DEBUG_FPS_DIVISOR},
         {Settings.Global.DISPLAY_PANEL_LPM, "sys.display_panel_lpm"},
+        {Settings.Global.SYS_UIDCPUPOWER, "sys.uidcpupower"},
     };