Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java +6 −2 Original line number Diff line number Diff line Loading @@ -88,8 +88,8 @@ public class NotificationConversationInfo extends LinearLayout implements private INotificationManager mINotificationManager; ShortcutManager mShortcutManager; private PackageManager mPm; private VisualStabilityManager mVisualStabilityManager; private ConversationIconFactory mIconFactory; private VisualStabilityManager mVisualStabilityManager; private String mPackageName; private String mAppName; Loading @@ -108,7 +108,9 @@ public class NotificationConversationInfo extends LinearLayout implements private TextView mPriorityDescriptionView; private TextView mDefaultDescriptionView; private TextView mSilentDescriptionView; private @Action int mSelectedAction = -1; private boolean mPressedApply; private OnSnoozeClickListener mOnSnoozeClickListener; private OnSettingsClickListener mOnSettingsClickListener; Loading Loading @@ -160,6 +162,7 @@ public class NotificationConversationInfo extends LinearLayout implements }; private OnClickListener mOnDone = v -> { mPressedApply = true; closeControls(v, true); }; Loading Loading @@ -521,6 +524,7 @@ public class NotificationConversationInfo extends LinearLayout implements bgHandler.post( new UpdateChannelRunnable(mINotificationManager, mPackageName, mAppUid, mSelectedAction, mNotificationChannel)); mVisualStabilityManager.temporarilyAllowReordering(); } private boolean shouldShowPriorityOnboarding() { Loading Loading @@ -587,7 +591,7 @@ public class NotificationConversationInfo extends LinearLayout implements @Override public boolean shouldBeSaved() { return mSelectedAction == ACTION_FAVORITE || mSelectedAction == ACTION_MUTE; return mPressedApply; } @Override Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { .isEqualTo(GONE); // no changes until hit done assertFalse(mNotificationInfo.shouldBeSaved()); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); assertFalse(mConversationChannel.isImportantConversation()); Loading Loading @@ -637,6 +638,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { .isEqualTo(GONE); // no changes until hit done assertFalse(mNotificationInfo.shouldBeSaved()); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); assertFalse(mConversationChannel.isImportantConversation()); Loading Loading @@ -679,6 +681,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { .isEqualTo(VISIBLE); // no changes until save assertFalse(mNotificationInfo.shouldBeSaved()); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); assertEquals(IMPORTANCE_DEFAULT, mConversationChannel.getImportance()); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java +6 −2 Original line number Diff line number Diff line Loading @@ -88,8 +88,8 @@ public class NotificationConversationInfo extends LinearLayout implements private INotificationManager mINotificationManager; ShortcutManager mShortcutManager; private PackageManager mPm; private VisualStabilityManager mVisualStabilityManager; private ConversationIconFactory mIconFactory; private VisualStabilityManager mVisualStabilityManager; private String mPackageName; private String mAppName; Loading @@ -108,7 +108,9 @@ public class NotificationConversationInfo extends LinearLayout implements private TextView mPriorityDescriptionView; private TextView mDefaultDescriptionView; private TextView mSilentDescriptionView; private @Action int mSelectedAction = -1; private boolean mPressedApply; private OnSnoozeClickListener mOnSnoozeClickListener; private OnSettingsClickListener mOnSettingsClickListener; Loading Loading @@ -160,6 +162,7 @@ public class NotificationConversationInfo extends LinearLayout implements }; private OnClickListener mOnDone = v -> { mPressedApply = true; closeControls(v, true); }; Loading Loading @@ -521,6 +524,7 @@ public class NotificationConversationInfo extends LinearLayout implements bgHandler.post( new UpdateChannelRunnable(mINotificationManager, mPackageName, mAppUid, mSelectedAction, mNotificationChannel)); mVisualStabilityManager.temporarilyAllowReordering(); } private boolean shouldShowPriorityOnboarding() { Loading Loading @@ -587,7 +591,7 @@ public class NotificationConversationInfo extends LinearLayout implements @Override public boolean shouldBeSaved() { return mSelectedAction == ACTION_FAVORITE || mSelectedAction == ACTION_MUTE; return mPressedApply; } @Override Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { .isEqualTo(GONE); // no changes until hit done assertFalse(mNotificationInfo.shouldBeSaved()); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); assertFalse(mConversationChannel.isImportantConversation()); Loading Loading @@ -637,6 +638,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { .isEqualTo(GONE); // no changes until hit done assertFalse(mNotificationInfo.shouldBeSaved()); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); assertFalse(mConversationChannel.isImportantConversation()); Loading Loading @@ -679,6 +681,7 @@ public class NotificationConversationInfoTest extends SysuiTestCase { .isEqualTo(VISIBLE); // no changes until save assertFalse(mNotificationInfo.shouldBeSaved()); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); assertEquals(IMPORTANCE_DEFAULT, mConversationChannel.getImportance()); Loading