Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -40924,12 +40924,12 @@ package android.service.notification { public static class NotificationListenerService.Ranking { ctor public NotificationListenerService.Ranking(); method public boolean audiblyAlerted(); method public boolean canShowBadge(); method public android.app.NotificationChannel getChannel(); method public int getImportance(); method public java.lang.CharSequence getImportanceExplanation(); method public java.lang.String getKey(); method public long getLastAudiblyAlertedMillis(); method public java.lang.String getOverrideGroupKey(); method public int getRank(); method public int getSuppressedVisualEffects(); core/java/android/service/notification/NotificationListenerService.java +24 −16 Original line number Diff line number Diff line Loading @@ -1482,7 +1482,7 @@ public abstract class NotificationListenerService extends Service { private boolean mShowBadge; private @UserSentiment int mUserSentiment = USER_SENTIMENT_NEUTRAL; private boolean mHidden; private boolean mAudiblyAlerted; private long mLastAudiblyAlertedMs; private boolean mNoisy; private ArrayList<Notification.Action> mSmartActions; private ArrayList<CharSequence> mSmartReplies; Loading Loading @@ -1650,12 +1650,12 @@ public abstract class NotificationListenerService extends Service { } /** * Returns whether this notification alerted the user via sound or vibration. * Returns the last time this notification alerted the user via sound or vibration. * * @return true if the notification alerted the user, false otherwise. * @return the time of the last alerting behavior, in milliseconds. */ public boolean audiblyAlerted() { return mAudiblyAlerted; public long getLastAudiblyAlertedMillis() { return mLastAudiblyAlertedMs; } /** @hide */ Loading @@ -1672,7 +1672,7 @@ public abstract class NotificationListenerService extends Service { CharSequence explanation, String overrideGroupKey, NotificationChannel channel, ArrayList<String> overridePeople, ArrayList<SnoozeCriterion> snoozeCriteria, boolean showBadge, int userSentiment, boolean hidden, boolean audiblyAlerted, int userSentiment, boolean hidden, long lastAudiblyAlertedMs, boolean noisy, ArrayList<Notification.Action> smartActions, ArrayList<CharSequence> smartReplies) { mKey = key; Loading @@ -1690,7 +1690,7 @@ public abstract class NotificationListenerService extends Service { mShowBadge = showBadge; mUserSentiment = userSentiment; mHidden = hidden; mAudiblyAlerted = audiblyAlerted; mLastAudiblyAlertedMs = lastAudiblyAlertedMs; mNoisy = noisy; mSmartActions = smartActions; mSmartReplies = smartReplies; Loading Loading @@ -1743,7 +1743,7 @@ public abstract class NotificationListenerService extends Service { private ArrayMap<String, Boolean> mShowBadge; private ArrayMap<String, Integer> mUserSentiment; private ArrayMap<String, Boolean> mHidden; private ArrayMap<String, Boolean> mAudiblyAlerted; private ArrayMap<String, Long> mLastAudiblyAlerted; private ArrayMap<String, Boolean> mNoisy; private ArrayMap<String, ArrayList<Notification.Action>> mSmartActions; private ArrayMap<String, ArrayList<CharSequence>> mSmartReplies; Loading Loading @@ -1776,7 +1776,7 @@ public abstract class NotificationListenerService extends Service { getImportance(key), getImportanceExplanation(key), getOverrideGroupKey(key), getChannel(key), getOverridePeople(key), getSnoozeCriteria(key), getShowBadge(key), getUserSentiment(key), getHidden(key), getAudiblyAlerted(key), getNoisy(key), getSmartActions(key), getLastAudiblyAlerted(key), getNoisy(key), getSmartActions(key), getSmartReplies(key)); return rank >= 0; } Loading Loading @@ -1915,14 +1915,14 @@ public abstract class NotificationListenerService extends Service { return hidden == null ? false : hidden.booleanValue(); } private boolean getAudiblyAlerted(String key) { private long getLastAudiblyAlerted(String key) { synchronized (this) { if (mAudiblyAlerted == null) { buildAudiblyAlertedLocked(); if (mLastAudiblyAlerted == null) { buildLastAudiblyAlertedLocked(); } } Boolean audiblyAlerted = mAudiblyAlerted.get(key); return audiblyAlerted == null ? false : audiblyAlerted.booleanValue(); Long lastAudibleAlerted = mLastAudiblyAlerted.get(key); return lastAudibleAlerted == null ? -1 : lastAudibleAlerted.longValue(); } private boolean getNoisy(String key) { Loading Loading @@ -1994,6 +1994,14 @@ public abstract class NotificationListenerService extends Service { return newMap; } private ArrayMap<String, Long> buildLongMapFromBundle(Bundle bundle) { ArrayMap<String, Long> newMap = new ArrayMap<>(bundle.size()); for (String key : bundle.keySet()) { newMap.put(key, bundle.getLong(key)); } return newMap; } // Locked by 'this' private void buildVisibilityOverridesLocked() { mVisibilityOverrides = buildIntMapFromBundle(mRankingUpdate.getVisibilityOverrides()); Loading Loading @@ -2070,8 +2078,8 @@ public abstract class NotificationListenerService extends Service { } // Locked by 'this' private void buildAudiblyAlertedLocked() { mAudiblyAlerted = buildBooleanMapFromBundle(mRankingUpdate.getAudiblyAlerted()); private void buildLastAudiblyAlertedLocked() { mLastAudiblyAlerted = buildLongMapFromBundle(mRankingUpdate.getLastAudiblyAlerted()); } // Locked by 'this' Loading core/java/android/service/notification/NotificationRankingUpdate.java +7 −7 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ public class NotificationRankingUpdate implements Parcelable { private final Bundle mHidden; private final Bundle mSmartActions; private final Bundle mSmartReplies; private final Bundle mAudiblyAlerted; private final Bundle mLastAudiblyAlerted; private final Bundle mNoisy; public NotificationRankingUpdate(String[] keys, String[] interceptedKeys, Loading @@ -47,7 +47,7 @@ public class NotificationRankingUpdate implements Parcelable { int[] importance, Bundle explanation, Bundle overrideGroupKeys, Bundle channels, Bundle overridePeople, Bundle snoozeCriteria, Bundle showBadge, Bundle userSentiment, Bundle hidden, Bundle smartActions, Bundle smartReplies, Bundle audiblyAlerted, Bundle noisy) { Bundle smartReplies, Bundle lastAudiblyAlerted, Bundle noisy) { mKeys = keys; mInterceptedKeys = interceptedKeys; mVisibilityOverrides = visibilityOverrides; Loading @@ -63,7 +63,7 @@ public class NotificationRankingUpdate implements Parcelable { mHidden = hidden; mSmartActions = smartActions; mSmartReplies = smartReplies; mAudiblyAlerted = audiblyAlerted; mLastAudiblyAlerted = lastAudiblyAlerted; mNoisy = noisy; } Loading @@ -84,7 +84,7 @@ public class NotificationRankingUpdate implements Parcelable { mHidden = in.readBundle(); mSmartActions = in.readBundle(); mSmartReplies = in.readBundle(); mAudiblyAlerted = in.readBundle(); mLastAudiblyAlerted = in.readBundle(); mNoisy = in.readBundle(); } Loading @@ -110,7 +110,7 @@ public class NotificationRankingUpdate implements Parcelable { out.writeBundle(mHidden); out.writeBundle(mSmartActions); out.writeBundle(mSmartReplies); out.writeBundle(mAudiblyAlerted); out.writeBundle(mLastAudiblyAlerted); out.writeBundle(mNoisy); } Loading Loading @@ -185,8 +185,8 @@ public class NotificationRankingUpdate implements Parcelable { return mSmartReplies; } public Bundle getAudiblyAlerted() { return mAudiblyAlerted; public Bundle getLastAudiblyAlerted() { return mLastAudiblyAlerted; } public Bundle getNoisy() { Loading core/java/android/view/NotificationHeaderView.java +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ public class NotificationHeaderView extends ViewGroup { } /** Updates icon visibility based on the noisiness of the notification. */ public void setAudiblyAlerted(boolean audiblyAlerted) { public void setRecentlyAudiblyAlerted(boolean audiblyAlerted) { mAudiblyAlertedIcon.setVisibility(audiblyAlerted ? View.VISIBLE : View.GONE); } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ public class NotificationViewHierarchyManager { } row.showAppOpsIcons(entry.mActiveAppOps); row.setAudiblyAlerted(entry.audiblyAlerted); row.setLastAudiblyAlertedMs(entry.lastAudiblyAlertedMs); } Trace.beginSection("NotificationPresenter#onUpdateRowStates"); Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -40924,12 +40924,12 @@ package android.service.notification { public static class NotificationListenerService.Ranking { ctor public NotificationListenerService.Ranking(); method public boolean audiblyAlerted(); method public boolean canShowBadge(); method public android.app.NotificationChannel getChannel(); method public int getImportance(); method public java.lang.CharSequence getImportanceExplanation(); method public java.lang.String getKey(); method public long getLastAudiblyAlertedMillis(); method public java.lang.String getOverrideGroupKey(); method public int getRank(); method public int getSuppressedVisualEffects();
core/java/android/service/notification/NotificationListenerService.java +24 −16 Original line number Diff line number Diff line Loading @@ -1482,7 +1482,7 @@ public abstract class NotificationListenerService extends Service { private boolean mShowBadge; private @UserSentiment int mUserSentiment = USER_SENTIMENT_NEUTRAL; private boolean mHidden; private boolean mAudiblyAlerted; private long mLastAudiblyAlertedMs; private boolean mNoisy; private ArrayList<Notification.Action> mSmartActions; private ArrayList<CharSequence> mSmartReplies; Loading Loading @@ -1650,12 +1650,12 @@ public abstract class NotificationListenerService extends Service { } /** * Returns whether this notification alerted the user via sound or vibration. * Returns the last time this notification alerted the user via sound or vibration. * * @return true if the notification alerted the user, false otherwise. * @return the time of the last alerting behavior, in milliseconds. */ public boolean audiblyAlerted() { return mAudiblyAlerted; public long getLastAudiblyAlertedMillis() { return mLastAudiblyAlertedMs; } /** @hide */ Loading @@ -1672,7 +1672,7 @@ public abstract class NotificationListenerService extends Service { CharSequence explanation, String overrideGroupKey, NotificationChannel channel, ArrayList<String> overridePeople, ArrayList<SnoozeCriterion> snoozeCriteria, boolean showBadge, int userSentiment, boolean hidden, boolean audiblyAlerted, int userSentiment, boolean hidden, long lastAudiblyAlertedMs, boolean noisy, ArrayList<Notification.Action> smartActions, ArrayList<CharSequence> smartReplies) { mKey = key; Loading @@ -1690,7 +1690,7 @@ public abstract class NotificationListenerService extends Service { mShowBadge = showBadge; mUserSentiment = userSentiment; mHidden = hidden; mAudiblyAlerted = audiblyAlerted; mLastAudiblyAlertedMs = lastAudiblyAlertedMs; mNoisy = noisy; mSmartActions = smartActions; mSmartReplies = smartReplies; Loading Loading @@ -1743,7 +1743,7 @@ public abstract class NotificationListenerService extends Service { private ArrayMap<String, Boolean> mShowBadge; private ArrayMap<String, Integer> mUserSentiment; private ArrayMap<String, Boolean> mHidden; private ArrayMap<String, Boolean> mAudiblyAlerted; private ArrayMap<String, Long> mLastAudiblyAlerted; private ArrayMap<String, Boolean> mNoisy; private ArrayMap<String, ArrayList<Notification.Action>> mSmartActions; private ArrayMap<String, ArrayList<CharSequence>> mSmartReplies; Loading Loading @@ -1776,7 +1776,7 @@ public abstract class NotificationListenerService extends Service { getImportance(key), getImportanceExplanation(key), getOverrideGroupKey(key), getChannel(key), getOverridePeople(key), getSnoozeCriteria(key), getShowBadge(key), getUserSentiment(key), getHidden(key), getAudiblyAlerted(key), getNoisy(key), getSmartActions(key), getLastAudiblyAlerted(key), getNoisy(key), getSmartActions(key), getSmartReplies(key)); return rank >= 0; } Loading Loading @@ -1915,14 +1915,14 @@ public abstract class NotificationListenerService extends Service { return hidden == null ? false : hidden.booleanValue(); } private boolean getAudiblyAlerted(String key) { private long getLastAudiblyAlerted(String key) { synchronized (this) { if (mAudiblyAlerted == null) { buildAudiblyAlertedLocked(); if (mLastAudiblyAlerted == null) { buildLastAudiblyAlertedLocked(); } } Boolean audiblyAlerted = mAudiblyAlerted.get(key); return audiblyAlerted == null ? false : audiblyAlerted.booleanValue(); Long lastAudibleAlerted = mLastAudiblyAlerted.get(key); return lastAudibleAlerted == null ? -1 : lastAudibleAlerted.longValue(); } private boolean getNoisy(String key) { Loading Loading @@ -1994,6 +1994,14 @@ public abstract class NotificationListenerService extends Service { return newMap; } private ArrayMap<String, Long> buildLongMapFromBundle(Bundle bundle) { ArrayMap<String, Long> newMap = new ArrayMap<>(bundle.size()); for (String key : bundle.keySet()) { newMap.put(key, bundle.getLong(key)); } return newMap; } // Locked by 'this' private void buildVisibilityOverridesLocked() { mVisibilityOverrides = buildIntMapFromBundle(mRankingUpdate.getVisibilityOverrides()); Loading Loading @@ -2070,8 +2078,8 @@ public abstract class NotificationListenerService extends Service { } // Locked by 'this' private void buildAudiblyAlertedLocked() { mAudiblyAlerted = buildBooleanMapFromBundle(mRankingUpdate.getAudiblyAlerted()); private void buildLastAudiblyAlertedLocked() { mLastAudiblyAlerted = buildLongMapFromBundle(mRankingUpdate.getLastAudiblyAlerted()); } // Locked by 'this' Loading
core/java/android/service/notification/NotificationRankingUpdate.java +7 −7 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ public class NotificationRankingUpdate implements Parcelable { private final Bundle mHidden; private final Bundle mSmartActions; private final Bundle mSmartReplies; private final Bundle mAudiblyAlerted; private final Bundle mLastAudiblyAlerted; private final Bundle mNoisy; public NotificationRankingUpdate(String[] keys, String[] interceptedKeys, Loading @@ -47,7 +47,7 @@ public class NotificationRankingUpdate implements Parcelable { int[] importance, Bundle explanation, Bundle overrideGroupKeys, Bundle channels, Bundle overridePeople, Bundle snoozeCriteria, Bundle showBadge, Bundle userSentiment, Bundle hidden, Bundle smartActions, Bundle smartReplies, Bundle audiblyAlerted, Bundle noisy) { Bundle smartReplies, Bundle lastAudiblyAlerted, Bundle noisy) { mKeys = keys; mInterceptedKeys = interceptedKeys; mVisibilityOverrides = visibilityOverrides; Loading @@ -63,7 +63,7 @@ public class NotificationRankingUpdate implements Parcelable { mHidden = hidden; mSmartActions = smartActions; mSmartReplies = smartReplies; mAudiblyAlerted = audiblyAlerted; mLastAudiblyAlerted = lastAudiblyAlerted; mNoisy = noisy; } Loading @@ -84,7 +84,7 @@ public class NotificationRankingUpdate implements Parcelable { mHidden = in.readBundle(); mSmartActions = in.readBundle(); mSmartReplies = in.readBundle(); mAudiblyAlerted = in.readBundle(); mLastAudiblyAlerted = in.readBundle(); mNoisy = in.readBundle(); } Loading @@ -110,7 +110,7 @@ public class NotificationRankingUpdate implements Parcelable { out.writeBundle(mHidden); out.writeBundle(mSmartActions); out.writeBundle(mSmartReplies); out.writeBundle(mAudiblyAlerted); out.writeBundle(mLastAudiblyAlerted); out.writeBundle(mNoisy); } Loading Loading @@ -185,8 +185,8 @@ public class NotificationRankingUpdate implements Parcelable { return mSmartReplies; } public Bundle getAudiblyAlerted() { return mAudiblyAlerted; public Bundle getLastAudiblyAlerted() { return mLastAudiblyAlerted; } public Bundle getNoisy() { Loading
core/java/android/view/NotificationHeaderView.java +1 −1 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ public class NotificationHeaderView extends ViewGroup { } /** Updates icon visibility based on the noisiness of the notification. */ public void setAudiblyAlerted(boolean audiblyAlerted) { public void setRecentlyAudiblyAlerted(boolean audiblyAlerted) { mAudiblyAlertedIcon.setVisibility(audiblyAlerted ? View.VISIBLE : View.GONE); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ public class NotificationViewHierarchyManager { } row.showAppOpsIcons(entry.mActiveAppOps); row.setAudiblyAlerted(entry.audiblyAlerted); row.setLastAudiblyAlertedMs(entry.lastAudiblyAlertedMs); } Trace.beginSection("NotificationPresenter#onUpdateRowStates"); Loading