OSDN Git Service

Split blacklist from versioned blacklists.
authorPeiyong Lin <lpy@google.com>
Thu, 7 Feb 2019 23:52:38 +0000 (15:52 -0800)
committerPeiyong Lin <lpy@google.com>
Tue, 12 Feb 2019 17:15:01 +0000 (17:15 +0000)
Previously we use blacklist to get all blacklists, to maintain the consistency
between blacklist and whitelist, and to move blacklist processing to GPU
service, we added blacklists to store all blacklists, and now blacklist will
only represent one blacklist.

BUG: 120869311
Test: Build, flash and boot. Verified in master patch ag/6288554
Change-Id: Ifac875177ad959705c8f80672341c4cbee7bbc93
Exempt-From-Owner-Approval: Change in CoreSettingsObserver.java is too minor

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
services/core/java/com/android/server/am/CoreSettingsObserver.java

index e95d604..c0a7fda 100644 (file)
@@ -12346,6 +12346,12 @@ public final class Settings {
         public static final String GAME_DRIVER_BLACKLIST = "game_driver_blacklist";
 
         /**
+         * List of blacklists, each blacklist is a blacklist for a specific version of Game Driver.
+         * @hide
+         */
+        public static final String GAME_DRIVER_BLACKLISTS = "game_driver_blacklists";
+
+        /**
          * 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>
index d577653..39d61a1 100644 (file)
@@ -448,6 +448,9 @@ message GlobalSettingsProto {
         optional SettingProto game_driver_whitelist = 12;
         // ANGLE - List of Apps that can check ANGLE rules
         optional SettingProto angle_whitelist = 13;
+        // Game Driver - List of blacklists, each blacklist is a blacklist for
+        // a specific Game Driver version
+        optional SettingProto game_driver_blacklists = 14;
     }
     optional Gpu gpu = 59;
 
index ec57f79..fcc3b6f 100644 (file)
@@ -492,6 +492,7 @@ public class SettingsBackupTest {
                     Settings.Global.GAME_DRIVER_ALL_APPS,
                     Settings.Global.GAME_DRIVER_OPT_IN_APPS,
                     Settings.Global.GAME_DRIVER_OPT_OUT_APPS,
+                    Settings.Global.GAME_DRIVER_BLACKLISTS,
                     Settings.Global.GAME_DRIVER_BLACKLIST,
                     Settings.Global.GAME_DRIVER_WHITELIST,
                     Settings.Global.GPU_DEBUG_LAYER_APP,
index 6152b8c..3caa139 100644 (file)
@@ -718,6 +718,9 @@ class SettingsProtoDumpUtil {
         dumpSetting(s, p,
                 Settings.Global.GAME_DRIVER_WHITELIST,
                 GlobalSettingsProto.Gpu.GAME_DRIVER_WHITELIST);
+        dumpSetting(s, p,
+                Settings.Global.GAME_DRIVER_BLACKLISTS,
+                GlobalSettingsProto.Gpu.GAME_DRIVER_BLACKLISTS);
         p.end(gpuToken);
 
         final long hdmiToken = p.start(GlobalSettingsProto.HDMI);
index 0194624..0bf5439 100644 (file)
@@ -76,6 +76,7 @@ final class CoreSettingsObserver extends ContentObserver {
         sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_OPT_OUT_APPS, String.class);
         sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_BLACKLIST, String.class);
         sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_WHITELIST, String.class);
+        sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_BLACKLISTS, String.class);
         // add other global settings here...
     }