Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java +1 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl mMenuContainer = new FrameLayout(mContext); } final boolean newFlowHideShelf = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_NOTIF_DISMISS, 0) == 1; Settings.Global.SHOW_NEW_NOTIF_DISMISS, 1 /* on by default */) == 1; if (newFlowHideShelf) { return; } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +3 −3 Original line number Diff line number Diff line Loading @@ -834,9 +834,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (!mShouldDrawNotificationBackground) { return; } final boolean clearUndershelf = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_NOTIF_DISMISS, 0 /* show background by default */) == 1; if (clearUndershelf) { final boolean newFlowHideShelf = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_NOTIF_DISMISS, 1 /* on by default */) == 1; if (newFlowHideShelf) { mBackgroundPaint.setColor(Color.TRANSPARENT); invalidate(); return; Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationMenuRowTest.java +17 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package com.android.systemui.statusbar.notification.row; import static android.provider.Settings.Secure.SHOW_NOTIFICATION_SNOOZE; import static android.provider.Settings.Global.SHOW_NEW_NOTIF_DISMISS; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; Loading Loading @@ -96,6 +97,7 @@ public class NotificationMenuRowTest extends LeakCheckedTest { @Test public void testNoAppOpsInSlowSwipe() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 0); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 0); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); Loading @@ -108,6 +110,7 @@ public class NotificationMenuRowTest extends LeakCheckedTest { @Test public void testNoSnoozeInSlowSwipe() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 0); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 0); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); Loading @@ -120,6 +123,7 @@ public class NotificationMenuRowTest extends LeakCheckedTest { @Test public void testSnoozeInSlowSwipe() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 1); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 0); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); Loading @@ -129,6 +133,19 @@ public class NotificationMenuRowTest extends LeakCheckedTest { assertEquals(2, container.getChildCount()); } @Test public void testSlowSwipe_newDismiss() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 1); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 1); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); ViewGroup container = (ViewGroup) row.getMenuView(); // Clear menu assertEquals(0, container.getChildCount()); } @Test public void testIsSnappedAndOnSameSide() { NotificationMenuRow row = Mockito.spy( Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationMenuRow.java +1 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl mMenuContainer = new FrameLayout(mContext); } final boolean newFlowHideShelf = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_NOTIF_DISMISS, 0) == 1; Settings.Global.SHOW_NEW_NOTIF_DISMISS, 1 /* on by default */) == 1; if (newFlowHideShelf) { return; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +3 −3 Original line number Diff line number Diff line Loading @@ -834,9 +834,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (!mShouldDrawNotificationBackground) { return; } final boolean clearUndershelf = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_NOTIF_DISMISS, 0 /* show background by default */) == 1; if (clearUndershelf) { final boolean newFlowHideShelf = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_NOTIF_DISMISS, 1 /* on by default */) == 1; if (newFlowHideShelf) { mBackgroundPaint.setColor(Color.TRANSPARENT); invalidate(); return; Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationMenuRowTest.java +17 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package com.android.systemui.statusbar.notification.row; import static android.provider.Settings.Secure.SHOW_NOTIFICATION_SNOOZE; import static android.provider.Settings.Global.SHOW_NEW_NOTIF_DISMISS; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; Loading Loading @@ -96,6 +97,7 @@ public class NotificationMenuRowTest extends LeakCheckedTest { @Test public void testNoAppOpsInSlowSwipe() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 0); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 0); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); Loading @@ -108,6 +110,7 @@ public class NotificationMenuRowTest extends LeakCheckedTest { @Test public void testNoSnoozeInSlowSwipe() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 0); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 0); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); Loading @@ -120,6 +123,7 @@ public class NotificationMenuRowTest extends LeakCheckedTest { @Test public void testSnoozeInSlowSwipe() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 1); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 0); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); Loading @@ -129,6 +133,19 @@ public class NotificationMenuRowTest extends LeakCheckedTest { assertEquals(2, container.getChildCount()); } @Test public void testSlowSwipe_newDismiss() { Settings.Secure.putInt(mContext.getContentResolver(), SHOW_NOTIFICATION_SNOOZE, 1); Settings.Global.putInt(mContext.getContentResolver(), SHOW_NEW_NOTIF_DISMISS, 1); NotificationMenuRow row = new NotificationMenuRow(mContext, mPeopleNotificationIdentifier); row.createMenu(mRow, null); ViewGroup container = (ViewGroup) row.getMenuView(); // Clear menu assertEquals(0, container.getChildCount()); } @Test public void testIsSnappedAndOnSameSide() { NotificationMenuRow row = Mockito.spy( Loading