Loading services/core/java/com/android/server/policy/WindowManagerPolicy.java +12 −2 Original line number Diff line number Diff line Loading @@ -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; Loading services/core/java/com/android/server/policy/window_policy_flags.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
services/core/java/com/android/server/policy/WindowManagerPolicy.java +12 −2 Original line number Diff line number Diff line Loading @@ -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; Loading
services/core/java/com/android/server/policy/window_policy_flags.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -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