Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 039bc9e9 authored by Pavel Grafov's avatar Pavel Grafov Committed by Automerger Merge Worker
Browse files

Merge "Add button to personal apps suspension notification" into rvc-dev am:...

Merge "Add button to personal apps suspension notification" into rvc-dev am: 9bdf5405 am: d4e7c5d3

Change-Id: I6823665ceff3f8da99c64ee9296e9c8b84fefb76
parents 771be35e d4e7c5d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1200,6 +1200,7 @@
  <java-symbol type="string" name="personal_apps_suspension_title" />
  <java-symbol type="string" name="personal_apps_suspension_tomorrow_text" />
  <java-symbol type="string" name="personal_apps_suspension_text" />
  <java-symbol type="string" name="personal_apps_suspended_turn_profile_on" />
  <java-symbol type="string" name="factory_reset_warning" />
  <java-symbol type="string" name="factory_reset_message" />
  <java-symbol type="string" name="lockscreen_transport_play_description" />
+8 −1
Original line number Diff line number Diff line
@@ -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);