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

Commit 0c9ccbe4 authored by Yiwei Zhang's avatar Yiwei Zhang Committed by Android (Google) Code Review
Browse files

Merge "GUP: Update global property for the new dev opt"

parents 4a899780 51015a75
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -480,14 +480,19 @@ public class GraphicsEnvironment {
            return;
        }

        String applicationPackageName = context.getPackageName();
        String devOptInApplicationName = coreSettings.getString(
                Settings.Global.GUP_DEV_OPT_IN_APPS);
        boolean devOptIn = applicationPackageName.equals(devOptInApplicationName);
        boolean whitelisted = onWhitelist(context, driverPackageName, ai.packageName);
        if (!devOptIn && !whitelisted) {
        if (getGlobalSettingsString(coreSettings, Settings.Global.GUP_DEV_OPT_OUT_APPS)
                        .contains(ai.packageName)) {
            if (DEBUG) {
                Log.w(TAG, applicationPackageName + " is not on the whitelist.");
                Log.w(TAG, ai.packageName + " opts out from GUP.");
            }
            return;
        }

        if (!getGlobalSettingsString(coreSettings, Settings.Global.GUP_DEV_OPT_IN_APPS)
                        .contains(ai.packageName)
                && !onWhitelist(context, driverPackageName, ai.packageName)) {
            if (DEBUG) {
                Log.w(TAG, ai.packageName + " is not on the whitelist.");
            }
            return;
        }
+7 −1
Original line number Diff line number Diff line
@@ -12000,11 +12000,17 @@ public final class Settings {
                "angle_gl_driver_selection_values";
        /**
         * Apps that are selected to use Game Update Package.
         * List of Apps selected to use Game Update Packages.
         * @hide
         */
        public static final String GUP_DEV_OPT_IN_APPS = "gup_dev_opt_in_apps";
        /**
         * List of Apps selected not to use Game Update Packages.
         * @hide
         */
        public static final String GUP_DEV_OPT_OUT_APPS = "gup_dev_opt_out_apps";
        /**
         * Apps on the black list that are forbidden to useGame Update Package.
         * @hide
+5 −4
Original line number Diff line number Diff line
@@ -436,11 +436,12 @@ message GlobalSettingsProto {
        // Ordered GPU debug layer list for GLES
        // i.e. <layer1>:<layer2>:...:<layerN>
        optional SettingProto debug_layers_gles = 7;
        // Apps opt in to load graphics driver from Game Update Package
        // instead of native graphcis driver through developer options.
        // GUP - List of Apps selected to use Game Update Packages
        optional SettingProto gup_dev_opt_in_apps = 8;
        // Apps on the black list that are forbidden to useGame Update Package.
        optional SettingProto gup_black_list = 9;
        // GUP - List of Apps selected not to use Game Update Packages
        optional SettingProto gup_dev_opt_out_apps = 9;
        // GUP - List of Apps that are forbidden to use Game Update Packages
        optional SettingProto gup_black_list = 10;
    }
    optional Gpu gpu = 59;

+1 −0
Original line number Diff line number Diff line
@@ -478,6 +478,7 @@ public class SettingsBackupTest {
                    Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_PKGS,
                    Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_VALUES,
                    Settings.Global.GUP_DEV_OPT_IN_APPS,
                    Settings.Global.GUP_DEV_OPT_OUT_APPS,
                    Settings.Global.GUP_BLACK_LIST,
                    Settings.Global.GPU_DEBUG_LAYER_APP,
                    Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING,
+0 −3
Original line number Diff line number Diff line
@@ -1137,9 +1137,6 @@
    <!-- The notice header of Third-party licenses. not translatable -->
    <string name="notice_header" translatable="false"></string>

    <!-- UI debug setting: opt in to use updated graphics driver? [CHAR LIMIT=100] -->
    <string name="gup_dev_opt_in_app_summary">Opt in app to use Game Update Package in developement</string>

    <!-- Name of the phone device [CHAR LIMIT=NONE] -->
    <string name="media_transfer_phone_device_name">Phone speaker</string>
</resources>
Loading