Show error dialogs(ANR, crash) for the visible background users
In a car environment, error dialogs are not displayed by default when
an ANR or a crash occurs. However, this can confuse the passenger users
and leave them uninformed when an app is terminated by an ANR or a crash
without any notification. To address this, error dialogs are allowed for
the passenger users who have UI access on assigned displays
(a.k.a. visible background users) on devices that have
config_multiuserVisibleBackgroundUsers enabled.
Accordingly, this patch fixes
CtsAppTestCases:ActivityManagerTest#testGetProcessInErrorState fail for
visible background users.
Bug: 342315883
Flag: EXEMPT bugfix (does not affect phones)
Test: manually verified that error dialogs are shown when an ANR or a
crash occurs for the visible background user.
Test: atest --user-type secondary_user_on_secondary_display CtsAppTestCases:ActivityManagerTest#testGetProcessInErrorState
Test: atest CtsAppTestCases:ActivityManagerTest#testGetProcessInErrorState
Test: atest ActivityTaskManagerServiceTests
Signed-off-by: Dohyun Lee <dohyun.lee@lge.com>
(cherry picked from https://partner-android-review.git.corp.google.com/c/platform/frameworks/base/+/2837587)
Change-Id: If0733679d2fb8622634568827d7238aab43df800
Signed-off-by: Dohyun Lee <dohyun.lee@lge.com>
3 files changed