Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 341dc31a authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

Defines flag for ravemped WPP UI (2/5).

This flag is owned in System UI and served to Wallpaper Picker (WPP)
through the existing content provider for quick affordances.

Bug: 262780448
Test: manually made sure that I can read the flag value in wallpaper
picker and its value matches whatever I set the flag to.

Change-Id: I26235a0718cc44c343713a5aef75750f4e59cfa7
parent 77c214e4
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -145,6 +145,9 @@ object KeyguardQuickAffordanceProviderContract {
        const val TABLE_NAME = "flags"
        const val TABLE_NAME = "flags"
        val URI: Uri = BASE_URI.buildUpon().path(TABLE_NAME).build()
        val URI: Uri = BASE_URI.buildUpon().path(TABLE_NAME).build()


        /** Flag denoting whether the Wallpaper Picker should use the new, revamped UI. */
        const val FLAG_NAME_REVAMPED_WALLPAPER_UI = "revamped_wallpaper_ui"

        /**
        /**
         * Flag denoting whether the customizable lock screen quick affordances feature is enabled.
         * Flag denoting whether the customizable lock screen quick affordances feature is enabled.
         */
         */
+6 −5
Original line number Original line Diff line number Diff line
@@ -40,13 +40,13 @@ import com.android.systemui.shared.quickaffordance.data.content.KeyguardQuickAff
import com.android.systemui.statusbar.phone.SystemUIDialog
import com.android.systemui.statusbar.phone.SystemUIDialog
import com.android.systemui.statusbar.policy.KeyguardStateController
import com.android.systemui.statusbar.policy.KeyguardStateController
import dagger.Lazy
import dagger.Lazy
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.flow.onStart
import javax.inject.Inject


@SysUISingleton
@SysUISingleton
class KeyguardQuickAffordanceInteractor
class KeyguardQuickAffordanceInteractor
@@ -294,10 +294,7 @@ constructor(
            SystemUIDialog.setShowForAllUsers(dialog, true)
            SystemUIDialog.setShowForAllUsers(dialog, true)
            SystemUIDialog.registerDismissListener(dialog)
            SystemUIDialog.registerDismissListener(dialog)
            SystemUIDialog.setDialogSize(dialog)
            SystemUIDialog.setDialogSize(dialog)
            launchAnimator.show(
            launchAnimator.show(dialog, controller)
                dialog,
                controller
            )
        }
        }
    }
    }


@@ -354,6 +351,10 @@ constructor(


    fun getPickerFlags(): List<KeyguardPickerFlag> {
    fun getPickerFlags(): List<KeyguardPickerFlag> {
        return listOf(
        return listOf(
            KeyguardPickerFlag(
                name = Contract.FlagsTable.FLAG_NAME_REVAMPED_WALLPAPER_UI,
                value = featureFlags.isEnabled(Flags.REVAMPED_WALLPAPER_UI),
            ),
            KeyguardPickerFlag(
            KeyguardPickerFlag(
                name = Contract.FlagsTable.FLAG_NAME_CUSTOM_LOCK_SCREEN_QUICK_AFFORDANCES_ENABLED,
                name = Contract.FlagsTable.FLAG_NAME_CUSTOM_LOCK_SCREEN_QUICK_AFFORDANCES_ENABLED,
                value = featureFlags.isEnabled(Flags.CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES),
                value = featureFlags.isEnabled(Flags.CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES),
+1 −0
Original line number Original line Diff line number Diff line
@@ -170,6 +170,7 @@ class KeyguardQuickAffordanceProviderTest : SysuiTestCase() {
                    FakeFeatureFlags().apply {
                    FakeFeatureFlags().apply {
                        set(Flags.CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES, true)
                        set(Flags.CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES, true)
                        set(Flags.LOCKSCREEN_CUSTOM_CLOCKS, true)
                        set(Flags.LOCKSCREEN_CUSTOM_CLOCKS, true)
                        set(Flags.REVAMPED_WALLPAPER_UI, true)
                    },
                    },
                repository = { quickAffordanceRepository },
                repository = { quickAffordanceRepository },
                launchAnimator = launchAnimator,
                launchAnimator = launchAnimator,
+1 −1

File changed.

Contains only whitespace changes.