Loading packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/CommunalSmartspaceControllerTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.smartspace.SmartspaceSession import android.app.smartspace.SmartspaceTarget import android.content.Context import android.graphics.drawable.Drawable import android.os.Handler import android.testing.TestableLooper import android.view.View import android.widget.FrameLayout Loading Loading @@ -86,6 +87,8 @@ class CommunalSmartspaceControllerTest : SysuiTestCase() { override fun setUiSurface(uiSurface: String) {} override fun setBgHandler(bgHandler: Handler?) {} override fun setDozeAmount(amount: Float) {} override fun setIntentStarter(intentStarter: BcSmartspaceDataPlugin.IntentStarter?) {} Loading packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.smartspace.SmartspaceSession import android.app.smartspace.SmartspaceTarget import android.content.Context import android.graphics.drawable.Drawable import android.os.Handler import android.testing.TestableLooper import android.view.View import android.view.ViewGroup Loading Loading @@ -119,6 +120,8 @@ class DreamSmartspaceControllerTest : SysuiTestCase() { override fun setUiSurface(uiSurface: String) {} override fun setBgHandler(bgHandler: Handler?) {} override fun setDozeAmount(amount: Float) {} override fun setIntentStarter(intentStarter: BcSmartspaceDataPlugin.IntentStarter?) {} Loading packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.app.smartspace.uitemplatedata.TapAction; import android.content.ActivityNotFoundException; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Parcelable; import android.util.Log; import android.view.View; Loading Loading @@ -123,6 +124,9 @@ public interface BcSmartspaceDataPlugin extends Plugin { */ void setUiSurface(String uiSurface); /** Set background handler to make binder calls. */ void setBgHandler(Handler bgHandler); /** * Range [0.0 - 1.0] when transitioning from Lockscreen to/from AOD */ Loading packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceViewComponent.kt +11 −8 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ package com.android.systemui.smartspace.dagger import android.app.ActivityOptions import android.app.PendingIntent import android.content.Intent import android.os.Handler import android.view.View import android.view.ViewGroup import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.BcSmartspaceDataPlugin import com.android.systemui.plugins.BcSmartspaceDataPlugin.UI_SURFACE_DREAM Loading Loading @@ -56,14 +58,15 @@ interface SmartspaceViewComponent { parent: ViewGroup, @Named(PLUGIN) plugin: BcSmartspaceDataPlugin, viewWithCustomLayout: View?, onAttachListener: View.OnAttachStateChangeListener ): BcSmartspaceDataPlugin.SmartspaceView { onAttachListener: View.OnAttachStateChangeListener, @Background bgHandler: Handler, ): BcSmartspaceDataPlugin.SmartspaceView { val ssView = viewWithCustomLayout as? BcSmartspaceDataPlugin.SmartspaceView ?: plugin.getView(parent) // Currently, this is only used to provide SmartspaceView on Dream surface. ssView.setUiSurface(UI_SURFACE_DREAM) ssView.setBgHandler(bgHandler) ssView.registerDataProvider(plugin) ssView.setIntentStarter(object : BcSmartspaceDataPlugin.IntentStarter { Loading packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +2 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ constructor( @Main private val uiExecutor: Executor, @Background private val bgExecutor: Executor, @Main private val handler: Handler, @Background private val bgHandler: Handler, @Named(DATE_SMARTSPACE_DATA_PLUGIN) optionalDatePlugin: Optional<BcSmartspaceDataPlugin>, @Named(WEATHER_SMARTSPACE_DATA_PLUGIN) Loading Loading @@ -412,6 +413,7 @@ constructor( val ssView = plugin.getView(parent) configPlugin?.let { ssView.registerConfigProvider(it) } ssView.setBgHandler(bgHandler) ssView.setUiSurface(BcSmartspaceDataPlugin.UI_SURFACE_LOCK_SCREEN_AOD) ssView.setTimeChangedDelegate(SmartspaceTimeChangedDelegate(keyguardUpdateMonitor)) ssView.registerDataProvider(plugin) Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/CommunalSmartspaceControllerTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.smartspace.SmartspaceSession import android.app.smartspace.SmartspaceTarget import android.content.Context import android.graphics.drawable.Drawable import android.os.Handler import android.testing.TestableLooper import android.view.View import android.widget.FrameLayout Loading Loading @@ -86,6 +87,8 @@ class CommunalSmartspaceControllerTest : SysuiTestCase() { override fun setUiSurface(uiSurface: String) {} override fun setBgHandler(bgHandler: Handler?) {} override fun setDozeAmount(amount: Float) {} override fun setIntentStarter(intentStarter: BcSmartspaceDataPlugin.IntentStarter?) {} Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.app.smartspace.SmartspaceSession import android.app.smartspace.SmartspaceTarget import android.content.Context import android.graphics.drawable.Drawable import android.os.Handler import android.testing.TestableLooper import android.view.View import android.view.ViewGroup Loading Loading @@ -119,6 +120,8 @@ class DreamSmartspaceControllerTest : SysuiTestCase() { override fun setUiSurface(uiSurface: String) {} override fun setBgHandler(bgHandler: Handler?) {} override fun setDozeAmount(amount: Float) {} override fun setIntentStarter(intentStarter: BcSmartspaceDataPlugin.IntentStarter?) {} Loading
packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.app.smartspace.uitemplatedata.TapAction; import android.content.ActivityNotFoundException; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Parcelable; import android.util.Log; import android.view.View; Loading Loading @@ -123,6 +124,9 @@ public interface BcSmartspaceDataPlugin extends Plugin { */ void setUiSurface(String uiSurface); /** Set background handler to make binder calls. */ void setBgHandler(Handler bgHandler); /** * Range [0.0 - 1.0] when transitioning from Lockscreen to/from AOD */ Loading
packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceViewComponent.kt +11 −8 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ package com.android.systemui.smartspace.dagger import android.app.ActivityOptions import android.app.PendingIntent import android.content.Intent import android.os.Handler import android.view.View import android.view.ViewGroup import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.BcSmartspaceDataPlugin import com.android.systemui.plugins.BcSmartspaceDataPlugin.UI_SURFACE_DREAM Loading Loading @@ -56,14 +58,15 @@ interface SmartspaceViewComponent { parent: ViewGroup, @Named(PLUGIN) plugin: BcSmartspaceDataPlugin, viewWithCustomLayout: View?, onAttachListener: View.OnAttachStateChangeListener ): BcSmartspaceDataPlugin.SmartspaceView { onAttachListener: View.OnAttachStateChangeListener, @Background bgHandler: Handler, ): BcSmartspaceDataPlugin.SmartspaceView { val ssView = viewWithCustomLayout as? BcSmartspaceDataPlugin.SmartspaceView ?: plugin.getView(parent) // Currently, this is only used to provide SmartspaceView on Dream surface. ssView.setUiSurface(UI_SURFACE_DREAM) ssView.setBgHandler(bgHandler) ssView.registerDataProvider(plugin) ssView.setIntentStarter(object : BcSmartspaceDataPlugin.IntentStarter { Loading
packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +2 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ constructor( @Main private val uiExecutor: Executor, @Background private val bgExecutor: Executor, @Main private val handler: Handler, @Background private val bgHandler: Handler, @Named(DATE_SMARTSPACE_DATA_PLUGIN) optionalDatePlugin: Optional<BcSmartspaceDataPlugin>, @Named(WEATHER_SMARTSPACE_DATA_PLUGIN) Loading Loading @@ -412,6 +413,7 @@ constructor( val ssView = plugin.getView(parent) configPlugin?.let { ssView.registerConfigProvider(it) } ssView.setBgHandler(bgHandler) ssView.setUiSurface(BcSmartspaceDataPlugin.UI_SURFACE_LOCK_SCREEN_AOD) ssView.setTimeChangedDelegate(SmartspaceTimeChangedDelegate(keyguardUpdateMonitor)) ssView.registerDataProvider(plugin) Loading