OSDN Git Service

[Game Driver] Add support for whitelist.
authorPeiyong Lin <lpy@google.com>
Thu, 24 Jan 2019 00:27:54 +0000 (16:27 -0800)
committerYiwei Zhang <zzyiwei@google.com>
Thu, 18 Apr 2019 00:02:39 +0000 (17:02 -0700)
Instead of keeping reading the whitelist everytime, we want to store it in
Settings.Global variable and reuse it later.

BUG: 120869311
Test: Build, flash and boot.
Change-Id: I5e39757383c5ba7d31af7efb3e6e8a2996e669f4
Merged-In: I5e39757383c5ba7d31af7efb3e6e8a2996e669f4

core/java/android/provider/Settings.java
core/proto/android/providers/settings/global.proto
core/tests/coretests/src/android/provider/SettingsBackupTest.java
packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java

index ae22b07..e8ae85e 100644 (file)
@@ -11475,6 +11475,14 @@ public final class Settings {
         public static final String GUP_BLACKLIST = "gup_blacklist";
 
         /**
+         * Apps on the whitelist that are allowed to use Game Driver.
+         * The string is a list of application package names, seperated by comma.
+         * i.e. <apk1>,<apk2>,...,<apkN>
+         * @hide
+         */
+        public static final String GAME_DRIVER_WHITELIST = "game_driver_whitelist";
+
+        /**
          * Ordered GPU debug layer list
          * i.e. <layer1>:<layer2>:...:<layerN>
          * @hide
index a7d9fc5..ac2b36e 100644 (file)
@@ -397,6 +397,8 @@ message GlobalSettingsProto {
         optional SettingProto gup_dev_opt_out_apps = 10;
         // GUP - List of Apps that are forbidden to use Game Update Package
         optional SettingProto gup_blacklist = 11;
+        // List of Apps that are allowed to use Game Driver package.
+        optional SettingProto game_driver_whitelist = 12;
     }
     optional Gpu gpu = 59;
 
index e84f4be..612b923 100644 (file)
@@ -448,6 +448,7 @@ public class SettingsBackupTest {
                     Settings.Global.GUP_DEV_OPT_IN_APPS,
                     Settings.Global.GUP_DEV_OPT_OUT_APPS,
                     Settings.Global.GUP_BLACKLIST,
+                    Settings.Global.GAME_DRIVER_WHITELIST,
                     Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING,
                     Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT,
                     Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS,
index 9559b7c..dcfc3e5 100644 (file)
@@ -659,6 +659,9 @@ class SettingsProtoDumpUtil {
         dumpSetting(s, p,
                 Settings.Global.GUP_BLACKLIST,
                 GlobalSettingsProto.Gpu.GUP_BLACKLIST);
+        dumpSetting(s, p,
+                Settings.Global.GAME_DRIVER_WHITELIST,
+                GlobalSettingsProto.Gpu.GAME_DRIVER_WHITELIST);
         p.end(gpuToken);
 
         final long hdmiToken = p.start(GlobalSettingsProto.HDMI);