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

Commit 0fc95277 authored by Diego Vela's avatar Diego Vela
Browse files

Move system Toast layer to same as system error.

Move the system Toast layer to be the same as the system error. Toasts
are showing below bubbled activities because they are on a lower layer.

Flag: com.android.server.policy.bug_toasts_on_top_of_bubble
Bug: 409222337
Test: manual - use bubbles test app and launch a Toast message.
Change-Id: I0a9c3d3c4db196c9f889c1d86c892755ea5e0559
parent 0429cba8
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