Loading packages/SystemUI/aconfig/systemui.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -815,13 +815,6 @@ flag { } } flag { name: "smartspace_lockscreen_viewmodel" namespace: "systemui" description: "Indicate Smartspace lockscreen viewmodel" bug: "331451011" } flag { name: "smartspace_viewpager2" namespace: "systemui" Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt +293 −346 File changed.Preview size limit exceeded, changes collapsed. Show changes packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +8 −29 Original line number Diff line number Diff line Loading @@ -42,14 +42,12 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.keyguard.KeyguardUpdateMonitorCallback import com.android.settingslib.Utils import com.android.systemui.Dumpable import com.android.systemui.Flags.smartspaceLockscreenViewmodel import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.BcSmartspaceConfigPlugin import com.android.systemui.plugins.BcSmartspaceDataPlugin Loading Loading @@ -102,7 +100,6 @@ constructor( private val deviceProvisionedController: DeviceProvisionedController, private val bypassController: KeyguardBypassController, private val keyguardUpdateMonitor: KeyguardUpdateMonitor, private val wakefulnessLifecycle: WakefulnessLifecycle, private val smartspaceViewModelFactory: SmartspaceViewModel.Factory, private val dumpManager: DumpManager, private val execution: Execution, Loading Loading @@ -298,18 +295,6 @@ constructor( } } // TODO(b/331451011): Refactor to viewmodel and use interactor pattern. private val wakefulnessLifecycleObserver = object : WakefulnessLifecycle.Observer { override fun onStartedWakingUp() { smartspaceViews.forEach { it.setScreenOn(true) } } override fun onFinishedGoingToSleep() { smartspaceViews.forEach { it.setScreenOn(false) } } } init { deviceProvisionedController.addCallback(deviceProvisionedListener) dumpManager.registerDumpable(this) Loading Loading @@ -460,7 +445,6 @@ constructor( setTag(R.id.tag_smartspace_view, Any()) addOnAttachStateChangeListener(stateChangeListener) if (smartspaceLockscreenViewmodel()) { val viewModel = smartspaceViewModelFactory.create(surfaceName) SmartspaceViewBinder.bind( smartspaceView = ssView, Loading @@ -469,7 +453,6 @@ constructor( ) } } } private fun connectSession() { if (userSmartspaceManager == null) { Loading Loading @@ -523,9 +506,6 @@ constructor( configurationController.addCallback(configChangeListener) statusBarStateController.addCallback(statusBarStateListener) bypassController.registerOnBypassStateChangedListener(bypassStateChangedListener) if (!smartspaceLockscreenViewmodel()) { wakefulnessLifecycle.addObserver(wakefulnessLifecycleObserver) } datePlugin?.registerSmartspaceEventNotifier { e -> session?.notifySmartspaceEvent(e) } weatherPlugin?.registerSmartspaceEventNotifier { e -> session?.notifySmartspaceEvent(e) } Loading Loading @@ -565,9 +545,6 @@ constructor( configurationController.removeCallback(configChangeListener) statusBarStateController.removeCallback(statusBarStateListener) bypassController.unregisterOnBypassStateChangedListener(bypassStateChangedListener) if (!smartspaceLockscreenViewmodel()) { wakefulnessLifecycle.removeObserver(wakefulnessLifecycleObserver) } session = null datePlugin?.registerSmartspaceEventNotifier(null) Loading Loading @@ -616,6 +593,7 @@ constructor( userTracker.userHandle -> { !t.isSensitive || showSensitiveContentForCurrentUser } managedUserHandle -> { // Really, this should be "if this managed profile is associated with the current // active user", but we don't have a good way to check that, so instead we cheat: Loading @@ -624,6 +602,7 @@ constructor( userTracker.userHandle.identifier == UserHandle.USER_SYSTEM && (!t.isSensitive || showSensitiveContentForManagedUser) } else -> { false } Loading Loading
packages/SystemUI/aconfig/systemui.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -815,13 +815,6 @@ flag { } } flag { name: "smartspace_lockscreen_viewmodel" namespace: "systemui" description: "Indicate Smartspace lockscreen viewmodel" bug: "331451011" } flag { name: "smartspace_viewpager2" namespace: "systemui" Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt +293 −346 File changed.Preview size limit exceeded, changes collapsed. Show changes
packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +8 −29 Original line number Diff line number Diff line Loading @@ -42,14 +42,12 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.keyguard.KeyguardUpdateMonitorCallback import com.android.settingslib.Utils import com.android.systemui.Dumpable import com.android.systemui.Flags.smartspaceLockscreenViewmodel import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.BcSmartspaceConfigPlugin import com.android.systemui.plugins.BcSmartspaceDataPlugin Loading Loading @@ -102,7 +100,6 @@ constructor( private val deviceProvisionedController: DeviceProvisionedController, private val bypassController: KeyguardBypassController, private val keyguardUpdateMonitor: KeyguardUpdateMonitor, private val wakefulnessLifecycle: WakefulnessLifecycle, private val smartspaceViewModelFactory: SmartspaceViewModel.Factory, private val dumpManager: DumpManager, private val execution: Execution, Loading Loading @@ -298,18 +295,6 @@ constructor( } } // TODO(b/331451011): Refactor to viewmodel and use interactor pattern. private val wakefulnessLifecycleObserver = object : WakefulnessLifecycle.Observer { override fun onStartedWakingUp() { smartspaceViews.forEach { it.setScreenOn(true) } } override fun onFinishedGoingToSleep() { smartspaceViews.forEach { it.setScreenOn(false) } } } init { deviceProvisionedController.addCallback(deviceProvisionedListener) dumpManager.registerDumpable(this) Loading Loading @@ -460,7 +445,6 @@ constructor( setTag(R.id.tag_smartspace_view, Any()) addOnAttachStateChangeListener(stateChangeListener) if (smartspaceLockscreenViewmodel()) { val viewModel = smartspaceViewModelFactory.create(surfaceName) SmartspaceViewBinder.bind( smartspaceView = ssView, Loading @@ -469,7 +453,6 @@ constructor( ) } } } private fun connectSession() { if (userSmartspaceManager == null) { Loading Loading @@ -523,9 +506,6 @@ constructor( configurationController.addCallback(configChangeListener) statusBarStateController.addCallback(statusBarStateListener) bypassController.registerOnBypassStateChangedListener(bypassStateChangedListener) if (!smartspaceLockscreenViewmodel()) { wakefulnessLifecycle.addObserver(wakefulnessLifecycleObserver) } datePlugin?.registerSmartspaceEventNotifier { e -> session?.notifySmartspaceEvent(e) } weatherPlugin?.registerSmartspaceEventNotifier { e -> session?.notifySmartspaceEvent(e) } Loading Loading @@ -565,9 +545,6 @@ constructor( configurationController.removeCallback(configChangeListener) statusBarStateController.removeCallback(statusBarStateListener) bypassController.unregisterOnBypassStateChangedListener(bypassStateChangedListener) if (!smartspaceLockscreenViewmodel()) { wakefulnessLifecycle.removeObserver(wakefulnessLifecycleObserver) } session = null datePlugin?.registerSmartspaceEventNotifier(null) Loading Loading @@ -616,6 +593,7 @@ constructor( userTracker.userHandle -> { !t.isSensitive || showSensitiveContentForCurrentUser } managedUserHandle -> { // Really, this should be "if this managed profile is associated with the current // active user", but we don't have a good way to check that, so instead we cheat: Loading @@ -624,6 +602,7 @@ constructor( userTracker.userHandle.identifier == UserHandle.USER_SYSTEM && (!t.isSensitive || showSensitiveContentForManagedUser) } else -> { false } Loading