Loading src/com/android/settings/notification/ShowOnLockScreenNotificationPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,6 +157,6 @@ public class ShowOnLockScreenNotificationPreferenceController extends AbstractPr private boolean getLockscreenSilentNotificationsEnabled() { return Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 1) != 0; Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 0) != 0; } } tests/robotests/src/com/android/settings/notification/ShowOnLockscreenNotificationPreferenceControllerTest.java +7 −7 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ public class ShowOnLockscreenNotificationPreferenceControllerTest { assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_none)); assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_none)); } Loading @@ -110,7 +110,7 @@ public class ShowOnLockscreenNotificationPreferenceControllerTest { assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_alerting)); assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_alerting)); } Loading @@ -127,20 +127,20 @@ public class ShowOnLockscreenNotificationPreferenceControllerTest { assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_all)); assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_all)); } @Test public void updateState_allNotifsOnLockscreen_isDefault() { public void updateState_alertingNotifsOnLockscreen_isDefault() { // settings don't exist mController.displayPreference(mScreen); assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_all)); assertThat(mPreference.getSummary()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_all)); String.valueOf(R.string.lock_screen_notifs_show_alerting)); assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_alerting)); } @Test Loading Loading
src/com/android/settings/notification/ShowOnLockScreenNotificationPreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,6 +157,6 @@ public class ShowOnLockScreenNotificationPreferenceController extends AbstractPr private boolean getLockscreenSilentNotificationsEnabled() { return Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 1) != 0; Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, 0) != 0; } }
tests/robotests/src/com/android/settings/notification/ShowOnLockscreenNotificationPreferenceControllerTest.java +7 −7 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ public class ShowOnLockscreenNotificationPreferenceControllerTest { assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_none)); assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_none)); } Loading @@ -110,7 +110,7 @@ public class ShowOnLockscreenNotificationPreferenceControllerTest { assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_alerting)); assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_alerting)); } Loading @@ -127,20 +127,20 @@ public class ShowOnLockscreenNotificationPreferenceControllerTest { assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_all)); assertThat(mPreference.getSummary()) assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_all)); } @Test public void updateState_allNotifsOnLockscreen_isDefault() { public void updateState_alertingNotifsOnLockscreen_isDefault() { // settings don't exist mController.displayPreference(mScreen); assertThat(mPreference.getValue()).isEqualTo( String.valueOf(R.string.lock_screen_notifs_show_all)); assertThat(mPreference.getSummary()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_all)); String.valueOf(R.string.lock_screen_notifs_show_alerting)); assertThat(mPreference.getSummary().toString()) .isEqualTo(mContext.getString(R.string.lock_screen_notifs_show_alerting)); } @Test Loading