Handle AppWarnings per-user per-display
Previously, AppWarning dialogs were not handled per-user per-display
and that caused the following issues:
- AppWarning dialogs were managed based on the default display and the
system user. Therefore, all the warning dialogs were only shown on
the default display even if it's for the app running on the secondary
display.
In addition, it could only receive Intent.ACTION_CLOSE_SYSTEM_DIALOGS
delivered to the system user regardless of who the actual user is.
- The warning dialog could be shown to the only one user at a time.
In 'MUMD'(multi-user on multiple displays), each warning dialog should
be shown to each user independently, but it wasn't.
- The flags that determine whether to hide the warning dialog were
handled per package, but not per user. As a result, flags set by
one user for specific package were also applied to other users.
To fix these, ensure that the warning dialogs are handled per-user and
per-display for MUMD devices. Please note that handling the warning
dialogs per-user per-display is only applicable to the devices that
enable the visible background users.
Bug: 296334639
Test: Manual test
(cherry picked from https://partner-android-review.googlesource.com/q/commit:1e099c7254ab802b747595b1180ee39b9a1674ba)
Change-Id: I3cdad53172748c452a941b8a798c3a799d9028c0
6 files changed