Loading src/com/android/settings/datetime/TimeFormatPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public class TimeFormatPreferenceController extends AbstractPreferenceController static void timeUpdated(Context context, Boolean is24Hour) { Intent timeChanged = new Intent(Intent.ACTION_TIME_CHANGED); timeChanged.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); int timeFormatPreference; if (is24Hour == null) { timeFormatPreference = Intent.EXTRA_TIME_PREF_VALUE_USE_LOCALE_DEFAULT; Loading tests/robotests/src/com/android/settings/datetime/TimeChangeListenerMixinTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,8 @@ public class TimeChangeListenerMixinTest { public void onResume_shouldRegisterIntentFilter() { mMixin.onResume(); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_TICK)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED) .addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIMEZONE_CHANGED)); verify(mCallback, times(3)).updateTimeAndDateDisplay(mContext); Loading @@ -77,7 +78,8 @@ public class TimeChangeListenerMixinTest { mMixin.onResume(); mMixin.onPause(); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_TICK)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED) .addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIMEZONE_CHANGED)); verify(mCallback, never()).updateTimeAndDateDisplay(mContext); Loading Loading
src/com/android/settings/datetime/TimeFormatPreferenceController.java +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public class TimeFormatPreferenceController extends AbstractPreferenceController static void timeUpdated(Context context, Boolean is24Hour) { Intent timeChanged = new Intent(Intent.ACTION_TIME_CHANGED); timeChanged.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); int timeFormatPreference; if (is24Hour == null) { timeFormatPreference = Intent.EXTRA_TIME_PREF_VALUE_USE_LOCALE_DEFAULT; Loading
tests/robotests/src/com/android/settings/datetime/TimeChangeListenerMixinTest.java +4 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,8 @@ public class TimeChangeListenerMixinTest { public void onResume_shouldRegisterIntentFilter() { mMixin.onResume(); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_TICK)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED) .addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIMEZONE_CHANGED)); verify(mCallback, times(3)).updateTimeAndDateDisplay(mContext); Loading @@ -77,7 +78,8 @@ public class TimeChangeListenerMixinTest { mMixin.onResume(); mMixin.onPause(); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_TICK)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIME_CHANGED) .addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND)); mContext.sendBroadcast(new Intent(Intent.ACTION_TIMEZONE_CHANGED)); verify(mCallback, never()).updateTimeAndDateDisplay(mContext); Loading