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

Commit 3cbbe363 authored by dakinola's avatar dakinola Committed by Daniel Akinola
Browse files

Move TYPE_WINDOW_CONTROL toString flag check

Moving flag check so it doesn't break adb window dump command

Fix: 349901649
Test: manually testing `adb shell uiautomator dump --windows`
Flag: android.view.accessibility.enable_type_window_control
Change-Id: I7658688f5e95f5aa2e101e99fe2c236704f8200c
parent e647a8ee
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -880,10 +880,6 @@ public final class AccessibilityWindowInfo implements Parcelable {
     * @hide
     */
    public static String typeToString(int type) {
        if (Flags.enableTypeWindowControl() && type == TYPE_WINDOW_CONTROL) {
            return "TYPE_WINDOW_CONTROL";
        }

        switch (type) {
            case TYPE_APPLICATION: {
                return "TYPE_APPLICATION";
@@ -903,10 +899,14 @@ public final class AccessibilityWindowInfo implements Parcelable {
            case TYPE_MAGNIFICATION_OVERLAY: {
                return "TYPE_MAGNIFICATION_OVERLAY";
            }
            default:
            default: {
                if (Flags.enableTypeWindowControl() && type == TYPE_WINDOW_CONTROL) {
                    return "TYPE_WINDOW_CONTROL";
                }
                return "<UNKNOWN:" + type + ">";
            }
        }
    }

    /**
     * Reports how this window differs from a possibly different state of the same window. The