diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 88161f6024fc6..53e0bf9c2a318 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1200,6 +1200,7 @@ + diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index d81f31ac4f173..3323fa4b53e3e 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -16134,6 +16134,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { final PendingIntent pendingIntent = mInjector.pendingIntentGetBroadcast(mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_UPDATE_CURRENT); + final String buttonText = + mContext.getString(R.string.personal_apps_suspended_turn_profile_on); + final Notification.Action turnProfileOnButton = + new Notification.Action.Builder(null /* icon */, buttonText, pendingIntent).build(); + final String text = mContext.getString( notificationState == PROFILE_OFF_DEADLINE_WARNING ? R.string.personal_apps_suspension_tomorrow_text @@ -16144,11 +16149,13 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { new Notification.Builder(mContext, SystemNotificationChannels.DEVICE_ADMIN) .setSmallIcon(android.R.drawable.stat_sys_warning) .setOngoing(ongoing) + .setAutoCancel(false) .setContentTitle(mContext.getString( R.string.personal_apps_suspension_title)) .setContentText(text) + .setStyle(new Notification.BigTextStyle().bigText(text)) .setColor(mContext.getColor(R.color.system_notification_accent_color)) - .setContentIntent(pendingIntent) + .addAction(turnProfileOnButton) .build(); mInjector.getNotificationManager().notify( SystemMessage.NOTE_PERSONAL_APPS_SUSPENDED, notification);