diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index ea14b64b8b182..5c9dd5ec26e76 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -237,23 +237,12 @@ public class KeyguardClockSwitchController extends ViewController= 0) { + mStatusArea.removeView(mSmartspaceView); + addSmartspaceView(index); + } + } + } + + private void addSmartspaceView(int index) { + mSmartspaceView = mSmartspaceController.buildAndConnectView(mView); + LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( + MATCH_PARENT, WRAP_CONTENT); + mStatusArea.addView(mSmartspaceView, index, lp); + int startPadding = getContext().getResources().getDimensionPixelSize( + R.dimen.below_clock_padding_start); + int endPadding = getContext().getResources().getDimensionPixelSize( + R.dimen.below_clock_padding_end); + mSmartspaceView.setPaddingRelative(startPadding, 0, endPadding, 0); + + mKeyguardUnlockAnimationController.setLockscreenSmartspace(mSmartspaceView); + } + /** * Apply dp changes on font/scale change */ diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index 083f2fe53d179..8921780fdacfc 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -224,6 +224,7 @@ public class KeyguardStatusViewController extends ViewController configurationListenerArgumentCaptor = + ArgumentCaptor.forClass(ConfigurationListener.class); + + mController.onViewAttached(); + verify(mConfigurationController).addCallback(configurationListenerArgumentCaptor.capture()); + + configurationListenerArgumentCaptor.getValue().onLocaleListChanged(); + verify(mKeyguardClockSwitchController).onLocaleListChanged(); + } }