Remove smartspace flag
No longer needed Fixes: 234591987 Test: atest SystemUITests Change-Id: I123b0dcdf451f6884afe2df2711bc2f8122ce701
This commit is contained in:
@@ -33,8 +33,6 @@
|
||||
<!-- Whether to show chipbar UI whenever the device is unlocked by ActiveUnlock. -->
|
||||
<bool name="flag_active_unlock_chipbar">true</bool>
|
||||
|
||||
<bool name="flag_smartspace">false</bool>
|
||||
|
||||
<!-- Whether the user switcher chip shows in the status bar. When true, the multi user
|
||||
avatar will no longer show on the lockscreen -->
|
||||
<bool name="flag_user_switcher_chip">false</bool>
|
||||
|
||||
@@ -65,8 +65,7 @@ object Flags {
|
||||
val FSI_ON_DND_UPDATE = unreleasedFlag(259130119, "fsi_on_dnd_update", teamfood = true)
|
||||
|
||||
// TODO(b/265804648): Tracking Bug
|
||||
@JvmField
|
||||
val DISABLE_FSI = unreleasedFlag(265804648, "disable_fsi")
|
||||
@JvmField val DISABLE_FSI = unreleasedFlag(265804648, "disable_fsi")
|
||||
|
||||
// TODO(b/254512538): Tracking Bug
|
||||
val INSTANT_VOICE_REPLY = unreleasedFlag(111, "instant_voice_reply", teamfood = true)
|
||||
@@ -225,7 +224,6 @@ object Flags {
|
||||
// TODO(b/254513100): Tracking Bug
|
||||
val SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED =
|
||||
releasedFlag(401, "smartspace_shared_element_transition_enabled")
|
||||
val SMARTSPACE = resourceBooleanFlag(402, R.bool.flag_smartspace, "smartspace")
|
||||
|
||||
// TODO(b/258517050): Clean up after the feature is launched.
|
||||
@JvmField
|
||||
@@ -554,6 +552,5 @@ object Flags {
|
||||
|
||||
// 2600 - keyboard shortcut
|
||||
// TODO(b/259352579): Tracking Bug
|
||||
@JvmField
|
||||
val SHORTCUT_LIST_SEARCH_LAYOUT = unreleasedFlag(2600, "shortcut_list_search_layout")
|
||||
@JvmField val SHORTCUT_LIST_SEARCH_LAYOUT = unreleasedFlag(2600, "shortcut_list_search_layout")
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.android.systemui.smartspace.preconditions
|
||||
|
||||
import com.android.systemui.flags.FeatureFlags
|
||||
import com.android.systemui.flags.Flags
|
||||
import com.android.systemui.smartspace.SmartspacePrecondition
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController
|
||||
import com.android.systemui.util.concurrency.Execution
|
||||
@@ -24,11 +22,9 @@ import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* {@link LockscreenPrecondition} covers the conditions that must be met before Smartspace can be
|
||||
* used over lockscreen. These conditions include the device being provisioned with a setup user
|
||||
* and the Smartspace feature flag enabled.
|
||||
* used over lockscreen. These conditions include the device being provisioned with a setup user.
|
||||
*/
|
||||
class LockscreenPrecondition @Inject constructor(
|
||||
private val featureFlags: FeatureFlags,
|
||||
private val deviceProvisionedController: DeviceProvisionedController,
|
||||
private val execution: Execution
|
||||
) : SmartspacePrecondition {
|
||||
@@ -90,6 +86,6 @@ class LockscreenPrecondition @Inject constructor(
|
||||
|
||||
override fun conditionsMet(): Boolean {
|
||||
execution.assertIsMainThread()
|
||||
return featureFlags.isEnabled(Flags.SMARTSPACE) && deviceReady
|
||||
return deviceReady
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ constructor(
|
||||
fun isEnabled(): Boolean {
|
||||
execution.assertIsMainThread()
|
||||
|
||||
return featureFlags.isEnabled(Flags.SMARTSPACE) && plugin != null
|
||||
return plugin != null
|
||||
}
|
||||
|
||||
private fun updateBypassEnabled() {
|
||||
|
||||
@@ -32,8 +32,6 @@ class NotifPipelineFlags @Inject constructor(
|
||||
fun isDevLoggingEnabled(): Boolean =
|
||||
featureFlags.isEnabled(Flags.NOTIFICATION_PIPELINE_DEVELOPER_LOGGING)
|
||||
|
||||
fun isSmartspaceDedupingEnabled(): Boolean = featureFlags.isEnabled(Flags.SMARTSPACE)
|
||||
|
||||
fun fullScreenIntentRequiresKeyguard(): Boolean =
|
||||
featureFlags.isEnabled(Flags.FSI_REQUIRES_KEYGUARD)
|
||||
|
||||
|
||||
@@ -88,9 +88,7 @@ class NotifCoordinatorsImpl @Inject constructor(
|
||||
mCoordinators.add(viewConfigCoordinator)
|
||||
mCoordinators.add(visualStabilityCoordinator)
|
||||
mCoordinators.add(sensitiveContentCoordinator)
|
||||
if (notifPipelineFlags.isSmartspaceDedupingEnabled()) {
|
||||
mCoordinators.add(smartspaceDedupingCoordinator)
|
||||
}
|
||||
mCoordinators.add(smartspaceDedupingCoordinator)
|
||||
mCoordinators.add(headsUpCoordinator)
|
||||
mCoordinators.add(gutsCoordinator)
|
||||
mCoordinators.add(preparationCoordinator)
|
||||
|
||||
@@ -20,8 +20,6 @@ import android.testing.AndroidTestingRunner
|
||||
import android.testing.TestableLooper
|
||||
import androidx.test.filters.SmallTest
|
||||
import com.android.systemui.SysuiTestCase
|
||||
import com.android.systemui.flags.FeatureFlags
|
||||
import com.android.systemui.flags.Flags
|
||||
import com.android.systemui.smartspace.preconditions.LockscreenPrecondition
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController
|
||||
import com.android.systemui.util.concurrency.Execution
|
||||
@@ -40,9 +38,6 @@ import org.mockito.MockitoAnnotations
|
||||
@RunWith(AndroidTestingRunner::class)
|
||||
@TestableLooper.RunWithLooper
|
||||
class LockscreenPreconditionTest : SysuiTestCase() {
|
||||
@Mock
|
||||
private lateinit var featureFlags: FeatureFlags
|
||||
|
||||
@Mock
|
||||
private lateinit var deviceProvisionedController: DeviceProvisionedController
|
||||
|
||||
@@ -64,10 +59,7 @@ class LockscreenPreconditionTest : SysuiTestCase() {
|
||||
fun testFullyEnabled() {
|
||||
`when`(deviceProvisionedController.isCurrentUserSetup).thenReturn(true)
|
||||
`when`(deviceProvisionedController.isDeviceProvisioned).thenReturn(true)
|
||||
`when`(featureFlags.isEnabled(Mockito.eq(Flags.SMARTSPACE) ?: Flags.SMARTSPACE))
|
||||
.thenReturn(true)
|
||||
val precondition = LockscreenPrecondition(featureFlags, deviceProvisionedController,
|
||||
execution)
|
||||
val precondition = LockscreenPrecondition(deviceProvisionedController, execution)
|
||||
precondition.addListener(listener)
|
||||
|
||||
`verify`(listener).onCriteriaChanged()
|
||||
@@ -81,10 +73,8 @@ class LockscreenPreconditionTest : SysuiTestCase() {
|
||||
fun testProvisioning() {
|
||||
`when`(deviceProvisionedController.isCurrentUserSetup).thenReturn(true)
|
||||
`when`(deviceProvisionedController.isDeviceProvisioned).thenReturn(false)
|
||||
`when`(featureFlags.isEnabled(Mockito.eq(Flags.SMARTSPACE) ?: Flags.SMARTSPACE))
|
||||
.thenReturn(true)
|
||||
val precondition =
|
||||
LockscreenPrecondition(featureFlags, deviceProvisionedController, execution)
|
||||
LockscreenPrecondition(deviceProvisionedController, execution)
|
||||
precondition.addListener(listener)
|
||||
|
||||
verify(listener).onCriteriaChanged()
|
||||
@@ -109,10 +99,8 @@ class LockscreenPreconditionTest : SysuiTestCase() {
|
||||
fun testUserSetup() {
|
||||
`when`(deviceProvisionedController.isCurrentUserSetup).thenReturn(false)
|
||||
`when`(deviceProvisionedController.isDeviceProvisioned).thenReturn(true)
|
||||
`when`(featureFlags.isEnabled(Mockito.eq(Flags.SMARTSPACE) ?: Flags.SMARTSPACE))
|
||||
.thenReturn(true)
|
||||
val precondition =
|
||||
LockscreenPrecondition(featureFlags, deviceProvisionedController, execution)
|
||||
LockscreenPrecondition(deviceProvisionedController, execution)
|
||||
precondition.addListener(listener)
|
||||
|
||||
verify(listener).onCriteriaChanged()
|
||||
@@ -129,4 +117,4 @@ class LockscreenPreconditionTest : SysuiTestCase() {
|
||||
verify(listener).onCriteriaChanged()
|
||||
assertThat(precondition.conditionsMet()).isTrue()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import android.widget.FrameLayout
|
||||
import androidx.test.filters.SmallTest
|
||||
import com.android.systemui.SysuiTestCase
|
||||
import com.android.systemui.flags.FeatureFlags
|
||||
import com.android.systemui.flags.Flags
|
||||
import com.android.systemui.plugins.ActivityStarter
|
||||
import com.android.systemui.plugins.BcSmartspaceConfigPlugin
|
||||
import com.android.systemui.plugins.BcSmartspaceDataPlugin
|
||||
@@ -177,8 +176,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() {
|
||||
fun setUp() {
|
||||
MockitoAnnotations.initMocks(this)
|
||||
|
||||
`when`(featureFlags.isEnabled(Flags.SMARTSPACE)).thenReturn(true)
|
||||
|
||||
`when`(secureSettings.getUriFor(PRIVATE_LOCKSCREEN_SETTING))
|
||||
.thenReturn(fakePrivateLockscreenSettingUri)
|
||||
`when`(secureSettings.getUriFor(NOTIF_ON_LOCKSCREEN_SETTING))
|
||||
@@ -221,17 +218,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() {
|
||||
deviceProvisionedListener = deviceProvisionedCaptor.value
|
||||
}
|
||||
|
||||
@Test(expected = RuntimeException::class)
|
||||
fun testThrowsIfFlagIsDisabled() {
|
||||
// GIVEN the feature flag is disabled
|
||||
`when`(featureFlags.isEnabled(Flags.SMARTSPACE)).thenReturn(false)
|
||||
|
||||
// WHEN we try to build the view
|
||||
controller.buildAndConnectView(fakeParent)
|
||||
|
||||
// THEN an exception is thrown
|
||||
}
|
||||
|
||||
@Test
|
||||
fun connectOnlyAfterDeviceIsProvisioned() {
|
||||
// GIVEN an unprovisioned device and an attempt to connect
|
||||
|
||||
Reference in New Issue
Block a user