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

Commit 1d5934de authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make notification match the mocks." into rvc-dev

parents 48695505 f89d3f9f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35,4 +35,6 @@

    <color name="resolver_empty_state_text">#FFFFFF</color>
    <color name="resolver_empty_state_icon">#FFFFFF</color>

    <color name="personal_apps_suspension_notification_color">#8AB4F8</color>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -231,5 +231,8 @@
    <color name="resolver_empty_state_text">#FF202124</color>
    <color name="resolver_empty_state_icon">#FF5F6368</color>

    <!-- Color for personal app suspension notification button text and icon tint. -->
    <color name="personal_apps_suspension_notification_color">#1A73E8</color>

    <color name="conversation_important_highlight">#F9AB00</color>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -1203,6 +1203,7 @@
  <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="notification_work_profile_content_description" />
  <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" />
@@ -4006,6 +4007,8 @@
  <java-symbol type="string" name="notification_channel_network_alerts" />
  <java-symbol type="string" name="notification_channel_network_available" />

  <java-symbol type="color" name="personal_apps_suspension_notification_color" />

  <!-- For Pdn throttle feature -->
  <java-symbol type="bool" name="config_pdp_reject_enable_retry" />
  <java-symbol type="integer" name="config_pdp_reject_retry_delay_ms" />
+8 −2
Original line number Diff line number Diff line
@@ -16150,18 +16150,24 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                ? R.string.personal_apps_suspension_tomorrow_text
                : R.string.personal_apps_suspension_text);
        final boolean ongoing = notificationState == PROFILE_OFF_DEADLINE_REACHED;
        final int color = mContext.getColor(R.color.personal_apps_suspension_notification_color);
        final Bundle extras = new Bundle();
        // TODO: Create a separate string for this.
        extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME,
                mContext.getString(R.string.notification_work_profile_content_description));
        final Notification notification =
                new Notification.Builder(mContext, SystemNotificationChannels.DEVICE_ADMIN)
                        .setSmallIcon(android.R.drawable.stat_sys_warning)
                        .setSmallIcon(R.drawable.ic_corp_badge_no_background)
                        .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))
                        .setColor(color)
                        .addAction(turnProfileOnButton)
                        .addExtras(extras)
                        .build();
        mInjector.getNotificationManager().notify(
                SystemMessage.NOTE_PERSONAL_APPS_SUSPENDED, notification);