Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3b4cce6 authored by Peiyong Lin's avatar Peiyong Lin
Browse files

[Game Driver] Add support for whitelist.

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
parent a4a3eb21
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -12149,6 +12149,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 for Vulkan
         * i.e. <layer1>:<layer2>:...:<layerN>
+2 −0
Original line number Diff line number Diff line
@@ -449,6 +449,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;

+1 −0
Original line number Diff line number Diff line
@@ -485,6 +485,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.GPU_DEBUG_LAYER_APP,
                    Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING,
                    Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT,
+3 −0
Original line number Diff line number Diff line
@@ -716,6 +716,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);