Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -9573,6 +9573,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_unknown() { public void testMaybeShowReviewPermissionsNotification_unknown() { reset(mMockNm); // Set up various possible states of the settings int and confirm whether or not the // Set up various possible states of the settings int and confirm whether or not the // notification is shown as expected // notification is shown as expected Loading @@ -9586,6 +9588,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_shouldShow() { public void testMaybeShowReviewPermissionsNotification_shouldShow() { reset(mMockNm); // If state is SHOULD_SHOW, it ... should show // If state is SHOULD_SHOW, it ... should show Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Loading @@ -9598,6 +9602,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_alreadyShown() { public void testMaybeShowReviewPermissionsNotification_alreadyShown() { reset(mMockNm); // If state is either USER_INTERACTED or DISMISSED, we should not show this on boot // If state is either USER_INTERACTED or DISMISSED, we should not show this on boot Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Loading @@ -9614,6 +9620,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_reshown() { public void testMaybeShowReviewPermissionsNotification_reshown() { reset(mMockNm); // If we have re-shown the notification and the user did not subsequently interacted with // If we have re-shown the notification and the user did not subsequently interacted with // it, then make sure we show when trying on boot // it, then make sure we show when trying on boot Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(), Loading @@ -9627,6 +9635,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testRescheduledReviewPermissionsNotification() { public void testRescheduledReviewPermissionsNotification() { reset(mMockNm); // when rescheduled, the notification goes through the NotificationManagerInternal service // when rescheduled, the notification goes through the NotificationManagerInternal service // this call doesn't need to know anything about previously scheduled state -- if called, // this call doesn't need to know anything about previously scheduled state -- if called, // it should send the notification & write the appropriate int to Settings // it should send the notification & write the appropriate int to Settings Loading Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -9573,6 +9573,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_unknown() { public void testMaybeShowReviewPermissionsNotification_unknown() { reset(mMockNm); // Set up various possible states of the settings int and confirm whether or not the // Set up various possible states of the settings int and confirm whether or not the // notification is shown as expected // notification is shown as expected Loading @@ -9586,6 +9588,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_shouldShow() { public void testMaybeShowReviewPermissionsNotification_shouldShow() { reset(mMockNm); // If state is SHOULD_SHOW, it ... should show // If state is SHOULD_SHOW, it ... should show Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Loading @@ -9598,6 +9602,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_alreadyShown() { public void testMaybeShowReviewPermissionsNotification_alreadyShown() { reset(mMockNm); // If state is either USER_INTERACTED or DISMISSED, we should not show this on boot // If state is either USER_INTERACTED or DISMISSED, we should not show this on boot Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE, Loading @@ -9614,6 +9620,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testMaybeShowReviewPermissionsNotification_reshown() { public void testMaybeShowReviewPermissionsNotification_reshown() { reset(mMockNm); // If we have re-shown the notification and the user did not subsequently interacted with // If we have re-shown the notification and the user did not subsequently interacted with // it, then make sure we show when trying on boot // it, then make sure we show when trying on boot Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(), Loading @@ -9627,6 +9635,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { @Test @Test public void testRescheduledReviewPermissionsNotification() { public void testRescheduledReviewPermissionsNotification() { reset(mMockNm); // when rescheduled, the notification goes through the NotificationManagerInternal service // when rescheduled, the notification goes through the NotificationManagerInternal service // this call doesn't need to know anything about previously scheduled state -- if called, // this call doesn't need to know anything about previously scheduled state -- if called, // it should send the notification & write the appropriate int to Settings // it should send the notification & write the appropriate int to Settings Loading