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

Commit 51015a75 authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

GUP: Update global property for the new dev opt

We updated the development opt in mechanism for GUP. Now we have
GUP_DEV_OPT_IN_APPS for applications selected to use GUP and
GUP_DEV_OPT_OUT_APPS for applications selected not to use GUP.

Bug: 119221883
Test: Build, flash and boot, verify with prototype
Change-Id: I52869ecf9e411a8dbdc1146f00c82023ba41bebf
parent 71434b79
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
@@ -11982,11 +11982,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
@@ -476,6 +476,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