Merge "Fix rate limiting comparison"
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index dce4902..c444156 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -15376,18 +15376,6 @@
public static final String ANGLE_EGL_FEATURES = "angle_egl_features";
/**
- * Comma-separated list of package names that ANGLE may have issues with
- * @hide
- */
- public static final String ANGLE_DEFERLIST = "angle_deferlist";
-
- /**
- * Integer mode of the logic for applying `angle_deferlist`
- * @hide
- */
- public static final String ANGLE_DEFERLIST_MODE = "angle_deferlist_mode";
-
- /**
* Show the "ANGLE In Use" dialog box to the user when ANGLE is the OpenGL driver.
* The value is a boolean (1 or 0).
* @hide
diff --git a/core/proto/android/providers/settings/global.proto b/core/proto/android/providers/settings/global.proto
index 128de8b..052e2f2 100644
--- a/core/proto/android/providers/settings/global.proto
+++ b/core/proto/android/providers/settings/global.proto
@@ -471,10 +471,6 @@
optional SettingProto updatable_driver_prerelease_opt_in_apps = 18;
optional SettingProto angle_egl_features = 19;
- // ANGLE - List of Apps that ANGLE may have issues with
- optional SettingProto angle_deferlist = 20;
- // ANGLE - Integer mode of the logic for applying `angle_deferlist`
- optional SettingProto angle_deferlist_mode = 21;
}
optional Gpu gpu = 59;
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index c6fa7c58..68cfd19 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1854,6 +1854,11 @@
<item>telephony</item>
</string-array>
+ <!-- The difference in millis that has to exist between a time suggestion under
+ consideration by the time_detector and the system clock before the system clock will be
+ changed. -->
+ <integer name="config_timeDetectorAutoUpdateDiffMillis">2000</integer>
+
<!-- Enables the GnssTimeUpdate service. This is the global switch for enabling Gnss time based
suggestions to TimeDetector service. See also config_autoTimeSourcesPriority. -->
<bool name="config_enableGnssTimeUpdateService">false</bool>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 2451bd1..b543d20 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2241,6 +2241,7 @@
<java-symbol type="string" name="config_persistentDataPackageName" />
<java-symbol type="string" name="config_deviceConfiguratorPackageName" />
<java-symbol type="array" name="config_autoTimeSourcesPriority" />
+ <java-symbol type="integer" name="config_timeDetectorAutoUpdateDiffMillis" />
<java-symbol type="bool" name="config_enableGnssTimeUpdateService" />
<java-symbol type="bool" name="config_enableGeolocationTimeZoneDetection" />
<java-symbol type="bool" name="config_enablePrimaryLocationTimeZoneProvider" />
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
index a48be5e..91c7cc0 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
@@ -1346,7 +1346,7 @@
// Recreates & shows the education views. Call when a theme/config change happens.
private void updateUserEdu() {
- if (isStackEduVisible()) {
+ if (isStackEduVisible() && !mStackEduView.isHiding()) {
removeView(mStackEduView);
mStackEduView = new StackEducationView(mContext, mPositioner, mBubbleController);
addView(mStackEduView);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/StackEducationView.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/StackEducationView.kt
index 627273f..d0598cd 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/StackEducationView.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/StackEducationView.kt
@@ -37,8 +37,7 @@
context: Context,
positioner: BubblePositioner,
controller: BubbleController
-)
- : LinearLayout(context) {
+) : LinearLayout(context) {
private val TAG = if (BubbleDebugConfig.TAG_WITH_CLASS_NAME) "BubbleStackEducationView"
else BubbleDebugConfig.TAG_BUBBLES
@@ -53,7 +52,8 @@
private val titleTextView by lazy { findViewById<TextView>(R.id.stack_education_title) }
private val descTextView by lazy { findViewById<TextView>(R.id.stack_education_description) }
- private var isHiding = false
+ var isHiding = false
+ private set
init {
LayoutInflater.from(context).inflate(R.layout.bubble_stack_user_education, this)
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 5544b09..1192e00 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -785,12 +785,6 @@
Settings.Global.ANGLE_EGL_FEATURES,
GlobalSettingsProto.Gpu.ANGLE_EGL_FEATURES);
dumpSetting(s, p,
- Settings.Global.ANGLE_DEFERLIST,
- GlobalSettingsProto.Gpu.ANGLE_DEFERLIST);
- dumpSetting(s, p,
- Settings.Global.ANGLE_DEFERLIST_MODE,
- GlobalSettingsProto.Gpu.ANGLE_DEFERLIST_MODE);
- dumpSetting(s, p,
Settings.Global.SHOW_ANGLE_IN_USE_DIALOG_BOX,
GlobalSettingsProto.Gpu.SHOW_ANGLE_IN_USE_DIALOG);
dumpSetting(s, p,
diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
index c2ab87ab0..a64cf11 100644
--- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
+++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
@@ -519,8 +519,6 @@
Settings.Global.ANGLE_GL_DRIVER_SELECTION_PKGS,
Settings.Global.ANGLE_GL_DRIVER_SELECTION_VALUES,
Settings.Global.ANGLE_EGL_FEATURES,
- Settings.Global.ANGLE_DEFERLIST,
- Settings.Global.ANGLE_DEFERLIST_MODE,
Settings.Global.UPDATABLE_DRIVER_ALL_APPS,
Settings.Global.UPDATABLE_DRIVER_PRODUCTION_OPT_IN_APPS,
Settings.Global.UPDATABLE_DRIVER_PRERELEASE_OPT_IN_APPS,
diff --git a/packages/SystemUI/compose/facade/disabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt b/packages/SystemUI/compose/facade/disabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt
index 24064b1..5413f90 100644
--- a/packages/SystemUI/compose/facade/disabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt
+++ b/packages/SystemUI/compose/facade/disabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt
@@ -17,10 +17,12 @@
package com.android.systemui.scene.ui.composable
import com.android.systemui.scene.shared.model.Scene
+import com.android.systemui.scene.shared.model.SceneContainerNames
import dagger.Module
import dagger.multibindings.Multibinds
+import javax.inject.Named
@Module
interface SceneModule {
- @Multibinds fun scenes(): Set<Scene>
+ @Multibinds @Named(SceneContainerNames.SYSTEM_UI_DEFAULT) fun scenes(): Set<Scene>
}
diff --git a/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt b/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt
index ee53ece..954bad56 100644
--- a/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt
+++ b/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/scene/ui/composable/SceneModule.kt
@@ -17,22 +17,32 @@
package com.android.systemui.scene.ui.composable
import com.android.systemui.bouncer.ui.composable.BouncerScene
+import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.keyguard.ui.composable.LockscreenScene
+import com.android.systemui.keyguard.ui.viewmodel.LockscreenSceneViewModel
import com.android.systemui.qs.ui.composable.QuickSettingsScene
+import com.android.systemui.qs.ui.viewmodel.QuickSettingsSceneViewModel
import com.android.systemui.scene.shared.model.Scene
+import com.android.systemui.scene.shared.model.SceneContainerNames
import com.android.systemui.shade.ui.composable.ShadeScene
+import com.android.systemui.shade.ui.viewmodel.ShadeSceneViewModel
import dagger.Module
import dagger.Provides
+import javax.inject.Named
+import kotlinx.coroutines.CoroutineScope
@Module
object SceneModule {
@Provides
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
fun scenes(
- bouncer: BouncerScene,
- gone: GoneScene,
- lockScreen: LockscreenScene,
- qs: QuickSettingsScene,
- shade: ShadeScene,
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT) bouncer: BouncerScene,
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT) gone: GoneScene,
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT) lockScreen: LockscreenScene,
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT) qs: QuickSettingsScene,
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT) shade: ShadeScene,
): Set<Scene> {
return setOf(
bouncer,
@@ -42,4 +52,71 @@
shade,
)
}
+
+ @Provides
+ @SysUISingleton
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
+ fun bouncerScene(
+ viewModelFactory: BouncerViewModel.Factory,
+ ): BouncerScene {
+ return BouncerScene(
+ viewModel =
+ viewModelFactory.create(
+ containerName = SceneContainerNames.SYSTEM_UI_DEFAULT,
+ ),
+ )
+ }
+
+ @Provides
+ @SysUISingleton
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
+ fun goneScene(): GoneScene {
+ return GoneScene()
+ }
+
+ @Provides
+ @SysUISingleton
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
+ fun lockscreenScene(
+ @Application applicationScope: CoroutineScope,
+ viewModelFactory: LockscreenSceneViewModel.Factory,
+ ): LockscreenScene {
+ return LockscreenScene(
+ applicationScope = applicationScope,
+ viewModel =
+ viewModelFactory.create(
+ containerName = SceneContainerNames.SYSTEM_UI_DEFAULT,
+ ),
+ )
+ }
+
+ @Provides
+ @SysUISingleton
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
+ fun quickSettingsScene(
+ viewModelFactory: QuickSettingsSceneViewModel.Factory,
+ ): QuickSettingsScene {
+ return QuickSettingsScene(
+ viewModel =
+ viewModelFactory.create(
+ containerName = SceneContainerNames.SYSTEM_UI_DEFAULT,
+ ),
+ )
+ }
+
+ @Provides
+ @SysUISingleton
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
+ fun shadeScene(
+ @Application applicationScope: CoroutineScope,
+ viewModelFactory: ShadeSceneViewModel.Factory,
+ ): ShadeScene {
+ return ShadeScene(
+ applicationScope = applicationScope,
+ viewModel =
+ viewModelFactory.create(
+ containerName = SceneContainerNames.SYSTEM_UI_DEFAULT,
+ ),
+ )
+ }
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
index f48bab9..3c74ef5 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
@@ -40,22 +40,17 @@
import com.android.systemui.bouncer.ui.viewmodel.PasswordBouncerViewModel
import com.android.systemui.bouncer.ui.viewmodel.PatternBouncerViewModel
import com.android.systemui.bouncer.ui.viewmodel.PinBouncerViewModel
-import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.scene.shared.model.SceneKey
import com.android.systemui.scene.shared.model.SceneModel
import com.android.systemui.scene.shared.model.UserAction
import com.android.systemui.scene.ui.composable.ComposableScene
-import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
/** The bouncer scene displays authentication challenges like PIN, password, or pattern. */
-@SysUISingleton
-class BouncerScene
-@Inject
-constructor(
- private val viewModelFactory: BouncerViewModel.Factory,
+class BouncerScene(
+ private val viewModel: BouncerViewModel,
) : ComposableScene {
override val key = SceneKey.Bouncer
@@ -73,7 +68,7 @@
override fun Content(
containerName: String,
modifier: Modifier,
- ) = BouncerScene(viewModelFactory.create(containerName), modifier)
+ ) = BouncerScene(viewModel, modifier)
}
@Composable
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt
index 7c07a8b..1065267 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt
@@ -31,7 +31,6 @@
import androidx.compose.ui.unit.dp
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.common.ui.compose.Icon
-import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.keyguard.ui.viewmodel.LockscreenSceneViewModel
import com.android.systemui.scene.shared.model.Direction
@@ -39,7 +38,6 @@
import com.android.systemui.scene.shared.model.SceneModel
import com.android.systemui.scene.shared.model.UserAction
import com.android.systemui.scene.ui.composable.ComposableScene
-import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
@@ -47,29 +45,22 @@
import kotlinx.coroutines.flow.stateIn
/** The lock screen scene shows when the device is locked. */
-@SysUISingleton
-class LockscreenScene
-@Inject
-constructor(
+class LockscreenScene(
@Application private val applicationScope: CoroutineScope,
- private val viewModelFactory: LockscreenSceneViewModel.Factory,
+ private val viewModel: LockscreenSceneViewModel,
) : ComposableScene {
override val key = SceneKey.Lockscreen
- private var unsafeViewModel: LockscreenSceneViewModel? = null
-
override fun destinationScenes(
containerName: String,
): StateFlow<Map<UserAction, SceneModel>> =
- getOrCreateViewModelSingleton(containerName).let { viewModel ->
- viewModel.upDestinationSceneKey
- .map { pageKey -> destinationScenes(up = pageKey) }
- .stateIn(
- scope = applicationScope,
- started = SharingStarted.Eagerly,
- initialValue = destinationScenes(up = viewModel.upDestinationSceneKey.value)
- )
- }
+ viewModel.upDestinationSceneKey
+ .map { pageKey -> destinationScenes(up = pageKey) }
+ .stateIn(
+ scope = applicationScope,
+ started = SharingStarted.Eagerly,
+ initialValue = destinationScenes(up = viewModel.upDestinationSceneKey.value)
+ )
@Composable
override fun Content(
@@ -77,7 +68,7 @@
modifier: Modifier,
) {
LockscreenScene(
- viewModel = getOrCreateViewModelSingleton(containerName),
+ viewModel = viewModel,
modifier = modifier,
)
}
@@ -90,13 +81,6 @@
UserAction.Swipe(Direction.DOWN) to SceneModel(SceneKey.Shade)
)
}
-
- private fun getOrCreateViewModelSingleton(
- containerName: String,
- ): LockscreenSceneViewModel {
- return unsafeViewModel
- ?: viewModelFactory.create(containerName).also { unsafeViewModel = it }
- }
}
@Composable
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
index 58db37e..30b80ca 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
@@ -27,24 +27,19 @@
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
-import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.qs.ui.viewmodel.QuickSettingsSceneViewModel
import com.android.systemui.scene.shared.model.Direction
import com.android.systemui.scene.shared.model.SceneKey
import com.android.systemui.scene.shared.model.SceneModel
import com.android.systemui.scene.shared.model.UserAction
import com.android.systemui.scene.ui.composable.ComposableScene
-import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
/** The Quick Settings (AKA "QS") scene shows the quick setting tiles. */
-@SysUISingleton
-class QuickSettingsScene
-@Inject
-constructor(
- private val viewModelFactory: QuickSettingsSceneViewModel.Factory,
+class QuickSettingsScene(
+ private val viewModel: QuickSettingsSceneViewModel,
) : ComposableScene {
override val key = SceneKey.QuickSettings
@@ -64,7 +59,7 @@
modifier: Modifier,
) {
QuickSettingsScene(
- viewModel = viewModelFactory.create(containerName),
+ viewModel = viewModel,
modifier = modifier,
)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt
index b387463..0a4da1d 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt
@@ -23,12 +23,10 @@
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
-import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.scene.shared.model.Direction
import com.android.systemui.scene.shared.model.SceneKey
import com.android.systemui.scene.shared.model.SceneModel
import com.android.systemui.scene.shared.model.UserAction
-import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
@@ -37,8 +35,7 @@
* "Gone" is not a real scene but rather the absence of scenes when we want to skip showing any
* content from the scene framework.
*/
-@SysUISingleton
-class GoneScene @Inject constructor() : ComposableScene {
+class GoneScene : ComposableScene {
override val key = SceneKey.Gone
override fun destinationScenes(
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
index e4513d0..20e1751 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
@@ -27,7 +27,6 @@
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
-import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.scene.shared.model.Direction
import com.android.systemui.scene.shared.model.SceneKey
@@ -35,7 +34,6 @@
import com.android.systemui.scene.shared.model.UserAction
import com.android.systemui.scene.ui.composable.ComposableScene
import com.android.systemui.shade.ui.viewmodel.ShadeSceneViewModel
-import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
@@ -43,29 +41,22 @@
import kotlinx.coroutines.flow.stateIn
/** The shade scene shows scrolling list of notifications and some of the quick setting tiles. */
-@SysUISingleton
-class ShadeScene
-@Inject
-constructor(
+class ShadeScene(
@Application private val applicationScope: CoroutineScope,
- private val viewModelFactory: ShadeSceneViewModel.Factory,
+ private val viewModel: ShadeSceneViewModel,
) : ComposableScene {
override val key = SceneKey.Shade
- private var unsafeViewModel: ShadeSceneViewModel? = null
-
override fun destinationScenes(
containerName: String,
): StateFlow<Map<UserAction, SceneModel>> =
- getOrCreateViewModelSingleton(containerName).let { viewModel ->
- viewModel.upDestinationSceneKey
- .map { sceneKey -> destinationScenes(up = sceneKey) }
- .stateIn(
- scope = applicationScope,
- started = SharingStarted.Eagerly,
- initialValue = destinationScenes(up = viewModel.upDestinationSceneKey.value),
- )
- }
+ viewModel.upDestinationSceneKey
+ .map { sceneKey -> destinationScenes(up = sceneKey) }
+ .stateIn(
+ scope = applicationScope,
+ started = SharingStarted.Eagerly,
+ initialValue = destinationScenes(up = viewModel.upDestinationSceneKey.value),
+ )
@Composable
override fun Content(
@@ -73,7 +64,7 @@
modifier: Modifier,
) {
ShadeScene(
- viewModel = getOrCreateViewModelSingleton(containerName),
+ viewModel = viewModel,
modifier = modifier,
)
}
@@ -86,13 +77,6 @@
UserAction.Swipe(Direction.DOWN) to SceneModel(SceneKey.QuickSettings),
)
}
-
- private fun getOrCreateViewModelSingleton(
- containerName: String,
- ): ShadeSceneViewModel {
- return unsafeViewModel
- ?: viewModelFactory.create(containerName).also { unsafeViewModel = it }
- }
}
@Composable
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index 61d6fed..5850847 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -213,6 +213,7 @@
)
/** Whether to use a new data source for intents to run on keyguard dismissal. */
+ // TODO(b/275069969): Tracking bug.
@JvmField
val REFACTOR_KEYGUARD_DISMISS_INTENT = unreleasedFlag(231, "refactor_keyguard_dismiss_intent")
@@ -243,6 +244,11 @@
@JvmField
val MIGRATE_INDICATION_AREA = unreleasedFlag(236, "migrate_indication_area")
+ /** Whether to listen for fingerprint authentication over keyguard occluding activities. */
+ // TODO(b/283260512): Tracking bug.
+ @JvmField
+ val FP_LISTEN_OCCLUDING_APPS = unreleasedFlag(237, "fp_listen_occluding_apps")
+
// 300 - power menu
// TODO(b/254512600): Tracking Bug
@JvmField val POWER_MENU_LITE = releasedFlag(300, "power_menu_lite")
@@ -717,4 +723,12 @@
@JvmField
val SPLIT_SHADE_SUBPIXEL_OPTIMIZATION =
unreleasedFlag(2805, "split_shade_subpixel_optimization", teamfood = true)
+
+ // TODO(b/278761837): Tracking Bug
+ @JvmField
+ val USE_NEW_ACTIVITY_STARTER = releasedFlag(2801, name = "use_new_activity_starter")
+
+ // TODO(b/283084712): Tracking Bug
+ @JvmField
+ val IMPROVED_HUN_ANIMATIONS = unreleasedFlag(283084712, "improved_hun_animations")
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt b/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt
index 6d7455f..752471d 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt
@@ -16,12 +16,16 @@
package com.android.systemui.scene
+import com.android.systemui.scene.data.model.SceneContainerConfigModule
import com.android.systemui.scene.ui.composable.SceneModule
+import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModelModule
import dagger.Module
@Module(
includes =
[
+ SceneContainerConfigModule::class,
+ SceneContainerViewModelModule::class,
SceneModule::class,
],
)
diff --git a/packages/SystemUI/src/com/android/systemui/scene/data/model/SceneContainerConfigModule.kt b/packages/SystemUI/src/com/android/systemui/scene/data/model/SceneContainerConfigModule.kt
new file mode 100644
index 0000000..0af8094
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/scene/data/model/SceneContainerConfigModule.kt
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.scene.data.model
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.scene.shared.model.SceneContainerNames
+import com.android.systemui.scene.shared.model.SceneKey
+import dagger.Module
+import dagger.Provides
+import javax.inject.Named
+
+@Module
+object SceneContainerConfigModule {
+
+ @Provides
+ fun containerConfigs(): Map<String, SceneContainerConfig> {
+ return mapOf(
+ SceneContainerNames.SYSTEM_UI_DEFAULT to
+ SceneContainerConfig(
+ name = SceneContainerNames.SYSTEM_UI_DEFAULT,
+ // Note that this list is in z-order. The first one is the bottom-most and the
+ // last
+ // one is top-most.
+ sceneKeys =
+ listOf(
+ SceneKey.Gone,
+ SceneKey.Lockscreen,
+ SceneKey.Bouncer,
+ SceneKey.Shade,
+ SceneKey.QuickSettings,
+ ),
+ initialSceneKey = SceneKey.Lockscreen,
+ ),
+ )
+ }
+
+ @Provides
+ @SysUISingleton
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
+ fun provideDefaultSceneContainerConfig(
+ configs: Map<String, SceneContainerConfig>,
+ ): SceneContainerConfig {
+ return checkNotNull(configs[SceneContainerNames.SYSTEM_UI_DEFAULT]) {
+ "No SceneContainerConfig named \"${SceneContainerNames.SYSTEM_UI_DEFAULT}\"."
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneContainerNames.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneContainerNames.kt
new file mode 100644
index 0000000..64f5087
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneContainerNames.kt
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.scene.shared.model
+
+object SceneContainerNames {
+ const val SYSTEM_UI_DEFAULT = "system_ui"
+}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt
index a4daafc..8c1ad9b 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt
@@ -19,17 +19,12 @@
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.model.SceneKey
import com.android.systemui.scene.shared.model.SceneModel
-import dagger.assisted.Assisted
-import dagger.assisted.AssistedFactory
-import dagger.assisted.AssistedInject
import kotlinx.coroutines.flow.StateFlow
/** Models UI state for a single scene container. */
-class SceneContainerViewModel
-@AssistedInject
-constructor(
+class SceneContainerViewModel(
private val interactor: SceneInteractor,
- @Assisted val containerName: String,
+ val containerName: String,
) {
/**
* Keys of all scenes in the container.
@@ -54,11 +49,4 @@
fun setSceneTransitionProgress(progress: Float) {
interactor.setSceneTransitionProgress(containerName, progress)
}
-
- @AssistedFactory
- interface Factory {
- fun create(
- containerName: String,
- ): SceneContainerViewModel
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelModule.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelModule.kt
new file mode 100644
index 0000000..100f427
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelModule.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.scene.ui.viewmodel
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.scene.domain.interactor.SceneInteractor
+import com.android.systemui.scene.shared.model.SceneContainerNames
+import dagger.Module
+import dagger.Provides
+import javax.inject.Named
+
+@Module
+object SceneContainerViewModelModule {
+
+ @Provides
+ @SysUISingleton
+ @Named(SceneContainerNames.SYSTEM_UI_DEFAULT)
+ fun defaultSceneContainerViewModel(
+ interactor: SceneInteractor,
+ ): SceneContainerViewModel {
+ return SceneContainerViewModel(
+ interactor = interactor,
+ containerName = SceneContainerNames.SYSTEM_UI_DEFAULT,
+ )
+ }
+}
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java
index 4aeb4a4..cd6de87 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceShellCommand.java
@@ -349,7 +349,8 @@
private int isFieldDetectionServiceEnabled(PrintWriter pw) {
final int userId = getNextIntArgRequired();
String name = mService.getFieldDetectionServiceName(userId);
- boolean enabled = !TextUtils.isEmpty(name);
+ boolean pccFlagEnabled = mService.isPccClassificationFlagEnabled();
+ boolean enabled = (!TextUtils.isEmpty(name)) && pccFlagEnabled;
pw.println(enabled);
return 0;
}
diff --git a/services/core/java/com/android/server/DockObserver.java b/services/core/java/com/android/server/DockObserver.java
index e2fd37e..9554e63 100644
--- a/services/core/java/com/android/server/DockObserver.java
+++ b/services/core/java/com/android/server/DockObserver.java
@@ -36,6 +36,7 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.DumpUtils;
+import com.android.internal.util.FrameworkStatsLog;
import com.android.server.ExtconUEventObserver.ExtconInfo;
import java.io.FileDescriptor;
@@ -194,6 +195,8 @@
@Override
public void onStart() {
publishBinderService(TAG, new BinderService());
+ // Logs dock state after setDockStateFromProviderLocked sets mReportedDockState
+ FrameworkStatsLog.write(FrameworkStatsLog.DOCK_STATE_CHANGED, mReportedDockState);
}
@Override
@@ -255,7 +258,6 @@
+ mReportedDockState);
final int previousDockState = mPreviousDockState;
mPreviousDockState = mReportedDockState;
-
// Skip the dock intent if not yet provisioned.
final ContentResolver cr = getContext().getContentResolver();
if (!mDeviceProvisionedObserver.isDeviceProvisioned()) {
diff --git a/services/core/java/com/android/server/timedetector/ServiceConfigAccessorImpl.java b/services/core/java/com/android/server/timedetector/ServiceConfigAccessorImpl.java
index dc2a974..58c31d5 100644
--- a/services/core/java/com/android/server/timedetector/ServiceConfigAccessorImpl.java
+++ b/services/core/java/com/android/server/timedetector/ServiceConfigAccessorImpl.java
@@ -39,7 +39,6 @@
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.database.ContentObserver;
-import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
@@ -65,8 +64,6 @@
*/
final class ServiceConfigAccessorImpl implements ServiceConfigAccessor {
- private static final int SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT = 2 * 1000;
-
/**
* An absolute threshold at/below which the system clock confidence can be upgraded. i.e. if the
* detector receives a high-confidence time and the current system clock is +/- this value from
@@ -122,9 +119,8 @@
mConfigOriginPrioritiesSupplier = new ConfigOriginPrioritiesSupplier(context);
mServerFlagsOriginPrioritiesSupplier =
new ServerFlagsOriginPrioritiesSupplier(mServerFlags);
- mSystemClockUpdateThresholdMillis =
- SystemProperties.getInt("ro.sys.time_detector_update_diff",
- SYSTEM_CLOCK_UPDATE_THRESHOLD_MILLIS_DEFAULT);
+ mSystemClockUpdateThresholdMillis = context.getResources().getInteger(
+ R.integer.config_timeDetectorAutoUpdateDiffMillis);
// Wire up the config change listeners for anything that could affect ConfigurationInternal.
// Use the main thread for event delivery, listeners can post to their chosen thread.