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

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

Partially revert the usage of string enum.

There's a regression in showmap_rss_bytes, after looking into the whole
showmap, the increase mostly came from framework, after partially revert
the usage of string enum, the showmap_rss_bytes number seems to decrease
consistently.

Bug: b/289956225
Bug: b/283858001
Test: forrest test
Change-Id: I3f548ac2bc437394d7da7d0a88090dd3aa27d7f8
parent abeaa64d
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -112,16 +112,14 @@ public class GraphicsEnvironment {
    private static final int ANGLE_GL_DRIVER_ALL_ANGLE_OFF = 0;

    // Values for ANGLE_GL_DRIVER_SELECTION_VALUES
    private enum AngleDriverChoice {
        DEFAULT("default"),
        ANGLE("angle"),
        NATIVE("native");

        public final String choice;
    private static final String ANGLE_GL_DRIVER_CHOICE_DEFAULT = "default";
    private static final String ANGLE_GL_DRIVER_CHOICE_ANGLE = "angle";
    private static final String ANGLE_GL_DRIVER_CHOICE_NATIVE = "native";

        AngleDriverChoice(String choice) {
            this.choice = choice;
        }
    private enum AngleDriverChoice {
        DEFAULT,
        ANGLE,
        NATIVE,
    }

    private static final String PROPERTY_RO_ANGLE_SUPPORTED = "ro.gfx.angle.supported";
@@ -493,9 +491,9 @@ public class GraphicsEnvironment {
        Log.v(TAG,
                "ANGLE Developer option for '" + packageName + "' "
                        + "set to: '" + optInValue + "'");
        if (optInValue.equals(AngleDriverChoice.ANGLE.choice)) {
        if (optInValue.equals(ANGLE_GL_DRIVER_CHOICE_ANGLE)) {
            return AngleDriverChoice.ANGLE;
        } else if (optInValue.equals(AngleDriverChoice.NATIVE.choice)) {
        } else if (optInValue.equals(ANGLE_GL_DRIVER_CHOICE_NATIVE)) {
            return AngleDriverChoice.NATIVE;
        } else {
            // The user either chose default or an invalid value; go with the default driver or what