diff --git a/res/layout/notification_history.xml b/res/layout/notification_history.xml index b3308c5ffb0..1fc07006106 100644 --- a/res/layout/notification_history.xml +++ b/res/layout/notification_history.xml @@ -69,7 +69,7 @@ android:layout_gravity="center_horizontal" android:textAlignment="center" android:textAppearance="?android:attr/textAppearanceSmall" - android:text="@string/notification_history_summary" /> + android:text="@string/notification_history_off_summary" /> Notification log Notification history - Today + Last 24 hours Snoozed Recently dismissed @@ -8073,19 +8073,19 @@ Automatically show suggested actions & replies - Turn on notification history to keep track of past notifications and snoozed notifications + Show recent and snoozed notifications Notification history - Turn on history + Use notification history - - Turn off history + + Notification history turned off - - Notification history is turned off + + Turn on notification history to see recent notifications and snoozed notifications view notification settings diff --git a/src/com/android/settings/notification/history/NotificationHistoryActivity.java b/src/com/android/settings/notification/history/NotificationHistoryActivity.java index 8c00b5dc88c..0fbb9181c6c 100644 --- a/src/com/android/settings/notification/history/NotificationHistoryActivity.java +++ b/src/com/android/settings/notification/history/NotificationHistoryActivity.java @@ -116,6 +116,7 @@ public class NotificationHistoryActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + setTitle(R.string.notification_history); setContentView(R.layout.notification_history); mTodayView = findViewById(R.id.apps); mSnoozeView = findViewById(R.id.snoozed_list); @@ -161,8 +162,8 @@ public class NotificationHistoryActivity extends Activity { private void bindSwitch() { SwitchBar bar = findViewById(R.id.switch_bar); if (bar != null) { - bar.setSwitchBarText(R.string.notification_history_turn_off, - R.string.notification_history_turn_on); + bar.setSwitchBarText(R.string.notification_history_toggle, + R.string.notification_history_toggle); bar.show(); try { bar.addOnSwitchChangeListener(mOnSwitchClickListener); diff --git a/src/com/android/settings/notification/history/NotificationSbnAdapter.java b/src/com/android/settings/notification/history/NotificationSbnAdapter.java index 2a7bed2c3b0..ca2bfcbc5ed 100644 --- a/src/com/android/settings/notification/history/NotificationSbnAdapter.java +++ b/src/com/android/settings/notification/history/NotificationSbnAdapter.java @@ -23,6 +23,8 @@ import static android.os.UserHandle.USER_ALL; import static android.os.UserHandle.USER_CURRENT; import android.annotation.ColorInt; +import android.annotation.UserIdInt; +import android.app.ActivityManager; import android.app.Notification; import android.content.Context; import android.content.pm.ApplicationInfo; @@ -46,6 +48,7 @@ import com.android.internal.util.ContrastColorUtil; import com.android.settings.R; import java.util.ArrayList; +import java.util.Currency; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -60,6 +63,7 @@ public class NotificationSbnAdapter extends private PackageManager mPm; private @ColorInt int mBackgroundColor; private boolean mInNightMode; + private @UserIdInt int mCurrentUser; public NotificationSbnAdapter(Context context, PackageManager pm) { mContext = context; @@ -71,6 +75,7 @@ public class NotificationSbnAdapter extends Configuration currentConfig = mContext.getResources().getConfiguration(); mInNightMode = (currentConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + mCurrentUser = ActivityManager.getCurrentUser(); setHasStableIds(true); } @@ -188,7 +193,7 @@ public class NotificationSbnAdapter extends private int normalizeUserId(StatusBarNotification sbn) { int userId = sbn.getUserId(); if (userId == USER_ALL) { - userId = USER_CURRENT; + userId = mCurrentUser; } return userId; }