Loading packages/SystemUI/res/layout/keyguard_bottom_area.xml +9 −0 Original line number Diff line number Diff line Loading @@ -107,4 +107,13 @@ <include layout="@layout/ambient_indication" android:id="@id/ambient_indication_container" /> <FrameLayout android:id="@+id/smartspace_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginBottom="@dimen/ambient_indication_margin_bottom" android:visibility="gone"> </FrameLayout> </com.android.systemui.statusbar.phone.KeyguardBottomAreaView> packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static com.android.keyguard.KeyguardClockSwitch.LARGE; import static com.android.keyguard.KeyguardClockSwitch.SMALL; import static com.android.systemui.Flags.migrateClocksToBlueprint; import static com.android.systemui.Flags.smartspaceRelocateToBottom; import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; import static com.android.systemui.util.kotlin.JavaAdapterKt.collectFlow; Loading Loading @@ -421,6 +422,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS return; } if (smartspaceRelocateToBottom()) { return; } mSmartspaceView = mSmartspaceController.buildAndConnectView(mView); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( MATCH_PARENT, WRAP_CONTENT); Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +7 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.keyguard.KeyguardClockSwitch.SMALL; import static com.android.systemui.Flags.keyguardBottomAreaRefactor; import static com.android.systemui.Flags.migrateClocksToBlueprint; import static com.android.systemui.Flags.predictiveBackAnimateShade; import static com.android.systemui.Flags.smartspaceRelocateToBottom; import static com.android.systemui.classifier.Classifier.BOUNCER_UNLOCK; import static com.android.systemui.classifier.Classifier.GENERIC; import static com.android.systemui.classifier.Classifier.QUICK_SETTINGS; Loading Loading @@ -1428,7 +1429,12 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump int index = mView.indexOfChild(mKeyguardBottomArea); mView.removeView(mKeyguardBottomArea); KeyguardBottomAreaView oldBottomArea = mKeyguardBottomArea; setKeyguardBottomArea(mKeyguardBottomAreaViewControllerProvider.get().getView()); KeyguardBottomAreaViewController keyguardBottomAreaViewController = mKeyguardBottomAreaViewControllerProvider.get(); if (smartspaceRelocateToBottom()) { keyguardBottomAreaViewController.init(); } setKeyguardBottomArea(keyguardBottomAreaViewController.getView()); mKeyguardBottomArea.initFrom(oldBottomArea); mView.addView(mKeyguardBottomArea, index); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaViewController.kt +41 −2 Original line number Diff line number Diff line Loading @@ -18,12 +18,23 @@ package com.android.systemui.statusbar.phone import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags import com.android.systemui.Flags.smartspaceRelocateToBottom import android.view.View import android.view.ViewGroup import android.widget.LinearLayout import com.android.systemui.res.R import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController import com.android.systemui.util.ViewController import javax.inject.Inject class KeyguardBottomAreaViewController @Inject constructor(view: KeyguardBottomAreaView, featureFlags: FeatureFlagsClassic) : ViewController<KeyguardBottomAreaView> (view) { @Inject constructor( view: KeyguardBottomAreaView, private val smartspaceController: LockscreenSmartspaceController, featureFlags: FeatureFlagsClassic ) : ViewController<KeyguardBottomAreaView> (view) { private var smartspaceView: View? = null init { view.setIsLockscreenLandscapeEnabled( Loading @@ -31,6 +42,14 @@ class KeyguardBottomAreaViewController } override fun onViewAttached() { if (!smartspaceRelocateToBottom() || !smartspaceController.isEnabled()) { return } val ambientIndicationArea = mView.findViewById<View>(R.id.ambient_indication_container) ambientIndicationArea?.visibility = View.GONE addSmartspaceView() } override fun onViewDetached() { Loading @@ -40,4 +59,24 @@ class KeyguardBottomAreaViewController // TODO: remove this method. return mView } private fun addSmartspaceView() { if (!smartspaceRelocateToBottom()) { return } val smartspaceContainer = mView.findViewById<View>(R.id.smartspace_container) smartspaceContainer!!.visibility = View.VISIBLE smartspaceView = smartspaceController.buildAndConnectView(smartspaceContainer as ViewGroup) val lp = LinearLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) (smartspaceContainer as ViewGroup).addView(smartspaceView, 0, lp) val startPadding = context.resources.getDimensionPixelSize( R.dimen.below_clock_padding_start) val endPadding = context.resources.getDimensionPixelSize( R.dimen.below_clock_padding_end) smartspaceView?.setPaddingRelative(startPadding, 0, endPadding, 0) // mKeyguardUnlockAnimationController.lockscreenSmartspace = smartspaceView } } Loading
packages/SystemUI/res/layout/keyguard_bottom_area.xml +9 −0 Original line number Diff line number Diff line Loading @@ -107,4 +107,13 @@ <include layout="@layout/ambient_indication" android:id="@id/ambient_indication_container" /> <FrameLayout android:id="@+id/smartspace_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginBottom="@dimen/ambient_indication_margin_bottom" android:visibility="gone"> </FrameLayout> </com.android.systemui.statusbar.phone.KeyguardBottomAreaView>
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static com.android.keyguard.KeyguardClockSwitch.LARGE; import static com.android.keyguard.KeyguardClockSwitch.SMALL; import static com.android.systemui.Flags.migrateClocksToBlueprint; import static com.android.systemui.Flags.smartspaceRelocateToBottom; import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; import static com.android.systemui.util.kotlin.JavaAdapterKt.collectFlow; Loading Loading @@ -421,6 +422,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS return; } if (smartspaceRelocateToBottom()) { return; } mSmartspaceView = mSmartspaceController.buildAndConnectView(mView); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams( MATCH_PARENT, WRAP_CONTENT); Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +7 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.keyguard.KeyguardClockSwitch.SMALL; import static com.android.systemui.Flags.keyguardBottomAreaRefactor; import static com.android.systemui.Flags.migrateClocksToBlueprint; import static com.android.systemui.Flags.predictiveBackAnimateShade; import static com.android.systemui.Flags.smartspaceRelocateToBottom; import static com.android.systemui.classifier.Classifier.BOUNCER_UNLOCK; import static com.android.systemui.classifier.Classifier.GENERIC; import static com.android.systemui.classifier.Classifier.QUICK_SETTINGS; Loading Loading @@ -1428,7 +1429,12 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump int index = mView.indexOfChild(mKeyguardBottomArea); mView.removeView(mKeyguardBottomArea); KeyguardBottomAreaView oldBottomArea = mKeyguardBottomArea; setKeyguardBottomArea(mKeyguardBottomAreaViewControllerProvider.get().getView()); KeyguardBottomAreaViewController keyguardBottomAreaViewController = mKeyguardBottomAreaViewControllerProvider.get(); if (smartspaceRelocateToBottom()) { keyguardBottomAreaViewController.init(); } setKeyguardBottomArea(keyguardBottomAreaViewController.getView()); mKeyguardBottomArea.initFrom(oldBottomArea); mView.addView(mKeyguardBottomArea, index); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaViewController.kt +41 −2 Original line number Diff line number Diff line Loading @@ -18,12 +18,23 @@ package com.android.systemui.statusbar.phone import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags import com.android.systemui.Flags.smartspaceRelocateToBottom import android.view.View import android.view.ViewGroup import android.widget.LinearLayout import com.android.systemui.res.R import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController import com.android.systemui.util.ViewController import javax.inject.Inject class KeyguardBottomAreaViewController @Inject constructor(view: KeyguardBottomAreaView, featureFlags: FeatureFlagsClassic) : ViewController<KeyguardBottomAreaView> (view) { @Inject constructor( view: KeyguardBottomAreaView, private val smartspaceController: LockscreenSmartspaceController, featureFlags: FeatureFlagsClassic ) : ViewController<KeyguardBottomAreaView> (view) { private var smartspaceView: View? = null init { view.setIsLockscreenLandscapeEnabled( Loading @@ -31,6 +42,14 @@ class KeyguardBottomAreaViewController } override fun onViewAttached() { if (!smartspaceRelocateToBottom() || !smartspaceController.isEnabled()) { return } val ambientIndicationArea = mView.findViewById<View>(R.id.ambient_indication_container) ambientIndicationArea?.visibility = View.GONE addSmartspaceView() } override fun onViewDetached() { Loading @@ -40,4 +59,24 @@ class KeyguardBottomAreaViewController // TODO: remove this method. return mView } private fun addSmartspaceView() { if (!smartspaceRelocateToBottom()) { return } val smartspaceContainer = mView.findViewById<View>(R.id.smartspace_container) smartspaceContainer!!.visibility = View.VISIBLE smartspaceView = smartspaceController.buildAndConnectView(smartspaceContainer as ViewGroup) val lp = LinearLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) (smartspaceContainer as ViewGroup).addView(smartspaceView, 0, lp) val startPadding = context.resources.getDimensionPixelSize( R.dimen.below_clock_padding_start) val endPadding = context.resources.getDimensionPixelSize( R.dimen.below_clock_padding_end) smartspaceView?.setPaddingRelative(startPadding, 0, endPadding, 0) // mKeyguardUnlockAnimationController.lockscreenSmartspace = smartspaceView } }