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

Commit b901d60f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move system Toast layer to same as system error." into main

parents 201e6965 0fc95277
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -544,8 +544,18 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
            case TYPE_SYSTEM_DIALOG:
                return  6;
            case TYPE_TOAST:
                if (Flags.bugToastsOnTopOfBubble()) {
                    // system added toasts must be on top of any always-on-top windows.
                    // toasts and the plugged-in battery thing
                    // canAddInternalSystemWindow is to distinguish between legacy toasts and ones
                    // managed by the system. A legacy toast can have an arbitrary view and tap jack
                    // other views. Toasts are given low priority to prevent this. Toasts added by
                    // the system are safe and can have higher visibility.
                    return canAddInternalSystemWindow ? 27 : 7;
                } else {
                    // toasts and the plugged-in battery thing
                    return 7;
                }
            case TYPE_PRIORITY_PHONE:
                // SIM errors and unlock.  Not sure if this really should be in a high layer.
                return  8;
+10 −0
Original line number Diff line number Diff line
@@ -7,3 +7,13 @@ flag {
    description: "Whether or not window policy allows injecting input wake-up delegate."
    bug: "319132073"
}

flag {
    name: "bug_toasts_on_top_of_bubble"
    namespace: "windowing_sdk"
    description: "Show system added toasts at same level as system error."
    bug: "409222337"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}
 No newline at end of file