summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David Thames <davidct@google.com> 2024-09-04 23:08:56 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-09-04 23:08:56 +0000
commit32b87237b6031144e8ce6314939bdb99f6f0dfdf (patch)
tree7ebbec440214fca470286cd187fabb2a49b7eb3e
parent6c4f8e3708730b0c0989d35e2b4230b17b23d180 (diff)
parent0d7957f89cd4f73edbe3995f89bbb976c42618c9 (diff)
Merge "Add aconfig flag for ViewPager2 in smartspace" into main
-rw-r--r--packages/SystemUI/aconfig/systemui.aconfig7
-rw-r--r--packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceConfigPlugin.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/smartspace/config/BcSmartspaceConfigProvider.kt4
3 files changed, 13 insertions, 0 deletions
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index cf13621c2c1b..402d4673e7e3 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -651,6 +651,13 @@ flag {
}
flag {
+ name: "smartspace_viewpager2"
+ namespace: "systemui"
+ description: "Use viewpager2 in Smartspace"
+ bug: "259566300"
+}
+
+flag {
name: "pin_input_field_styled_focus_state"
namespace: "systemui"
description: "Enables styled focus states on pin input field if keyboard is connected"
diff --git a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceConfigPlugin.kt b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceConfigPlugin.kt
index 509f022310d0..84f39afee834 100644
--- a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceConfigPlugin.kt
+++ b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceConfigPlugin.kt
@@ -21,4 +21,6 @@ package com.android.systemui.plugins
interface BcSmartspaceConfigPlugin {
/** Gets default date/weather disabled status. */
val isDefaultDateWeatherDisabled: Boolean
+ /** Gets if Smartspace should use ViewPager2 */
+ val isViewPager2Enabled: Boolean
}
diff --git a/packages/SystemUI/src/com/android/systemui/smartspace/config/BcSmartspaceConfigProvider.kt b/packages/SystemUI/src/com/android/systemui/smartspace/config/BcSmartspaceConfigProvider.kt
index 922560f16dce..0e1bf728ca46 100644
--- a/packages/SystemUI/src/com/android/systemui/smartspace/config/BcSmartspaceConfigProvider.kt
+++ b/packages/SystemUI/src/com/android/systemui/smartspace/config/BcSmartspaceConfigProvider.kt
@@ -16,6 +16,7 @@
package com.android.systemui.smartspace.config
+import com.android.systemui.Flags.smartspaceViewpager2
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.plugins.BcSmartspaceConfigPlugin
@@ -23,4 +24,7 @@ class BcSmartspaceConfigProvider(private val featureFlags: FeatureFlags) :
BcSmartspaceConfigPlugin {
override val isDefaultDateWeatherDisabled: Boolean
get() = true
+
+ override val isViewPager2Enabled: Boolean
+ get() = smartspaceViewpager2()
}