Merge "Show correct dialog for paused profile widgets" into udc-dev am: bb9e856e99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23122029 Change-Id: Icc2fa602925e3827c0deef1099725d6279c71f80 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -558,10 +558,14 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
|
|||||||
try {
|
try {
|
||||||
final Intent onClickIntent;
|
final Intent onClickIntent;
|
||||||
|
|
||||||
if (provider.maskedBySuspendedPackage) {
|
if (provider.maskedByQuietProfile) {
|
||||||
|
showBadge = true;
|
||||||
|
onClickIntent = UnlaunchableAppActivity.createInQuietModeDialogIntent(appUserId);
|
||||||
|
} else if (provider.maskedBySuspendedPackage) {
|
||||||
showBadge = mUserManager.hasBadge(appUserId);
|
showBadge = mUserManager.hasBadge(appUserId);
|
||||||
final String suspendingPackage = mPackageManagerInternal.getSuspendingPackage(
|
final String suspendingPackage = mPackageManagerInternal.getSuspendingPackage(
|
||||||
appInfo.packageName, appUserId);
|
appInfo.packageName, appUserId);
|
||||||
|
// TODO(b/281839596): don't rely on platform always meaning suspended by admin.
|
||||||
if (PLATFORM_PACKAGE_NAME.equals(suspendingPackage)) {
|
if (PLATFORM_PACKAGE_NAME.equals(suspendingPackage)) {
|
||||||
onClickIntent = mDevicePolicyManagerInternal.createShowAdminSupportIntent(
|
onClickIntent = mDevicePolicyManagerInternal.createShowAdminSupportIntent(
|
||||||
appUserId, true);
|
appUserId, true);
|
||||||
@@ -575,9 +579,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
|
|||||||
appInfo.packageName, suspendingPackage, dialogInfo, null, null,
|
appInfo.packageName, suspendingPackage, dialogInfo, null, null,
|
||||||
appUserId);
|
appUserId);
|
||||||
}
|
}
|
||||||
} else if (provider.maskedByQuietProfile) {
|
|
||||||
showBadge = true;
|
|
||||||
onClickIntent = UnlaunchableAppActivity.createInQuietModeDialogIntent(appUserId);
|
|
||||||
} else /* provider.maskedByLockedProfile */ {
|
} else /* provider.maskedByLockedProfile */ {
|
||||||
showBadge = true;
|
showBadge = true;
|
||||||
onClickIntent = mKeyguardManager
|
onClickIntent = mKeyguardManager
|
||||||
|
|||||||
Reference in New Issue
Block a user