summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
diff options
context:
space:
mode:
authorMatt Pietal <mpietal@google.com>2021-04-13 11:20:48 -0400
committerMatt Pietal <mpietal@google.com>2021-04-13 19:40:57 -0400
commit7994f8159af4bab5cd271cd2938afd7a81b64865 (patch)
tree0144d299ad76d38de2da066656a5ddc36cdf5a62 /packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
parent1d55f8ecbe3b046975cde4769d53ebe349e42eef (diff)
Smartspace - Align large clock
The large clock was not properly set below the new smartspace when the plugin was activiated. Fix that. Fixes: 185226009 Test: atest KeyguardClockSwitchControllerTest Change-Id: Ib9c1f837128524b8a896ed12eee7b70cc145ec28
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
index 032ed7da0a46..cb825c043642 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java
@@ -188,6 +188,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
mSmartspaceView.registerDataProvider(plugin);
View asView = (View) mSmartspaceView;
+ // Place plugin view below normal clock...
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
MATCH_PARENT, WRAP_CONTENT);
lp.addRule(RelativeLayout.BELOW, R.id.lockscreen_clock_view);
@@ -197,6 +198,11 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
.getDimensionPixelSize(R.dimen.below_clock_padding_start);
asView.setPadding(padding, 0, padding, 0);
+ // ... but above the large clock
+ lp = new RelativeLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT);
+ lp.addRule(RelativeLayout.BELOW, asView.getId());
+ mLargeClockFrame.setLayoutParams(lp);
+
View nic = mView.findViewById(
com.android.systemui.R.id.left_aligned_notification_icon_container);
lp = (RelativeLayout.LayoutParams) nic.getLayoutParams();
@@ -219,6 +225,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
nic.getLayoutParams();
lp.addRule(RelativeLayout.BELOW, R.id.keyguard_status_area);
nic.setLayoutParams(lp);
+ mLargeClockFrame.setLayoutParams(lp);
mSmartspaceView = null;
}