summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-10-09 11:14:30 -0700
committerXin Li <delphij@google.com>2020-10-10 20:38:57 -0700
commit986e6eeddf02959975e63a7cd138e70784540bf6 (patch)
treebf060846893c657436f9429650f2240f048dd0be
parent1015bae311220fe8242c33e58e11a932ed6f8a3a (diff)
parent539d92beb7ed3638107c6d90c2f6a2e8a891256d (diff)
Merge ab/6749736 in stage.
Bug: 167233921 Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
-rw-r--r--Android.bp2
-rw-r--r--core/java/android/companion/BluetoothDeviceFilter.java10
-rw-r--r--core/java/android/content/pm/PermissionInfo.java3
-rw-r--r--core/java/android/hardware/camera2/CameraDevice.java4
-rw-r--r--core/java/android/hardware/display/DisplayManagerInternal.java7
-rw-r--r--core/java/android/os/GraphicsEnvironment.java50
-rw-r--r--core/java/android/os/PowerManagerInternal.java4
-rw-r--r--core/java/android/os/ZygoteProcess.java4
-rwxr-xr-xcore/java/android/provider/Settings.java27
-rw-r--r--core/java/android/service/wallpaper/IWallpaperEngine.aidl1
-rw-r--r--core/java/android/service/wallpaper/WallpaperService.java63
-rw-r--r--core/java/android/view/ViewRootImpl.java25
-rw-r--r--core/java/android/view/accessibility/AccessibilityNodeInfo.java4
-rw-r--r--core/java/android/view/inputmethod/InlineSuggestionsRequest.java20
-rw-r--r--core/java/android/view/inputmethod/InlineSuggestionsResponse.java38
-rw-r--r--core/java/com/android/internal/os/ZygoteInit.java3
-rw-r--r--core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java7
-rw-r--r--core/jni/android_net_NetUtils.cpp5
-rw-r--r--core/proto/android/providers/settings/global.proto10
-rw-r--r--core/res/res/values/config.xml5
-rw-r--r--core/res/res/values/strings.xml4
-rw-r--r--core/res/res/values/symbols.xml2
-rw-r--r--core/res/res/values/themes.xml2
-rw-r--r--data/etc/privapp-permissions-platform.xml1
-rw-r--r--framework-jarjar-rules.txt4
-rw-r--r--graphics/proto/Android.bp6
-rw-r--r--graphics/proto/updatable_driver.proto (renamed from graphics/proto/game_driver.proto)12
-rw-r--r--libs/hwui/JankTracker.cpp3
-rw-r--r--libs/hwui/JankTracker.h2
-rw-r--r--libs/hwui/service/GraphicsStatsService.cpp1
-rw-r--r--media/jni/audioeffect/Visualizer.cpp5
-rw-r--r--media/jni/audioeffect/Visualizer.h3
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java3
-rw-r--r--packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java21
-rw-r--r--packages/SettingsLib/Tile/src/com/android/settingslib/drawer/Tile.java8
-rw-r--r--packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java10
-rw-r--r--packages/SettingsLib/res/values/arrays.xml8
-rw-r--r--packages/SettingsLib/res/values/strings.xml3
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java45
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java16
-rw-r--r--packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java9
-rw-r--r--packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java3
-rw-r--r--packages/SystemUI/res/drawable/ic_reverse_charging.xml24
-rw-r--r--packages/SystemUI/res/drawable/rounded_corner_bottom.xml16
-rw-r--r--packages/SystemUI/res/drawable/rounded_corner_top.xml16
-rw-r--r--packages/SystemUI/res/layout/rounded_corners.xml1
-rw-r--r--packages/SystemUI/res/layout/rounded_corners_bottom.xml36
-rw-r--r--packages/SystemUI/res/layout/rounded_corners_top.xml36
-rw-r--r--packages/SystemUI/res/layout/wireless_charging_layout.xml20
-rw-r--r--packages/SystemUI/res/values/config.xml26
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/SyncRtSurfaceTransactionApplierCompat.java34
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java5
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java45
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/BatteryMeterView.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/ScreenDecorations.java142
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java31
-rw-r--r--packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java114
-rw-r--r--packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerProxy.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/classifier/brightline/BrightLineFalsingManager.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingClassifier.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingDataProvider.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/classifier/brightline/ProximityClassifier.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java30
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeService.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java38
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/dagger/QSModule.java59
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java21
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java21
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/LightsOutNotifController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenLockIconController.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java81
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java46
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java28
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java20
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java34
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/sensors/PrimaryProxSensor.java30
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/sensors/ProximitySensor.java299
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/sensors/SecondaryProxSensor.java30
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/sensors/SensorModule.java66
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensor.java118
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensorImpl.java325
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java39
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/BrightLineFalsingManagerTest.java35
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ClassifierTest.java15
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/FalsingDataProviderTest.java14
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ProximityClassifierTest.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java51
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/doze/DozeSensorsTest.java16
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/AutoAddTrackerTest.java6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java71
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LightsOutNotifControllerTest.java18
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeProximitySensor.java12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeThresholdSensor.java81
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximityCheckTest.java21
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorDualTest.java364
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorTest.java262
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/sensors/ThresholdSensorImplTest.java313
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBatteryController.java11
-rw-r--r--packages/Tethering/res/values-mcc310-mnc004-ne/strings.xml24
-rw-r--r--packages/Tethering/res/values-mcc310-mnc004-zh-rTW/strings.xml24
-rw-r--r--packages/Tethering/res/values-mcc311-mnc480-ne/strings.xml24
-rw-r--r--packages/Tethering/res/values-mcc311-mnc480-zh-rTW/strings.xml24
-rw-r--r--packages/Tethering/res/values-zh-rTW/strings.xml29
-rw-r--r--packages/overlays/AccentColorAmethystOverlay/Android.mk29
-rw-r--r--packages/overlays/AccentColorAmethystOverlay/AndroidManifest.xml26
-rw-r--r--packages/overlays/AccentColorAmethystOverlay/res/values/colors_device_defaults.xml23
-rw-r--r--packages/overlays/AccentColorAmethystOverlay/res/values/strings.xml24
-rw-r--r--packages/overlays/AccentColorAquamarineOverlay/Android.mk29
-rw-r--r--packages/overlays/AccentColorAquamarineOverlay/AndroidManifest.xml26
-rw-r--r--packages/overlays/AccentColorAquamarineOverlay/res/values/colors_device_defaults.xml23
-rw-r--r--packages/overlays/AccentColorAquamarineOverlay/res/values/strings.xml24
-rw-r--r--packages/overlays/AccentColorCarbonOverlay/Android.mk29
-rw-r--r--packages/overlays/AccentColorCarbonOverlay/AndroidManifest.xml23
-rw-r--r--packages/overlays/AccentColorCarbonOverlay/res/values/colors_device_defaults.xml (renamed from packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-eu/strings.xml)11
-rw-r--r--packages/overlays/AccentColorCarbonOverlay/res/values/strings.xml21
-rw-r--r--packages/overlays/AccentColorPaletteOverlay/Android.mk29
-rw-r--r--packages/overlays/AccentColorPaletteOverlay/AndroidManifest.xml23
-rw-r--r--packages/overlays/AccentColorPaletteOverlay/res/values/colors_device_defaults.xml (renamed from packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-kk/strings.xml)11
-rw-r--r--packages/overlays/AccentColorPaletteOverlay/res/values/strings.xml21
-rw-r--r--packages/overlays/AccentColorSandOverlay/Android.mk29
-rw-r--r--packages/overlays/AccentColorSandOverlay/AndroidManifest.xml23
-rw-r--r--packages/overlays/AccentColorSandOverlay/res/values/colors_device_defaults.xml (renamed from packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-gu/strings.xml)11
-rw-r--r--packages/overlays/AccentColorSandOverlay/res/values/strings.xml21
-rw-r--r--packages/overlays/AccentColorTangerineOverlay/Android.mk29
-rw-r--r--packages/overlays/AccentColorTangerineOverlay/AndroidManifest.xml25
-rw-r--r--packages/overlays/AccentColorTangerineOverlay/res/values/colors_device_defaults.xml23
-rw-r--r--packages/overlays/AccentColorTangerineOverlay/res/values/strings.xml25
-rw-r--r--packages/overlays/Android.mk8
-rw-r--r--packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenrecord.xml18
-rw-r--r--packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenrecord.xml18
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/Android.mk28
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/AndroidManifest.xml22
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm.xml34
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml225
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml203
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml182
-rw-r--r--packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_work_apps_off.xml19
-rw-r--r--packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_select.xml24
-rw-r--r--packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_share.xml31
-rw-r--r--packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_accessibility_generic.xml22
-rw-r--r--packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_restore.xml19
-rw-r--r--packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_force_stop.xml20
-rw-r--r--packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_gestures.xml19
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/Android.mk29
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_lock.xml318
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_scanning.xml18
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_to_error.xml18
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_unlock.xml296
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_brightness_thumb.xml20
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenrecord.xml18
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml69
-rw-r--r--packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml69
-rw-r--r--packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenrecord.xml18
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/Android.mk28
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/AndroidManifest.xml22
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm.xml31
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml18
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml18
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml18
-rw-r--r--packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_work_apps_off.xml19
-rw-r--r--packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_select.xml24
-rw-r--r--packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_share.xml31
-rw-r--r--packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_accessibility_generic.xml22
-rw-r--r--packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_restore.xml19
-rw-r--r--packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_force_stop.xml20
-rw-r--r--packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_gestures.xml20
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/Android.mk29
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_lock.xml18
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_scanning.xml18
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_to_error.xml18
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_unlock.xml18
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_brightness_thumb.xml20
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenrecord.xml18
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml18
-rw-r--r--packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml18
-rw-r--r--packages/overlays/IconPackVictorAndroidOverlay/Android.mk28
-rw-r--r--packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm.xml34
-rw-r--r--packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_dnd.xml19
-rw-r--r--packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_select.xml24
-rw-r--r--packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_share.xml31
-rw-r--r--packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_accessibility_generic.xml19
-rw-r--r--packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml19
-rw-r--r--packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_restore.xml19
-rw-r--r--packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_force_stop.xml20
-rw-r--r--packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_gestures.xml20
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/Android.mk29
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_lock.xml18
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_scanning.xml18
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_to_error.xml18
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_unlock.xml18
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_brightness_thumb.xml20
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenrecord.xml18
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot.xml30
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml18
-rw-r--r--packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml18
-rw-r--r--packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml1
-rw-r--r--packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml1
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerConstants.java10
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java4
-rw-r--r--services/core/java/com/android/server/am/CoreSettingsObserver.java8
-rw-r--r--services/core/java/com/android/server/am/OomAdjuster.java46
-rw-r--r--services/core/java/com/android/server/am/ProcessList.java17
-rw-r--r--services/core/java/com/android/server/am/ServiceRecord.java12
-rw-r--r--services/core/java/com/android/server/display/DisplayManagerService.java7
-rw-r--r--services/core/java/com/android/server/display/DisplayPowerController.java73
-rw-r--r--services/core/java/com/android/server/gpu/GpuService.java78
-rw-r--r--services/core/java/com/android/server/location/gnss/GnssNetworkConnectivityHandler.java2
-rw-r--r--services/core/java/com/android/server/pm/BackgroundDexOptService.java6
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java5
-rw-r--r--services/core/java/com/android/server/power/AttentionDetector.java33
-rw-r--r--services/core/java/com/android/server/power/PowerManagerService.java29
-rw-r--r--services/core/java/com/android/server/trust/TrustManagerService.java2
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java123
-rw-r--r--services/tests/servicestests/src/com/android/server/power/AttentionDetectorTest.java46
-rw-r--r--startop/iorap/src/com/google/android/startop/iorap/EventSequenceValidator.java13
254 files changed, 6863 insertions, 1193 deletions
diff --git a/Android.bp b/Android.bp
index 8e17f5524a38..1d80153fb8cd 100644
--- a/Android.bp
+++ b/Android.bp
@@ -449,7 +449,7 @@ java_library {
"apex_aidl_interface-java",
"suspend_control_aidl_interface-java",
"framework-protos",
- "game-driver-protos",
+ "updatable-driver-protos",
"android.hidl.base-V1.0-java",
"android.hardware.cas-V1.0-java",
"android.hardware.cas-V1.1-java",
diff --git a/core/java/android/companion/BluetoothDeviceFilter.java b/core/java/android/companion/BluetoothDeviceFilter.java
index 2649fbee4246..cf9eeca0d739 100644
--- a/core/java/android/companion/BluetoothDeviceFilter.java
+++ b/core/java/android/companion/BluetoothDeviceFilter.java
@@ -142,6 +142,16 @@ public final class BluetoothDeviceFilter implements DeviceFilter<BluetoothDevice
}
@Override
+ public String toString() {
+ return "BluetoothDeviceFilter{"
+ + "mNamePattern=" + mNamePattern
+ + ", mAddress='" + mAddress + '\''
+ + ", mServiceUuids=" + mServiceUuids
+ + ", mServiceUuidMasks=" + mServiceUuidMasks
+ + '}';
+ }
+
+ @Override
public int describeContents() {
return 0;
}
diff --git a/core/java/android/content/pm/PermissionInfo.java b/core/java/android/content/pm/PermissionInfo.java
index 652d24108a19..04e15c20b2f4 100644
--- a/core/java/android/content/pm/PermissionInfo.java
+++ b/core/java/android/content/pm/PermissionInfo.java
@@ -525,6 +525,9 @@ public class PermissionInfo extends PackageItemInfo implements Parcelable {
if ((level & PermissionInfo.PROTECTION_FLAG_APP_PREDICTOR) != 0) {
protLevel += "|appPredictor";
}
+ if ((level & PermissionInfo.PROTECTION_FLAG_COMPANION) != 0) {
+ protLevel += "|companion";
+ }
if ((level & PermissionInfo.PROTECTION_FLAG_RETAIL_DEMO) != 0) {
protLevel += "|retailDemo";
}
diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index 15625cdeb8f4..decf05396c1f 100644
--- a/core/java/android/hardware/camera2/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -683,6 +683,8 @@ public abstract class CameraDevice implements AutoCloseable {
*<p>BACKWARD_COMPATIBLE devices capable of streaming concurrently with other devices as described by
* {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds} have the
* following guaranteed streams (when streaming concurrently with other devices)</p>
+ * <p> Note: The sizes mentioned for these concurrent streams are the maximum sizes guaranteed
+ * to be supported. Sizes smaller than these, obtained by {@link StreamConfigurationMap#getOutputSizes} for a particular format, are supported as well. </p>
*
* <table>
* <tr><th colspan="5">Concurrent stream guaranteed configurations</th></tr>
@@ -696,7 +698,7 @@ public abstract class CameraDevice implements AutoCloseable {
* </table><br>
* </p>
*
- * <p> Devices which are not backwards-compatible, support a mandatory single stream of size sVGA with image format {@code DEPTH16} during concurrent operation.
+ * <p> Devices which are not backwards-compatible, support a mandatory single stream of size sVGA with image format {@code DEPTH16} during concurrent operation. </p>
*
* <p> For guaranteed concurrent stream configurations:</p>
* <p> sVGA refers to the camera device's maximum resolution for that format from {@link StreamConfigurationMap#getOutputSizes} or
diff --git a/core/java/android/hardware/display/DisplayManagerInternal.java b/core/java/android/hardware/display/DisplayManagerInternal.java
index ad9bf0745779..8d6e937488e4 100644
--- a/core/java/android/hardware/display/DisplayManagerInternal.java
+++ b/core/java/android/hardware/display/DisplayManagerInternal.java
@@ -260,6 +260,13 @@ public abstract class DisplayManagerInternal {
int displayId, long maxFrames, long timestamp);
/**
+ * Temporarily ignore proximity-sensor-based display behavior until there is a change
+ * to the proximity sensor state. This allows the display to turn back on even if something
+ * is obstructing the proximity sensor.
+ */
+ public abstract void ignoreProximitySensorUntilChanged();
+
+ /**
* Describes the requested power state of the display.
*
* This object is intended to describe the general characteristics of the
diff --git a/core/java/android/os/GraphicsEnvironment.java b/core/java/android/os/GraphicsEnvironment.java
index df58a6c636f5..a6b869d19867 100644
--- a/core/java/android/os/GraphicsEnvironment.java
+++ b/core/java/android/os/GraphicsEnvironment.java
@@ -78,7 +78,7 @@ public class GraphicsEnvironment {
private static final String ACTION_ANGLE_FOR_ANDROID_TOAST_MESSAGE =
"android.app.action.ANGLE_FOR_ANDROID_TOAST_MESSAGE";
private static final String INTENT_KEY_A4A_TOAST_MESSAGE = "A4A Toast Message";
- private static final String GAME_DRIVER_WHITELIST_ALL = "*";
+ private static final String GAME_DRIVER_ALLOWLIST_ALL = "*";
private static final String GAME_DRIVER_SPHAL_LIBRARIES_FILENAME = "sphal_libraries.txt";
private static final int VULKAN_1_0 = 0x00400000;
private static final int VULKAN_1_1 = 0x00401000;
@@ -142,19 +142,19 @@ public class GraphicsEnvironment {
+ "set to: '" + devOptIn + "'");
}
- // We only want to use ANGLE if the app is whitelisted or the developer has
+ // We only want to use ANGLE if the app is allowlisted or the developer has
// explicitly chosen something other than default driver.
- // The whitelist will be generated by the ANGLE APK at both boot time and
+ // The allowlist will be generated by the ANGLE APK at both boot time and
// ANGLE update time. It will only include apps mentioned in the rules file.
- final boolean whitelisted = checkAngleWhitelist(context, coreSettings, packageName);
+ final boolean allowlisted = checkAngleAllowlist(context, coreSettings, packageName);
final boolean requested = devOptIn.equals(sDriverMap.get(OpenGlDriverChoice.ANGLE));
- final boolean useAngle = (whitelisted || requested);
+ final boolean useAngle = (allowlisted || requested);
if (!useAngle) {
return false;
}
- if (whitelisted) {
- Log.v(TAG, "ANGLE whitelist includes " + packageName);
+ if (allowlisted) {
+ Log.v(TAG, "ANGLE allowlist includes " + packageName);
}
if (requested) {
Log.v(TAG, "ANGLE developer option for " + packageName + ": " + devOptIn);
@@ -564,17 +564,17 @@ public class GraphicsEnvironment {
}
/**
- * Pull ANGLE whitelist from GlobalSettings and compare against current package
+ * Pull ANGLE allowlist from GlobalSettings and compare against current package
*/
- private static boolean checkAngleWhitelist(Context context, Bundle bundle, String packageName) {
+ private static boolean checkAngleAllowlist(Context context, Bundle bundle, String packageName) {
final ContentResolver contentResolver = context.getContentResolver();
- final List<String> angleWhitelist =
+ final List<String> angleAllowlist =
getGlobalSettingsString(contentResolver, bundle,
- Settings.Global.GLOBAL_SETTINGS_ANGLE_WHITELIST);
+ Settings.Global.GLOBAL_SETTINGS_ANGLE_ALLOWLIST);
- if (DEBUG) Log.v(TAG, "ANGLE whitelist: " + angleWhitelist);
+ if (DEBUG) Log.v(TAG, "ANGLE allowlist: " + angleAllowlist);
- return angleWhitelist.contains(packageName);
+ return angleAllowlist.contains(packageName);
}
/**
@@ -584,7 +584,7 @@ public class GraphicsEnvironment {
* @param bundle
* @param packageName
* @return true: ANGLE setup successfully
- * false: ANGLE not setup (not on whitelist, ANGLE not present, etc.)
+ * false: ANGLE not setup (not on allowlist, ANGLE not present, etc.)
*/
public boolean setupAngle(Context context, Bundle bundle, PackageManager pm,
String packageName) {
@@ -750,8 +750,8 @@ public class GraphicsEnvironment {
// 2. GAME_DRIVER_OPT_OUT_APPS
// 3. GAME_DRIVER_PRERELEASE_OPT_IN_APPS
// 4. GAME_DRIVER_OPT_IN_APPS
- // 5. GAME_DRIVER_BLACKLIST
- // 6. GAME_DRIVER_WHITELIST
+ // 5. GAME_DRIVER_DENYLIST
+ // 6. GAME_DRIVER_ALLOWLIST
switch (coreSettings.getInt(Settings.Global.GAME_DRIVER_ALL_APPS, 0)) {
case GAME_DRIVER_GLOBAL_OPT_IN_OFF:
if (DEBUG) Log.v(TAG, "Game Driver is turned off on this device.");
@@ -790,21 +790,21 @@ public class GraphicsEnvironment {
final boolean isOptIn =
getGlobalSettingsString(null, coreSettings, Settings.Global.GAME_DRIVER_OPT_IN_APPS)
.contains(appPackageName);
- final List<String> whitelist =
- getGlobalSettingsString(null, coreSettings, Settings.Global.GAME_DRIVER_WHITELIST);
- if (!isOptIn && whitelist.indexOf(GAME_DRIVER_WHITELIST_ALL) != 0
- && !whitelist.contains(appPackageName)) {
- if (DEBUG) Log.v(TAG, "App is not on the whitelist for Game Driver.");
+ final List<String> allowlist =
+ getGlobalSettingsString(null, coreSettings, Settings.Global.GAME_DRIVER_ALLOWLIST);
+ if (!isOptIn && allowlist.indexOf(GAME_DRIVER_ALLOWLIST_ALL) != 0
+ && !allowlist.contains(appPackageName)) {
+ if (DEBUG) Log.v(TAG, "App is not on the allowlist for Game Driver.");
return null;
}
- // If the application is not opted-in, then check whether it's on the blacklist,
- // terminate early if it's on the blacklist and fallback to system driver.
+ // If the application is not opted-in, then check whether it's on the denylist,
+ // terminate early if it's on the denylist and fallback to system driver.
if (!isOptIn
&& getGlobalSettingsString(
- null, coreSettings, Settings.Global.GAME_DRIVER_BLACKLIST)
+ null, coreSettings, Settings.Global.GAME_DRIVER_DENYLIST)
.contains(appPackageName)) {
- if (DEBUG) Log.v(TAG, "App is on the blacklist for Game Driver.");
+ if (DEBUG) Log.v(TAG, "App is on the denylist for Game Driver.");
return null;
}
diff --git a/core/java/android/os/PowerManagerInternal.java b/core/java/android/os/PowerManagerInternal.java
index 653a5594f495..f9e146a9dbdc 100644
--- a/core/java/android/os/PowerManagerInternal.java
+++ b/core/java/android/os/PowerManagerInternal.java
@@ -17,6 +17,7 @@
package android.os;
import android.view.Display;
+import android.view.KeyEvent;
import java.util.function.Consumer;
@@ -319,4 +320,7 @@ public abstract class PowerManagerInternal {
/** Returns information about the last wakeup event. */
public abstract PowerManager.WakeData getLastWakeup();
+
+ /** Allows power button to intercept a power key button press. */
+ public abstract boolean interceptPowerKeyDown(KeyEvent event);
}
diff --git a/core/java/android/os/ZygoteProcess.java b/core/java/android/os/ZygoteProcess.java
index 77e724beb712..9e332e9b0456 100644
--- a/core/java/android/os/ZygoteProcess.java
+++ b/core/java/android/os/ZygoteProcess.java
@@ -922,13 +922,13 @@ public class ZygoteProcess {
}
/**
- * Push hidden API denylisting exemptions into the zygote process(es).
+ * Push hidden API deny-listing exemptions into the zygote process(es).
*
* <p>The list of exemptions will take affect for all new processes forked from the zygote after
* this call.
*
* @param exemptions List of hidden API exemption prefixes. Any matching members are treated as
- * allowlisted/public APIs (i.e. allowed, no logging of usage).
+ * allowed/public APIs (i.e. allowed, no logging of usage).
*/
public boolean setApiDenylistExemptions(List<String> exemptions) {
synchronized (mLock) {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 9ee88982f598..540efd30987a 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -10770,17 +10770,6 @@ public final class Settings {
public static final String MODE_RINGER = "mode_ringer";
/**
- * Specifies whether Enhanced Connectivity is enabled or not. This setting allows the
- * Connectivity Thermal Power Manager to actively help the device to save power in 5G
- * scenarios
- * Type: int 1 is enabled, 0 is disabled
- *
- * @hide
- */
- public static final String ENHANCED_CONNECTIVITY_ENABLED =
- "enhanced_connectivity_enable";
-
- /**
* Overlay display devices setting.
* The associated value is a specially formatted string that describes the
* size and density of simulated secondary display devices.
@@ -12279,8 +12268,8 @@ public final class Settings {
* List of package names that should check ANGLE rules
* @hide
*/
- public static final String GLOBAL_SETTINGS_ANGLE_WHITELIST =
- "angle_whitelist";
+ public static final String GLOBAL_SETTINGS_ANGLE_ALLOWLIST =
+ "angle_allowlist";
/**
* Show the "ANGLE In Use" dialog box to the user when ANGLE is the OpenGL driver.
@@ -12322,24 +12311,24 @@ public final class Settings {
public static final String GAME_DRIVER_OPT_OUT_APPS = "game_driver_opt_out_apps";
/**
- * Apps on the blacklist that are forbidden to use Game Driver.
+ * Apps on the denylist that are forbidden to use Game Driver.
* @hide
*/
- public static final String GAME_DRIVER_BLACKLIST = "game_driver_blacklist";
+ public static final String GAME_DRIVER_DENYLIST = "game_driver_denylist";
/**
- * List of blacklists, each blacklist is a blacklist for a specific version of Game Driver.
+ * List of denylists, each denylist is a denylist for a specific version of Game Driver.
* @hide
*/
- public static final String GAME_DRIVER_BLACKLISTS = "game_driver_blacklists";
+ public static final String GAME_DRIVER_DENYLISTS = "game_driver_denylists";
/**
- * Apps on the whitelist that are allowed to use Game Driver.
+ * Apps on the allowlist that are allowed to use Game Driver.
* The string is a list of application package names, seperated by comma.
* i.e. <apk1>,<apk2>,...,<apkN>
* @hide
*/
- public static final String GAME_DRIVER_WHITELIST = "game_driver_whitelist";
+ public static final String GAME_DRIVER_ALLOWLIST = "game_driver_allowlist";
/**
* List of libraries in sphal accessible by Game Driver
diff --git a/core/java/android/service/wallpaper/IWallpaperEngine.aidl b/core/java/android/service/wallpaper/IWallpaperEngine.aidl
index 84b6869bf620..90392e65794a 100644
--- a/core/java/android/service/wallpaper/IWallpaperEngine.aidl
+++ b/core/java/android/service/wallpaper/IWallpaperEngine.aidl
@@ -38,4 +38,5 @@ oneway interface IWallpaperEngine {
@UnsupportedAppUsage
void destroy();
void setZoomOut(float scale);
+ void scalePreview(in Rect positionInWindow);
}
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 0d420c5936ae..e083417644e3 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -16,6 +16,11 @@
package android.service.wallpaper;
+import static android.graphics.Matrix.MSCALE_X;
+import static android.graphics.Matrix.MSCALE_Y;
+import static android.graphics.Matrix.MSKEW_X;
+import static android.graphics.Matrix.MSKEW_Y;
+
import android.annotation.FloatRange;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
@@ -31,6 +36,7 @@ import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Matrix;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.graphics.Rect;
@@ -123,7 +129,8 @@ public abstract class WallpaperService extends Service {
private static final int MSG_WINDOW_MOVED = 10035;
private static final int MSG_TOUCH_EVENT = 10040;
private static final int MSG_REQUEST_WALLPAPER_COLORS = 10050;
- private static final int MSG_SCALE = 10100;
+ private static final int MSG_ZOOM = 10100;
+ private static final int MSG_SCALE_PREVIEW = 10110;
private static final int NOTIFY_COLORS_RATE_LIMIT_MS = 1000;
@@ -178,6 +185,7 @@ public abstract class WallpaperService extends Service {
WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS;
int mCurWindowFlags = mWindowFlags;
int mCurWindowPrivateFlags = mWindowPrivateFlags;
+ Rect mPreviewSurfacePosition;
final Rect mVisibleInsets = new Rect();
final Rect mWinFrame = new Rect();
final Rect mContentInsets = new Rect();
@@ -194,6 +202,8 @@ public abstract class WallpaperService extends Service {
final InsetsSourceControl[] mTempControls = new InsetsSourceControl[0];
final MergedConfiguration mMergedConfiguration = new MergedConfiguration();
private final Point mSurfaceSize = new Point();
+ private final Matrix mTmpMatrix = new Matrix();
+ private final float[] mTmpValues = new float[9];
final WindowManager.LayoutParams mLayout
= new WindowManager.LayoutParams();
@@ -366,7 +376,7 @@ public abstract class WallpaperService extends Service {
Message msg = mCaller.obtainMessage(MSG_WALLPAPER_OFFSETS);
mCaller.sendMessage(msg);
}
- Message msg = mCaller.obtainMessageI(MSG_SCALE, Float.floatToIntBits(zoom));
+ Message msg = mCaller.obtainMessageI(MSG_ZOOM, Float.floatToIntBits(zoom));
mCaller.sendMessage(msg);
}
}
@@ -747,6 +757,8 @@ public abstract class WallpaperService extends Service {
out.println(mMergedConfiguration.getMergedConfiguration());
out.print(prefix); out.print("mLayout="); out.println(mLayout);
out.print(prefix); out.print("mZoom="); out.println(mZoom);
+ out.print(prefix); out.print("mPreviewSurfacePosition=");
+ out.println(mPreviewSurfacePosition);
synchronized (mLock) {
out.print(prefix); out.print("mPendingXOffset="); out.print(mPendingXOffset);
out.print(" mPendingXOffset="); out.println(mPendingXOffset);
@@ -908,7 +920,6 @@ public abstract class WallpaperService extends Service {
mInsetsState, mTempControls, mSurfaceSize, mTmpSurfaceControl);
if (mSurfaceControl.isValid()) {
mSurfaceHolder.mSurface.copyFrom(mSurfaceControl);
- mSurfaceControl.release();
}
if (DEBUG) Log.v(TAG, "New surface: " + mSurfaceHolder.mSurface
@@ -1063,6 +1074,7 @@ public abstract class WallpaperService extends Service {
if (redrawNeeded) {
mSession.finishDrawing(mWindow, null /* postDrawTransaction */);
}
+ reposition();
mIWallpaperEngine.reportShown();
}
} catch (RemoteException ex) {
@@ -1073,6 +1085,39 @@ public abstract class WallpaperService extends Service {
}
}
+ private void scalePreview(Rect position) {
+ if (isPreview() && mPreviewSurfacePosition == null && position != null
+ || mPreviewSurfacePosition != null
+ && !mPreviewSurfacePosition.equals(position)) {
+ mPreviewSurfacePosition = position;
+ if (mSurfaceControl.isValid()) {
+ reposition();
+ } else {
+ updateSurface(false, false, false);
+ }
+ }
+ }
+
+ private void reposition() {
+ if (mPreviewSurfacePosition == null) {
+ return;
+ }
+ if (DEBUG) {
+ Log.i(TAG, "reposition: rect: " + mPreviewSurfacePosition);
+ }
+
+ mTmpMatrix.setTranslate(mPreviewSurfacePosition.left, mPreviewSurfacePosition.top);
+ mTmpMatrix.postScale(((float) mPreviewSurfacePosition.width()) / mCurWidth,
+ ((float) mPreviewSurfacePosition.height()) / mCurHeight);
+ mTmpMatrix.getValues(mTmpValues);
+ SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+ t.setPosition(mSurfaceControl, mPreviewSurfacePosition.left,
+ mPreviewSurfacePosition.top);
+ t.setMatrix(mSurfaceControl, mTmpValues[MSCALE_X], mTmpValues[MSKEW_Y],
+ mTmpValues[MSKEW_X], mTmpValues[MSCALE_Y]);
+ t.apply();
+ }
+
void attach(IWallpaperEngineWrapper wrapper) {
if (DEBUG) Log.v(TAG, "attach: " + this + " wrapper=" + wrapper);
if (mDestroyed) {
@@ -1415,7 +1460,7 @@ public abstract class WallpaperService extends Service {
}
public void setZoomOut(float scale) {
- Message msg = mCaller.obtainMessageI(MSG_SCALE, Float.floatToIntBits(scale));
+ Message msg = mCaller.obtainMessageI(MSG_ZOOM, Float.floatToIntBits(scale));
mCaller.sendMessage(msg);
}
@@ -1445,6 +1490,11 @@ public abstract class WallpaperService extends Service {
mDetached.set(true);
}
+ public void scalePreview(Rect position) {
+ Message msg = mCaller.obtainMessageO(MSG_SCALE_PREVIEW, position);
+ mCaller.sendMessage(msg);
+ }
+
private void doDetachEngine() {
mActiveEngines.remove(mEngine);
mEngine.detach();
@@ -1491,9 +1541,12 @@ public abstract class WallpaperService extends Service {
case MSG_UPDATE_SURFACE:
mEngine.updateSurface(true, false, false);
break;
- case MSG_SCALE:
+ case MSG_ZOOM:
mEngine.setZoom(Float.intBitsToFloat(message.arg1));
break;
+ case MSG_SCALE_PREVIEW:
+ mEngine.scalePreview((Rect) message.obj);
+ break;
case MSG_VISIBILITY_CHANGED:
if (DEBUG) Log.v(TAG, "Visibility change in " + mEngine
+ ": " + message.arg1);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 7453f21d379b..bcf3b49c6644 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -1824,19 +1824,13 @@ public final class ViewRootImpl implements ViewParent,
/**
* Called after window layout to update the bounds surface. If the surface insets have changed
* or the surface has resized, update the bounds surface.
- *
- * @param shouldReparent Whether it should reparent the bounds layer to the main SurfaceControl.
*/
- private void updateBoundsLayer(boolean shouldReparent) {
+ private void updateBoundsLayer() {
if (mBoundsLayer != null) {
setBoundsLayerCrop();
- mTransaction.deferTransactionUntil(mBoundsLayer, getRenderSurfaceControl(),
- mSurface.getNextFrameNumber());
-
- if (shouldReparent) {
- mTransaction.reparent(mBoundsLayer, getRenderSurfaceControl());
- }
- mTransaction.apply();
+ mTransaction.deferTransactionUntil(mBoundsLayer,
+ getRenderSurfaceControl(), mSurface.getNextFrameNumber())
+ .apply();
}
}
@@ -2919,16 +2913,7 @@ public final class ViewRootImpl implements ViewParent,
}
if (surfaceSizeChanged || surfaceReplaced || surfaceCreated || windowAttributesChanged) {
- // If the surface has been replaced, there's a chance the bounds layer is not parented
- // to the new layer. When updating bounds layer, also reparent to the main VRI
- // SurfaceControl to ensure it's correctly placed in the hierarchy.
- //
- // This needs to be done on the client side since WMS won't reparent the children to the
- // new surface if it thinks the app is closing. WMS gets the signal that the app is
- // stopping, but on the client side it doesn't get stopped since it's restarted quick
- // enough. WMS doesn't want to keep around old children since they will leak when the
- // client creates new children.
- updateBoundsLayer(surfaceReplaced);
+ updateBoundsLayer();
}
final boolean didLayout = layoutRequested && (!mStopped || mReportNextDraw);
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index 214da380ccda..8bc7f3c91d8c 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -1768,7 +1768,7 @@ public class AccessibilityNodeInfo implements Parcelable {
* <strong>Note:</strong> The primary usage of this API is for UI test automation
* and in order to report the fully qualified view id if an {@link AccessibilityNodeInfo}
* the client has to set the {@link AccessibilityServiceInfo#FLAG_REPORT_VIEW_IDS}
- * flag when configuring his {@link android.accessibilityservice.AccessibilityService}.
+ * flag when configuring the {@link android.accessibilityservice.AccessibilityService}.
* </p>
* <p>
* <strong>Note:</strong> If this view hierarchy has a {@link SurfaceView} embedding another
@@ -3206,7 +3206,7 @@ public class AccessibilityNodeInfo implements Parcelable {
* <strong>Note:</strong> The primary usage of this API is for UI test automation
* and in order to report the source view id of an {@link AccessibilityNodeInfo} the
* client has to set the {@link AccessibilityServiceInfo#FLAG_REPORT_VIEW_IDS}
- * flag when configuring his {@link android.accessibilityservice.AccessibilityService}.
+ * flag when configuring the {@link android.accessibilityservice.AccessibilityService}.
* </p>
* @return The id resource name.
diff --git a/core/java/android/view/inputmethod/InlineSuggestionsRequest.java b/core/java/android/view/inputmethod/InlineSuggestionsRequest.java
index cce109074d82..6300320f5eb5 100644
--- a/core/java/android/view/inputmethod/InlineSuggestionsRequest.java
+++ b/core/java/android/view/inputmethod/InlineSuggestionsRequest.java
@@ -47,6 +47,9 @@ public final class InlineSuggestionsRequest implements Parcelable {
/**
* Max number of suggestions expected from the response. It must be a positive value.
* Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set.
+ *
+ * <p>In practice, it is recommended that the max suggestion count does not exceed <b>5</b>
+ * for performance reasons.</p>
*/
private final int mMaxSuggestionCount;
@@ -67,6 +70,9 @@ public final class InlineSuggestionsRequest implements Parcelable {
/**
* The IME provided locales for the request. If non-empty, the inline suggestions should
* return languages from the supported locales. If not provided, it'll default to system locale.
+ *
+ * <p>Note for Autofill Providers: It is <b>recommended</b> for the returned inline suggestions
+ * to have one locale to guarantee consistent UI rendering.</p>
*/
private @NonNull LocaleList mSupportedLocales;
@@ -227,6 +233,9 @@ public final class InlineSuggestionsRequest implements Parcelable {
/**
* Max number of suggestions expected from the response. It must be a positive value.
* Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set.
+ *
+ * <p>In practice, it is recommended that the max suggestion count does not exceed <b>5</b>
+ * for performance reasons.</p>
*/
@DataClass.Generated.Member
public int getMaxSuggestionCount() {
@@ -256,6 +265,9 @@ public final class InlineSuggestionsRequest implements Parcelable {
/**
* The IME provided locales for the request. If non-empty, the inline suggestions should
* return languages from the supported locales. If not provided, it'll default to system locale.
+ *
+ * <p>Note for Autofill Providers: It is <b>recommended</b> for the returned inline suggestions
+ * to have one locale to guarantee consistent UI rendering.</p>
*/
@DataClass.Generated.Member
public @NonNull LocaleList getSupportedLocales() {
@@ -458,6 +470,9 @@ public final class InlineSuggestionsRequest implements Parcelable {
/**
* Max number of suggestions expected from the response. It must be a positive value.
* Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set.
+ *
+ * <p>In practice, it is recommended that the max suggestion count does not exceed <b>5</b>
+ * for performance reasons.</p>
*/
@DataClass.Generated.Member
public @NonNull Builder setMaxSuggestionCount(int value) {
@@ -508,6 +523,9 @@ public final class InlineSuggestionsRequest implements Parcelable {
/**
* The IME provided locales for the request. If non-empty, the inline suggestions should
* return languages from the supported locales. If not provided, it'll default to system locale.
+ *
+ * <p>Note for Autofill Providers: It is <b>recommended</b> for the returned inline suggestions
+ * to have one locale to guarantee consistent UI rendering.</p>
*/
@DataClass.Generated.Member
public @NonNull Builder setSupportedLocales(@NonNull LocaleList value) {
@@ -604,7 +622,7 @@ public final class InlineSuggestionsRequest implements Parcelable {
}
@DataClass.Generated(
- time = 1588109685838L,
+ time = 1595457701315L,
codegenVersion = "1.0.15",
sourceFile = "frameworks/base/core/java/android/view/inputmethod/InlineSuggestionsRequest.java",
inputSignatures = "public static final int SUGGESTION_COUNT_UNLIMITED\nprivate final int mMaxSuggestionCount\nprivate final @android.annotation.NonNull java.util.List<android.widget.inline.InlinePresentationSpec> mInlinePresentationSpecs\nprivate @android.annotation.NonNull java.lang.String mHostPackageName\nprivate @android.annotation.NonNull android.os.LocaleList mSupportedLocales\nprivate @android.annotation.NonNull android.os.Bundle mExtras\nprivate @android.annotation.Nullable android.os.IBinder mHostInputToken\nprivate int mHostDisplayId\npublic void setHostInputToken(android.os.IBinder)\nprivate boolean extrasEquals(android.os.Bundle)\nprivate void parcelHostInputToken(android.os.Parcel,int)\nprivate @android.annotation.Nullable android.os.IBinder unparcelHostInputToken(android.os.Parcel)\npublic void setHostDisplayId(int)\nprivate void onConstructed()\npublic void filterContentTypes()\nprivate static int defaultMaxSuggestionCount()\nprivate static java.lang.String defaultHostPackageName()\nprivate static android.os.LocaleList defaultSupportedLocales()\nprivate static @android.annotation.Nullable android.os.IBinder defaultHostInputToken()\nprivate static @android.annotation.Nullable int defaultHostDisplayId()\nprivate static @android.annotation.NonNull android.os.Bundle defaultExtras()\nclass InlineSuggestionsRequest extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genBuilder=true)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setInlinePresentationSpecs(java.util.List<android.widget.inline.InlinePresentationSpec>)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setHostPackageName(java.lang.String)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setHostInputToken(android.os.IBinder)\nabstract android.view.inputmethod.InlineSuggestionsRequest.Builder setHostDisplayId(int)\nclass BaseBuilder extends java.lang.Object implements []")
diff --git a/core/java/android/view/inputmethod/InlineSuggestionsResponse.java b/core/java/android/view/inputmethod/InlineSuggestionsResponse.java
index be833df61ec4..b393c67d7876 100644
--- a/core/java/android/view/inputmethod/InlineSuggestionsResponse.java
+++ b/core/java/android/view/inputmethod/InlineSuggestionsResponse.java
@@ -32,7 +32,18 @@ import java.util.List;
*/
@DataClass(genEqualsHashCode = true, genToString = true, genHiddenConstructor = true)
public final class InlineSuggestionsResponse implements Parcelable {
- private final @NonNull List<InlineSuggestion> mInlineSuggestions;
+ /**
+ * List of {@link InlineSuggestion}s returned as a part of this response.
+ *
+ * <p>When the host app requests to inflate this <b>ordered</b> list of inline suggestions by
+ * calling {@link InlineSuggestion#inflate}, it is the host's responsibility to track the
+ * order of the inflated {@link android.view.View}s. These views are to be added in
+ * order to the view hierarchy, because the inflation calls will return asynchronously.</p>
+ *
+ * <p>The inflation ordering does not apply to the pinned icon.</p>
+ */
+ @NonNull
+ private final List<InlineSuggestion> mInlineSuggestions;
/**
* Creates a new {@link InlineSuggestionsResponse}, for testing purpose.
@@ -48,7 +59,7 @@ public final class InlineSuggestionsResponse implements Parcelable {
- // Code below generated by codegen v1.0.14.
+ // Code below generated by codegen v1.0.15.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -64,6 +75,15 @@ public final class InlineSuggestionsResponse implements Parcelable {
/**
* Creates a new InlineSuggestionsResponse.
*
+ * @param inlineSuggestions
+ * List of {@link InlineSuggestion}s returned as a part of this response.
+ *
+ * <p>When the host app requests to inflate this <b>ordered</b> list of inline suggestions by
+ * calling {@link InlineSuggestion#inflate}, it is the host's responsibility to track the
+ * order of the inflated {@link android.view.View}s. These views are to be added in
+ * order to the view hierarchy, because the inflation calls will return asynchronously.</p>
+ *
+ * <p>The inflation ordering does not apply to the pinned icon.</p>
* @hide
*/
@DataClass.Generated.Member
@@ -76,6 +96,16 @@ public final class InlineSuggestionsResponse implements Parcelable {
// onConstructed(); // You can define this method to get a callback
}
+ /**
+ * List of {@link InlineSuggestion}s returned as a part of this response.
+ *
+ * <p>When the host app requests to inflate this <b>ordered</b> list of inline suggestions by
+ * calling {@link InlineSuggestion#inflate}, it is the host's responsibility to track the
+ * order of the inflated {@link android.view.View}s. These views are to be added in
+ * order to the view hierarchy, because the inflation calls will return asynchronously.</p>
+ *
+ * <p>The inflation ordering does not apply to the pinned icon.</p>
+ */
@DataClass.Generated.Member
public @NonNull List<InlineSuggestion> getInlineSuggestions() {
return mInlineSuggestions;
@@ -164,8 +194,8 @@ public final class InlineSuggestionsResponse implements Parcelable {
};
@DataClass.Generated(
- time = 1578972149519L,
- codegenVersion = "1.0.14",
+ time = 1595891876037L,
+ codegenVersion = "1.0.15",
sourceFile = "frameworks/base/core/java/android/view/inputmethod/InlineSuggestionsResponse.java",
inputSignatures = "private final @android.annotation.NonNull java.util.List<android.view.inputmethod.InlineSuggestion> mInlineSuggestions\npublic static @android.annotation.TestApi @android.annotation.NonNull android.view.inputmethod.InlineSuggestionsResponse newInlineSuggestionsResponse(java.util.List<android.view.inputmethod.InlineSuggestion>)\nclass InlineSuggestionsResponse extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genHiddenConstructor=true)")
@Deprecated
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index ef72cee90611..cb9df448db30 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -600,6 +600,9 @@ public class ZygoteInit {
VMRuntime.registerAppInfo(profilePath, codePaths);
}
+ /**
+ * Sets the list of classes/methods for the hidden API
+ */
public static void setApiDenylistExemptions(String[] exemptions) {
VMRuntime.getRuntime().setHiddenApiExemptions(exemptions);
}
diff --git a/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java b/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java
index 0e703fa686e0..205c5fd735ea 100644
--- a/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java
+++ b/core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java
@@ -103,8 +103,11 @@ public class GestureNavigationSettingsObserver extends ContentObserver {
final DisplayMetrics dm = userRes.getDisplayMetrics();
final float defaultInset = userRes.getDimension(
com.android.internal.R.dimen.config_backGestureInset) / dm.density;
- final float backGestureInset = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
- BACK_GESTURE_EDGE_WIDTH, defaultInset);
+ // Only apply the back gesture config if there is an existing inset
+ final float backGestureInset = defaultInset > 0
+ ? DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
+ BACK_GESTURE_EDGE_WIDTH, defaultInset)
+ : defaultInset;
final float inset = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, backGestureInset,
dm);
final float scale = Settings.Secure.getFloatForUser(
diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp
index 7d6135bda9c6..8d4c4e5311f8 100644
--- a/core/jni/android_net_NetUtils.cpp
+++ b/core/jni/android_net_NetUtils.cpp
@@ -95,12 +95,11 @@ static void android_net_utils_detachBPFFilter(JNIEnv *env, jobject clazz, jobjec
{
int optval_ignored = 0;
int fd = jniGetFDFromFileDescriptor(env, javaFd);
- if (setsockopt(
- fd, SOL_SOCKET, SO_DETACH_FILTER, &optval_ignored, sizeof(optval_ignored)) != 0) {
+ if (setsockopt(fd, SOL_SOCKET, SO_DETACH_FILTER, &optval_ignored, sizeof(optval_ignored)) !=
+ 0) {
jniThrowExceptionFmt(env, "java/net/SocketException",
"setsockopt(SO_DETACH_FILTER): %s", strerror(errno));
}
-
}
static jboolean android_net_utils_bindProcessToNetwork(JNIEnv *env, jobject thiz, jint netId)
diff --git a/core/proto/android/providers/settings/global.proto b/core/proto/android/providers/settings/global.proto
index 9bbe0caa9e98..a80bb4013854 100644
--- a/core/proto/android/providers/settings/global.proto
+++ b/core/proto/android/providers/settings/global.proto
@@ -445,14 +445,14 @@ message GlobalSettingsProto {
// i.e. <pkg1>,<pkg2>,...,<pkgN>
optional SettingProto game_driver_opt_out_apps = 10;
// Game Driver - List of Apps that are forbidden to use Game Driver
- optional SettingProto game_driver_blacklist = 11;
+ optional SettingProto game_driver_denylist = 11;
// Game Driver - List of Apps that are allowed to use Game Driver
- optional SettingProto game_driver_whitelist = 12;
+ optional SettingProto game_driver_allowlist = 12;
// ANGLE - List of Apps that can check ANGLE rules
- optional SettingProto angle_whitelist = 13;
- // Game Driver - List of blacklists, each blacklist is a blacklist for
+ optional SettingProto angle_allowlist = 13;
+ // Game Driver - List of denylists, each denylist is a denylist for
// a specific Game Driver version
- optional SettingProto game_driver_blacklists = 14;
+ optional SettingProto game_driver_denylists = 14;
// ANGLE - Show a dialog box when ANGLE is selected for the currently running PKG
optional SettingProto show_angle_in_use_dialog = 15;
// Game Driver - List of libraries in sphal accessible by Game Driver
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index e0b58dd83981..6b03873c8762 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2089,7 +2089,7 @@
effectively and terminate the dream. Use -1 to disable this safety feature. -->
<integer name="config_dreamsBatteryLevelDrainCutoff">5</integer>
<!-- Limit of how long the device can remain unlocked due to attention checking. -->
- <integer name="config_attentionMaximumExtension">330000</integer> <!-- 5 minutes and 30 sec.-->
+ <integer name="config_attentionMaximumExtension">900000</integer> <!-- 15 minutes. -->
<!-- ComponentName of a dream to show whenever the system would otherwise have
gone to sleep. When the PowerManager is asked to go to sleep, it will instead
@@ -4369,4 +4369,7 @@
<bool name="config_pdp_reject_enable_retry">false</bool>
<!-- pdp data reject retry delay in ms -->
<integer name="config_pdp_reject_retry_delay_ms">-1</integer>
+
+ <!-- Component names of the services which will keep critical code path warm -->
+ <string-array name="config_keep_warming_services" translatable="false" />
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 51faf20df6b5..4b303a382ded 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -4835,10 +4835,10 @@
<string name="confirm_battery_saver">OK</string>
<!-- [CHAR_LIMIT=NONE] Battery saver: Feature description, with a "learn more" link. -->
- <string name="battery_saver_description_with_learn_more">To extend battery life, Battery Saver:\n\n\u2022Turns on Dark theme\n\u2022Turns off or restricts background activity, some visual effects, and other features like \u201cHey Google\u201d\n\n<annotation id="url">Learn more</annotation></string>
+ <string name="battery_saver_description_with_learn_more">To extend battery life, Battery Saver:\n\n\u2022 Turns on Dark theme\n\u2022 Turns off or restricts background activity, some visual effects, and other features like \u201cHey Google\u201d\n\n<annotation id="url">Learn more</annotation></string>
<!-- [CHAR_LIMIT=NONE] Battery saver: Feature description, without a "learn more" link. -->
- <string name="battery_saver_description">To extend battery life, Battery Saver:\n\n\u2022Turns on Dark theme\n\u2022Turns off or restricts background activity, some visual effects, and other features like \u201cHey Google\u201d</string>
+ <string name="battery_saver_description">To extend battery life, Battery Saver:\n\n\u2022 Turns on Dark theme\n\u2022 Turns off or restricts background activity, some visual effects, and other features like \u201cHey Google\u201d</string>
<!-- [CHAR_LIMIT=NONE] Data saver: Feature description -->
<string name="data_saver_description">To help reduce data usage, Data Saver prevents some apps from sending or receiving data in the background. An app you’re currently using can access data, but may do so less frequently. This may mean, for example, that images don’t display until you tap them.</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index b130b91b2cd2..5951ef16c1c1 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -4049,4 +4049,6 @@
<java-symbol type="string" name="config_pdp_reject_multi_conn_to_same_pdn_not_allowed" />
<java-symbol type="array" name="config_notificationMsgPkgsAllowedAsConvos" />
+
+ <java-symbol type="array" name="config_keep_warming_services" />
</resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 6e2995de0fe1..47a0e7d071f8 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -887,7 +887,7 @@ please see themes_device_defaults.xml.
</style>
<!-- @hide Special theme for the default system Activity-based Alert dialogs. -->
- <style name="Theme.Dialog.Confirmation" parent="Theme.DeviceDefault.Light.Dialog.Alert" />
+ <style name="Theme.Dialog.Confirmation" parent="Theme.DeviceDefault.Dialog.Alert.DayNight" />
<!-- Theme for a window that looks like a toast. -->
<style name="Theme.Toast" parent="Theme.DeviceDefault.Dialog">
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index 0a9e50eb92dd..419398df20eb 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -160,6 +160,7 @@ applications that come with the platform
<permission name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"/>
<permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
<permission name="android.permission.DUMP"/>
+ <permission name="android.permission.HANDLE_CAR_MODE_CHANGES"/>
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
<permission name="android.permission.LOCAL_MAC_ADDRESS"/>
<permission name="android.permission.MANAGE_USERS"/>
diff --git a/framework-jarjar-rules.txt b/framework-jarjar-rules.txt
index d8af726ffa72..70dedb8179b0 100644
--- a/framework-jarjar-rules.txt
+++ b/framework-jarjar-rules.txt
@@ -1,2 +1,6 @@
rule android.hidl.** android.internal.hidl.@1
rule android.net.wifi.WifiAnnotations* android.internal.wifi.WifiAnnotations@1
+
+# Hide media mainline module implementation classes to avoid collisions with
+# app-bundled ExoPlayer classes.
+rule com.google.android.exoplayer2.** android.media.internal.exo.@1
diff --git a/graphics/proto/Android.bp b/graphics/proto/Android.bp
index ddced597759f..ea79b731a365 100644
--- a/graphics/proto/Android.bp
+++ b/graphics/proto/Android.bp
@@ -1,10 +1,10 @@
java_library_static {
- name: "game-driver-protos",
+ name: "updatable-driver-protos",
host_supported: true,
proto: {
type: "lite",
},
- srcs: ["game_driver.proto"],
+ srcs: ["updatable_driver.proto"],
jarjar_rules: "jarjar-rules.txt",
- sdk_version: "28",
+ sdk_version: "30",
}
diff --git a/graphics/proto/game_driver.proto b/graphics/proto/updatable_driver.proto
index fd7ffccac24c..cbc9424854d1 100644
--- a/graphics/proto/game_driver.proto
+++ b/graphics/proto/updatable_driver.proto
@@ -16,16 +16,16 @@
syntax = "proto2";
-package android.gamedriver;
+package android.updatabledriver;
-option java_package = "android.gamedriver";
-option java_outer_classname = "GameDriverProto";
+option java_package = "android.updatabledriver";
+option java_outer_classname = "UpdatableDriverProto";
-message Blacklist {
+message Denylist {
optional int64 version_code = 1;
repeated string package_names = 2;
}
-message Blacklists {
- repeated Blacklist blacklists = 1;
+message Denylists {
+ repeated Denylist denylists = 1;
}
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp
index d25fc4b0b03e..b2c39c90071a 100644
--- a/libs/hwui/JankTracker.cpp
+++ b/libs/hwui/JankTracker.cpp
@@ -139,6 +139,9 @@ void JankTracker::finishFrame(const FrameInfo& frame) {
(*mGlobalData)->reportJank();
}
+ if (mSwapDeadline < 0) {
+ mSwapDeadline = frame[FrameInfoIndex::IntendedVsync] + mFrameInterval;
+ }
bool isTripleBuffered = (mSwapDeadline - frame[FrameInfoIndex::IntendedVsync]) > (mFrameInterval * 0.1);
mSwapDeadline = std::max(mSwapDeadline + mFrameInterval,
diff --git a/libs/hwui/JankTracker.h b/libs/hwui/JankTracker.h
index 4460266276f9..b3fbbfe98669 100644
--- a/libs/hwui/JankTracker.h
+++ b/libs/hwui/JankTracker.h
@@ -75,7 +75,7 @@ private:
std::array<int64_t, NUM_BUCKETS> mThresholds;
int64_t mFrameInterval;
- nsecs_t mSwapDeadline;
+ nsecs_t mSwapDeadline = -1;
// The amount of time we will erase from the total duration to account
// for SF vsync offsets with HWC2 blocking dequeueBuffers.
// (Vsync + mDequeueBlockTolerance) is the point at which we expect
diff --git a/libs/hwui/service/GraphicsStatsService.cpp b/libs/hwui/service/GraphicsStatsService.cpp
index 644d5fbd5bf9..e4198017aee0 100644
--- a/libs/hwui/service/GraphicsStatsService.cpp
+++ b/libs/hwui/service/GraphicsStatsService.cpp
@@ -559,6 +559,7 @@ void GraphicsStatsService::finishDumpInMemory(Dump* dump, AStatsEventList* data,
AStatsEvent_writeBool(event, !lastFullDay);
AStatsEvent_build(event);
}
+ delete dump;
}
diff --git a/media/jni/audioeffect/Visualizer.cpp b/media/jni/audioeffect/Visualizer.cpp
index f419904afa69..a74ae5307a36 100644
--- a/media/jni/audioeffect/Visualizer.cpp
+++ b/media/jni/audioeffect/Visualizer.cpp
@@ -51,10 +51,11 @@ status_t Visualizer::set(int32_t priority,
void* user,
audio_session_t sessionId,
audio_io_handle_t io,
- const AudioDeviceTypeAddr& device)
+ const AudioDeviceTypeAddr& device,
+ bool probe)
{
status_t status = AudioEffect::set(
- SL_IID_VISUALIZATION, nullptr, priority, cbf, user, sessionId, io, device);
+ SL_IID_VISUALIZATION, nullptr, priority, cbf, user, sessionId, io, device, probe);
if (status == NO_ERROR || status == ALREADY_EXISTS) {
initCaptureSize();
}
diff --git a/media/jni/audioeffect/Visualizer.h b/media/jni/audioeffect/Visualizer.h
index b943b96053f9..8b6a62f25638 100644
--- a/media/jni/audioeffect/Visualizer.h
+++ b/media/jni/audioeffect/Visualizer.h
@@ -78,7 +78,8 @@ public:
void* user = NULL,
audio_session_t sessionId = AUDIO_SESSION_OUTPUT_MIX,
audio_io_handle_t io = AUDIO_IO_HANDLE_NONE,
- const AudioDeviceTypeAddr& device = {});
+ const AudioDeviceTypeAddr& device = {},
+ bool probe = false);
// Declared 'final' because we call this in ~Visualizer().
status_t setEnabled(bool enabled) final;
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
index fe2be1df44be..59d6ed67b552 100644
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
+++ b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java
@@ -43,6 +43,7 @@ import com.android.systemui.plugins.qs.QSFactory;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.power.EnhancedEstimates;
import com.android.systemui.power.EnhancedEstimatesImpl;
+import com.android.systemui.qs.dagger.QSModule;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsImplementation;
@@ -74,7 +75,7 @@ import dagger.Binds;
import dagger.Module;
import dagger.Provides;
-@Module(includes = {DividerModule.class})
+@Module(includes = {DividerModule.class, QSModule.class})
public abstract class CarSystemUIModule {
@Singleton
diff --git a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
index 7aa997e39307..a62c287ece41 100644
--- a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
+++ b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
@@ -259,18 +259,19 @@ public class DeviceDiscoveryService extends Service {
private void onDeviceFound(@Nullable DeviceFilterPair device) {
if (device == null) return;
- if (mDevicesFound.contains(device)) {
- return;
- }
-
- if (DEBUG) Log.i(LOG_TAG, "Found device " + device);
-
Handler.getMain().sendMessage(obtainMessage(
DeviceDiscoveryService::onDeviceFoundMainThread, this, device));
}
@MainThread
void onDeviceFoundMainThread(@NonNull DeviceFilterPair device) {
+ if (mDevicesFound.contains(device)) {
+ Log.i(LOG_TAG, "Skipping device " + device + " - already among found devices");
+ return;
+ }
+
+ Log.i(LOG_TAG, "Found device " + device);
+
if (mDevicesFound.isEmpty()) {
onReadyToShowUI();
}
@@ -432,10 +433,10 @@ public class DeviceDiscoveryService extends Service {
@Override
public String toString() {
- return "DeviceFilterPair{" +
- "device=" + device +
- ", filter=" + filter +
- '}';
+ return "DeviceFilterPair{"
+ + "device=" + device + " " + getDisplayName()
+ + ", filter=" + filter
+ + '}';
}
}
diff --git a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/Tile.java b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/Tile.java
index 1e4c7cac4404..52d2b3c919d9 100644
--- a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/Tile.java
+++ b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/Tile.java
@@ -376,8 +376,12 @@ public abstract class Tile implements Parcelable {
* Check whether tile only has primary profile.
*/
public boolean isPrimaryProfileOnly() {
- String profile = mMetaData != null
- ? mMetaData.getString(META_DATA_KEY_PROFILE) : PROFILE_ALL;
+ return isPrimaryProfileOnly(mMetaData);
+ }
+
+ static boolean isPrimaryProfileOnly(Bundle metaData) {
+ String profile = metaData != null
+ ? metaData.getString(META_DATA_KEY_PROFILE) : PROFILE_ALL;
profile = (profile != null ? profile : PROFILE_ALL);
return TextUtils.equals(profile, PROFILE_PRIMARY);
}
diff --git a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
index ace50f30663d..49f6bd8c3334 100644
--- a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
+++ b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
@@ -339,6 +339,16 @@ public class TileUtils {
private static void loadTile(UserHandle user, Map<Pair<String, String>, Tile> addedCache,
String defaultCategory, List<Tile> outTiles, Intent intent, Bundle metaData,
ComponentInfo componentInfo) {
+ // Skip loading tile if the component is tagged primary_profile_only but not running on
+ // the current user.
+ if (user.getIdentifier() != ActivityManager.getCurrentUser()
+ && Tile.isPrimaryProfileOnly(componentInfo.metaData)) {
+ Log.w(LOG_TAG, "Found " + componentInfo.name + " for intent "
+ + intent + " is primary profile only, skip loading tile for uid "
+ + user.getIdentifier());
+ return;
+ }
+
String categoryKey = defaultCategory;
// Load category
if ((metaData == null || !metaData.containsKey(EXTRA_CATEGORY_KEY))
diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml
index d59d698efba2..c63cf06cf75c 100644
--- a/packages/SettingsLib/res/values/arrays.xml
+++ b/packages/SettingsLib/res/values/arrays.xml
@@ -118,17 +118,17 @@
<!-- Titles for Bluetooth AVRCP Versions -->
<string-array name="bluetooth_avrcp_versions">
- <item>AVRCP 1.4 (Default)</item>
+ <item>AVRCP 1.5 (Default)</item>
<item>AVRCP 1.3</item>
- <item>AVRCP 1.5</item>
+ <item>AVRCP 1.4</item>
<item>AVRCP 1.6</item>
</string-array>
<!-- Values for Bluetooth AVRCP Versions -->
<string-array name="bluetooth_avrcp_version_values">
- <item>avrcp14</item>
- <item>avrcp13</item>
<item>avrcp15</item>
+ <item>avrcp13</item>
+ <item>avrcp14</item>
<item>avrcp16</item>
</string-array>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 8e8368f9bc62..03161d051342 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -659,9 +659,6 @@
<!-- Setting Checkbox title for enabling Bluetooth Gabeldorsche. [CHAR LIMIT=40] -->
<string name="bluetooth_enable_gabeldorsche">Enable Gabeldorsche</string>
- <!-- Setting Checkbox title for enabling Enhanced Connectivity [CHAR LIMIT=80] -->
- <string name="enhanced_connectivity">Enhanced Connectivity</string>
-
<!-- UI debug setting: Select Bluetooth AVRCP Version -->
<string name="bluetooth_select_avrcp_version_string">Bluetooth AVRCP Version</string>
<!-- UI debug setting: Select Bluetooth AVRCP Version -->
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
index 9b4b97e7f55d..176905305506 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
@@ -17,11 +17,14 @@
package com.android.settingslib.drawer;
import static com.android.settingslib.drawer.TileUtils.IA_SETTINGS_ACTION;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_KEY_PROFILE;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_URI;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_KEYHINT;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY_URI;
+import static com.android.settingslib.drawer.TileUtils.PROFILE_ALL;
+import static com.android.settingslib.drawer.TileUtils.PROFILE_PRIMARY;
import static com.google.common.truth.Truth.assertThat;
@@ -189,7 +192,7 @@ public class TileUtilsTest {
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
ResolveInfo resolveInfo = newInfo(true, null /* category */, null, URI_GET_ICON,
- URI_GET_SUMMARY, "my title", 0);
+ URI_GET_SUMMARY, "my title", 0, PROFILE_ALL);
info.add(resolveInfo);
when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
@@ -211,7 +214,7 @@ public class TileUtilsTest {
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
ResolveInfo resolveInfo = newInfo(true, null /* category */, null, URI_GET_ICON,
- URI_GET_SUMMARY, null, 123);
+ URI_GET_SUMMARY, null, 123, PROFILE_ALL);
info.add(resolveInfo);
when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
@@ -235,7 +238,7 @@ public class TileUtilsTest {
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
ResolveInfo resolveInfo = newInfo(true, null /* category */, null, URI_GET_ICON,
- URI_GET_SUMMARY, null, 123);
+ URI_GET_SUMMARY, null, 123, PROFILE_ALL);
resolveInfo.activityInfo.packageName = "com.android.settings";
resolveInfo.activityInfo.applicationInfo.packageName = "com.android.settings";
info.add(resolveInfo);
@@ -258,7 +261,7 @@ public class TileUtilsTest {
final List<Tile> outTiles = new ArrayList<>();
final List<ResolveInfo> info = new ArrayList<>();
final ResolveInfo resolveInfo = newInfo(true, null /* category */, null, URI_GET_ICON,
- URI_GET_SUMMARY, null, 123);
+ URI_GET_SUMMARY, null, 123, PROFILE_ALL);
resolveInfo.activityInfo.packageName = "com.android.settings";
resolveInfo.activityInfo.applicationInfo.packageName = "com.android.settings";
info.add(resolveInfo);
@@ -290,7 +293,7 @@ public class TileUtilsTest {
List<Tile> outTiles = new ArrayList<>();
List<ResolveInfo> info = new ArrayList<>();
ResolveInfo resolveInfo = newInfo(true, null /* category */, null, URI_GET_ICON,
- URI_GET_SUMMARY, null, 123);
+ URI_GET_SUMMARY, null, 123, PROFILE_ALL);
resolveInfo.activityInfo.metaData
.putBoolean(TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE, true);
info.add(resolveInfo);
@@ -327,6 +330,26 @@ public class TileUtilsTest {
assertThat(outTiles).hasSize(2);
}
+ @Test
+ public void loadTilesForAction_isPrimaryProfileOnly_shouldSkipNonPrimaryUserTiles() {
+ Map<Pair<String, String>, Tile> addedCache = new ArrayMap<>();
+ List<Tile> outTiles = new ArrayList<>();
+ List<ResolveInfo> info = new ArrayList<>();
+ ResolveInfo resolveInfo = newInfo(true, null /* category */, null, URI_GET_ICON,
+ URI_GET_SUMMARY, null, 123, PROFILE_PRIMARY);
+ info.add(resolveInfo);
+
+ when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
+ .thenReturn(info);
+ when(mPackageManager.queryIntentContentProvidersAsUser(any(Intent.class), anyInt(),
+ anyInt())).thenReturn(info);
+
+ TileUtils.loadTilesForAction(mContext, new UserHandle(10), IA_SETTINGS_ACTION,
+ addedCache, null /* defaultCategory */, outTiles, false /* requiresSettings */);
+
+ assertThat(outTiles).isEmpty();
+ }
+
public static ResolveInfo newInfo(boolean systemApp, String category) {
return newInfo(systemApp, category, null);
}
@@ -337,14 +360,14 @@ public class TileUtilsTest {
private static ResolveInfo newInfo(boolean systemApp, String category, String keyHint,
String iconUri, String summaryUri) {
- return newInfo(systemApp, category, keyHint, iconUri, summaryUri, null, 0);
+ return newInfo(systemApp, category, keyHint, iconUri, summaryUri, null, 0, PROFILE_ALL);
}
private static ResolveInfo newInfo(boolean systemApp, String category, String keyHint,
- String iconUri, String summaryUri, String title, int titleResId) {
+ String iconUri, String summaryUri, String title, int titleResId, String profile) {
final Bundle metaData = newMetaData(category, keyHint, iconUri, summaryUri, title,
- titleResId);
+ titleResId, profile);
final ResolveInfo info = new ResolveInfo();
info.system = systemApp;
@@ -358,6 +381,7 @@ public class TileUtilsTest {
info.providerInfo.packageName = "abc";
info.providerInfo.name = "456";
info.providerInfo.authority = "auth";
+ info.providerInfo.metaData = metaData;
ShadowTileUtils.setMetaData(metaData);
info.providerInfo.applicationInfo = new ApplicationInfo();
@@ -369,7 +393,7 @@ public class TileUtilsTest {
}
private static Bundle newMetaData(String category, String keyHint, String iconUri,
- String summaryUri, String title, int titleResId) {
+ String summaryUri, String title, int titleResId, String profile) {
final Bundle metaData = new Bundle();
metaData.putString("com.android.settings.category", category);
metaData.putInt(META_DATA_PREFERENCE_ICON, 314159);
@@ -388,6 +412,9 @@ public class TileUtilsTest {
} else if (title != null) {
metaData.putString(TileUtils.META_DATA_PREFERENCE_TITLE, title);
}
+ if (profile != null) {
+ metaData.putString(META_DATA_KEY_PROFILE, profile);
+ }
return metaData;
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
index 1d25b1aafd70..7c198c88d5b6 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java
@@ -761,8 +761,8 @@ class SettingsProtoDumpUtil {
Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_VALUES,
GlobalSettingsProto.Gpu.ANGLE_GL_DRIVER_SELECTION_VALUES);
dumpSetting(s, p,
- Settings.Global.GLOBAL_SETTINGS_ANGLE_WHITELIST,
- GlobalSettingsProto.Gpu.ANGLE_WHITELIST);
+ Settings.Global.GLOBAL_SETTINGS_ANGLE_ALLOWLIST,
+ GlobalSettingsProto.Gpu.ANGLE_ALLOWLIST);
dumpSetting(s, p,
Settings.Global.GLOBAL_SETTINGS_SHOW_ANGLE_IN_USE_DIALOG_BOX,
GlobalSettingsProto.Gpu.SHOW_ANGLE_IN_USE_DIALOG);
@@ -785,14 +785,14 @@ class SettingsProtoDumpUtil {
Settings.Global.GAME_DRIVER_OPT_OUT_APPS,
GlobalSettingsProto.Gpu.GAME_DRIVER_OPT_OUT_APPS);
dumpSetting(s, p,
- Settings.Global.GAME_DRIVER_BLACKLIST,
- GlobalSettingsProto.Gpu.GAME_DRIVER_BLACKLIST);
+ Settings.Global.GAME_DRIVER_DENYLIST,
+ GlobalSettingsProto.Gpu.GAME_DRIVER_DENYLIST);
dumpSetting(s, p,
- Settings.Global.GAME_DRIVER_WHITELIST,
- GlobalSettingsProto.Gpu.GAME_DRIVER_WHITELIST);
+ Settings.Global.GAME_DRIVER_ALLOWLIST,
+ GlobalSettingsProto.Gpu.GAME_DRIVER_ALLOWLIST);
dumpSetting(s, p,
- Settings.Global.GAME_DRIVER_BLACKLISTS,
- GlobalSettingsProto.Gpu.GAME_DRIVER_BLACKLISTS);
+ Settings.Global.GAME_DRIVER_DENYLISTS,
+ GlobalSettingsProto.Gpu.GAME_DRIVER_DENYLISTS);
dumpSetting(s, p,
Settings.Global.GAME_DRIVER_SPHAL_LIBRARIES,
GlobalSettingsProto.Gpu.GAME_DRIVER_SPHAL_LIBRARIES);
diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
index b90b9c1208ae..bc1c3f908097 100644
--- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
+++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
@@ -270,7 +270,6 @@ public class SettingsBackupTest {
Settings.Global.SMART_REPLIES_IN_NOTIFICATIONS_FLAGS,
Settings.Global.SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS,
Settings.Global.ENABLE_ADB_INCREMENTAL_INSTALL_DEFAULT,
- Settings.Global.ENHANCED_CONNECTIVITY_ENABLED,
Settings.Global.ENHANCED_4G_MODE_ENABLED,
Settings.Global.EPHEMERAL_COOKIE_MAX_SIZE_BYTES,
Settings.Global.ERROR_LOGCAT_PREFIX,
@@ -503,14 +502,14 @@ public class SettingsBackupTest {
Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_ALL_ANGLE,
Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_PKGS,
Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_VALUES,
- Settings.Global.GLOBAL_SETTINGS_ANGLE_WHITELIST,
+ Settings.Global.GLOBAL_SETTINGS_ANGLE_ALLOWLIST,
Settings.Global.GAME_DRIVER_ALL_APPS,
Settings.Global.GAME_DRIVER_OPT_IN_APPS,
Settings.Global.GAME_DRIVER_PRERELEASE_OPT_IN_APPS,
Settings.Global.GAME_DRIVER_OPT_OUT_APPS,
- Settings.Global.GAME_DRIVER_BLACKLISTS,
- Settings.Global.GAME_DRIVER_BLACKLIST,
- Settings.Global.GAME_DRIVER_WHITELIST,
+ Settings.Global.GAME_DRIVER_DENYLISTS,
+ Settings.Global.GAME_DRIVER_DENYLIST,
+ Settings.Global.GAME_DRIVER_ALLOWLIST,
Settings.Global.GAME_DRIVER_SPHAL_LIBRARIES,
Settings.Global.GLOBAL_SETTINGS_SHOW_ANGLE_IN_USE_DIALOG_BOX,
Settings.Global.GPU_DEBUG_LAYER_APP,
diff --git a/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java b/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java
index 285730884a14..504e18a1488e 100644
--- a/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java
+++ b/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java
@@ -333,6 +333,9 @@ public final class RingtonePickerActivity extends AlertActivity implements
@Override
public void onDestroy() {
+ if (mHandler != null) {
+ mHandler.removeCallbacksAndMessages(null);
+ }
if (mCursor != null) {
mCursor.close();
mCursor = null;
diff --git a/packages/SystemUI/res/drawable/ic_reverse_charging.xml b/packages/SystemUI/res/drawable/ic_reverse_charging.xml
new file mode 100644
index 000000000000..2268d868c89e
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_reverse_charging.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="?attr/chargingAnimColor"
+ android:pathData="M18,16.5v4.17C18,21.4,17.4,22,16.66,22H7.33C6.6,22,6,21.4,6,20.67V15V5.33C6,4.6,6.6,4,7.33,4H9.5V2h5v2h2.17 C17.4,4,18,4.6,18,5.33V7.5h-2V6H8v9v5h8v-3.5H18z M13,15.5h-2V14c0-1.65,1.35-3,3-3h4V9l3,3l-3,3v-2h-4c-0.55,0-1,0.45-1,1V15.5z"/>
+</vector> \ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/rounded_corner_bottom.xml b/packages/SystemUI/res/drawable/rounded_corner_bottom.xml
new file mode 100644
index 000000000000..ef1a82f9798c
--- /dev/null
+++ b/packages/SystemUI/res/drawable/rounded_corner_bottom.xml
@@ -0,0 +1,16 @@
+<!--
+ Copyright (C) 2020 The Android Open Source Project
+
+ 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.
+-->
+<!-- Overlay this resource to change rounded_corners_bottom -->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@drawable/rounded"/>
diff --git a/packages/SystemUI/res/drawable/rounded_corner_top.xml b/packages/SystemUI/res/drawable/rounded_corner_top.xml
new file mode 100644
index 000000000000..79348928a7a8
--- /dev/null
+++ b/packages/SystemUI/res/drawable/rounded_corner_top.xml
@@ -0,0 +1,16 @@
+<!--
+ Copyright (C) 2020 The Android Open Source Project
+
+ 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.
+-->
+<!-- Overlay this resource to change rounded_corners_top -->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@drawable/rounded"/>
diff --git a/packages/SystemUI/res/layout/rounded_corners.xml b/packages/SystemUI/res/layout/rounded_corners.xml
index 1849068d91b8..db892d78c556 100644
--- a/packages/SystemUI/res/layout/rounded_corners.xml
+++ b/packages/SystemUI/res/layout/rounded_corners.xml
@@ -16,6 +16,7 @@
-->
<com.android.systemui.RegionInterceptingFrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/rounded_corners_default"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
diff --git a/packages/SystemUI/res/layout/rounded_corners_bottom.xml b/packages/SystemUI/res/layout/rounded_corners_bottom.xml
new file mode 100644
index 000000000000..dde1248356e0
--- /dev/null
+++ b/packages/SystemUI/res/layout/rounded_corners_bottom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+** Copyright 2020, 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.
+-->
+<com.android.systemui.RegionInterceptingFrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/rounded_corners_bottom"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <ImageView
+ android:id="@+id/left"
+ android:layout_width="12dp"
+ android:layout_height="12dp"
+ android:layout_gravity="left|bottom"
+ android:tint="#ff000000"
+ android:src="@drawable/rounded_corner_bottom"/>
+ <ImageView
+ android:id="@+id/right"
+ android:layout_width="12dp"
+ android:layout_height="12dp"
+ android:tint="#ff000000"
+ android:layout_gravity="right|bottom"
+ android:src="@drawable/rounded_corner_bottom"/>
+</com.android.systemui.RegionInterceptingFrameLayout>
diff --git a/packages/SystemUI/res/layout/rounded_corners_top.xml b/packages/SystemUI/res/layout/rounded_corners_top.xml
new file mode 100644
index 000000000000..813c97d06f57
--- /dev/null
+++ b/packages/SystemUI/res/layout/rounded_corners_top.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+** Copyright 2020, 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.
+-->
+<com.android.systemui.RegionInterceptingFrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/rounded_corners_top"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <ImageView
+ android:id="@+id/left"
+ android:layout_width="12dp"
+ android:layout_height="12dp"
+ android:layout_gravity="left|top"
+ android:tint="#ff000000"
+ android:src="@drawable/rounded_corner_top"/>
+ <ImageView
+ android:id="@+id/right"
+ android:layout_width="12dp"
+ android:layout_height="12dp"
+ android:tint="#ff000000"
+ android:layout_gravity="right|top"
+ android:src="@drawable/rounded_corner_top"/>
+</com.android.systemui.RegionInterceptingFrameLayout>
diff --git a/packages/SystemUI/res/layout/wireless_charging_layout.xml b/packages/SystemUI/res/layout/wireless_charging_layout.xml
index 4610409f830f..730f24ff9dd2 100644
--- a/packages/SystemUI/res/layout/wireless_charging_layout.xml
+++ b/packages/SystemUI/res/layout/wireless_charging_layout.xml
@@ -36,14 +36,26 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:orientation="vertical">
+ android:orientation="horizontal">
<TextView
- android:id="@+id/wireless_charging_percentage"
+ android:id="@+id/reverse_wireless_charging_percentage"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:visibility="gone"/>
+ <ImageView
+ android:id="@+id/reverse_wireless_charging_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:textSize="24sp"/>
+ android:src="@drawable/ic_reverse_charging"
+ android:visibility="gone"/>
+ <TextView
+ android:id="@+id/wireless_charging_percentage"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"/>
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</FrameLayout>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 848cdb1e831c..01abc77aea38 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -209,6 +209,26 @@
far break points. A sensor value less than this is considered "near". -->
<item name="proximity_sensor_threshold" translatable="false" format="float" type="dimen"></item>
+ <!-- If using proximity_sensor_type, specifies a threshold value to distinguish near and
+ far break points. A sensor value more than this is considered "far". If not set,
+ proximity_sensor_threshold is used. This allows one to implement a latching mechanism for
+ noisy sensors. -->
+ <item name="proximity_sensor_threshold_latch" translatable="false" format="float" type="dimen"></item>
+
+ <!-- Override value to use for proximity sensor as confirmation for proximity_sensor_type. -->
+ <string name="proximity_sensor_secondary_type" translatable="false"></string>
+
+ <!-- If using proximity_sensor_secondary_type, specifies a threshold value to distinguish
+ near and far break points. A sensor value less than this is considered "near". -->
+ <item name="proximity_sensor_secondary_threshold" translatable="false" format="float"
+ type="dimen"></item>
+
+ <!-- If using proximity_sensor_secondary_type, specifies a threshold value to distinguish near and
+ far break points. A sensor value more than this is considered "far". If not set,
+ proximity_sensor_secondary_threshold is used. This allows one to implement a latching
+ mechanism for noisy sensors. -->
+ <item name="proximity_sensor_secondary_threshold_latch" translatable="false" format="float" type="dimen"></item>
+
<!-- Doze: pulse parameter - how long does it take to fade in? -->
<integer name="doze_pulse_duration_in">130</integer>
@@ -308,6 +328,10 @@
<item>com.android.systemui.toast.ToastUI</item>
</string-array>
+ <!-- QS tile shape store width. negative implies fill configuration instead of stroke-->
+ <dimen name="config_qsTileStrokeWidthActive">-1dp</dimen>
+ <dimen name="config_qsTileStrokeWidthInactive">-1dp</dimen>
+
<!-- SystemUI vender service, used in config_systemUIServiceComponents. -->
<string name="config_systemUIVendorServiceComponent" translatable="false">com.android.systemui.VendorServices</string>
@@ -507,6 +531,8 @@
<!-- Defines the blacklist for system icons. That is to say, the icons in the status bar that
are part of the blacklist are never displayed. Each item in the blacklist must be a string
defined in core/res/res/config.xml to properly blacklist the icon.
+
+ TODO: See if we can rename this config variable.
-->
<string-array name="config_statusBarIconBlackList" translatable="false">
<item>@*android:string/status_bar_rotate</item>
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/SyncRtSurfaceTransactionApplierCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/SyncRtSurfaceTransactionApplierCompat.java
index 82e6251a4484..2985a61dec9e 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/SyncRtSurfaceTransactionApplierCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/SyncRtSurfaceTransactionApplierCompat.java
@@ -46,6 +46,7 @@ public class SyncRtSurfaceTransactionApplierCompat {
public static final int FLAG_CORNER_RADIUS = 1 << 4;
public static final int FLAG_BACKGROUND_BLUR_RADIUS = 1 << 5;
public static final int FLAG_VISIBILITY = 1 << 6;
+ public static final int FLAG_RELATIVE_LAYER = 1 << 7;
private static final int MSG_UPDATE_SEQUENCE_NUMBER = 0;
@@ -192,6 +193,8 @@ public class SyncRtSurfaceTransactionApplierCompat {
Matrix matrix;
Rect windowCrop;
int layer;
+ SurfaceControl relativeTo;
+ int relativeLayer;
boolean visible;
/**
@@ -249,6 +252,18 @@ public class SyncRtSurfaceTransactionApplierCompat {
}
/**
+ * @param relativeTo The surface that's set relative layer to.
+ * @param relativeLayer The relative layer.
+ * @return this Builder
+ */
+ public Builder withRelativeLayerTo(SurfaceControl relativeTo, int relativeLayer) {
+ this.relativeTo = relativeTo;
+ this.relativeLayer = relativeLayer;
+ flags |= FLAG_RELATIVE_LAYER;
+ return this;
+ }
+
+ /**
* @param radius the Radius for rounded corners to apply to the surface.
* @return this Builder
*/
@@ -283,7 +298,7 @@ public class SyncRtSurfaceTransactionApplierCompat {
*/
public SurfaceParams build() {
return new SurfaceParams(surface, flags, alpha, matrix, windowCrop, layer,
- cornerRadius, backgroundBlurRadius, visible);
+ relativeTo, relativeLayer, cornerRadius, backgroundBlurRadius, visible);
}
}
@@ -297,21 +312,25 @@ public class SyncRtSurfaceTransactionApplierCompat {
* @param windowCrop Crop to apply, only applied if not {@code null}
*/
public SurfaceParams(SurfaceControlCompat surface, float alpha, Matrix matrix,
- Rect windowCrop, int layer, float cornerRadius) {
+ Rect windowCrop, int layer, SurfaceControl relativeTo, int relativeLayer,
+ float cornerRadius) {
this(surface.mSurfaceControl,
FLAG_ALL & ~(FLAG_VISIBILITY | FLAG_BACKGROUND_BLUR_RADIUS), alpha,
- matrix, windowCrop, layer, cornerRadius, 0 /* backgroundBlurRadius */, true);
+ matrix, windowCrop, layer, relativeTo, relativeLayer, cornerRadius,
+ 0 /* backgroundBlurRadius */, true);
}
private SurfaceParams(SurfaceControl surface, int flags, float alpha, Matrix matrix,
- Rect windowCrop, int layer, float cornerRadius, int backgroundBlurRadius,
- boolean visible) {
+ Rect windowCrop, int layer, SurfaceControl relativeTo, int relativeLayer,
+ float cornerRadius, int backgroundBlurRadius, boolean visible) {
this.flags = flags;
this.surface = surface;
this.alpha = alpha;
this.matrix = new Matrix(matrix);
this.windowCrop = windowCrop != null ? new Rect(windowCrop) : null;
this.layer = layer;
+ this.relativeTo = relativeTo;
+ this.relativeLayer = relativeLayer;
this.cornerRadius = cornerRadius;
this.backgroundBlurRadius = backgroundBlurRadius;
this.visible = visible;
@@ -327,6 +346,8 @@ public class SyncRtSurfaceTransactionApplierCompat {
public final Matrix matrix;
public final Rect windowCrop;
public final int layer;
+ public final SurfaceControl relativeTo;
+ public final int relativeLayer;
public final boolean visible;
public void applyTo(SurfaceControl.Transaction t) {
@@ -355,6 +376,9 @@ public class SyncRtSurfaceTransactionApplierCompat {
t.hide(surface);
}
}
+ if ((flags & FLAG_RELATIVE_LAYER) != 0) {
+ t.setRelativeLayer(surface, relativeTo, relativeLayer);
+ }
}
}
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java
index b966f9356849..255fffdb3291 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java
@@ -114,6 +114,11 @@ public class TransactionCompat {
t.deferTransactionUntil(surfaceControl, barrier, frameNumber);
}
+ public static void setRelativeLayer(Transaction t, SurfaceControl surfaceControl,
+ SurfaceControl relativeTo, int z) {
+ t.setRelativeLayer(surfaceControl, relativeTo, z);
+ }
+
@Deprecated
public static void setEarlyWakeup(Transaction t) {
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java
new file mode 100644
index 000000000000..4d968f1763ca
--- /dev/null
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2020 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.shared.system;
+
+import android.graphics.Rect;
+import android.service.wallpaper.IWallpaperEngine;
+import android.util.Log;
+
+/**
+ * @see IWallpaperEngine
+ */
+public class WallpaperEngineCompat {
+
+ private static final String TAG = "WallpaperEngineCompat";
+
+ private final IWallpaperEngine mWrappedEngine;
+
+ public WallpaperEngineCompat(IWallpaperEngine wrappedEngine) {
+ mWrappedEngine = wrappedEngine;
+ }
+
+ /**
+ * @see IWallpaperEngine#scalePreview(Rect)
+ */
+ public void scalePreview(Rect scaleToRect) {
+ try {
+ mWrappedEngine.scalePreview(scaleToRect);
+ } catch (Exception e) {
+ Log.i(TAG, "Couldn't call scalePreview method on WallpaperEngine", e);
+ }
+ }
+}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java
index 7570c2cbfe98..1f194eca816f 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java
@@ -18,6 +18,7 @@ package com.android.systemui.shared.system;
import android.app.WallpaperManager;
import android.content.Context;
+import android.content.res.Resources;
import android.os.IBinder;
/**
@@ -36,4 +37,15 @@ public class WallpaperManagerCompat {
public void setWallpaperZoomOut(IBinder windowToken, float zoom) {
mWallpaperManager.setWallpaperZoomOut(windowToken, zoom);
}
+
+ /**
+ * @return the max scale for the wallpaper when it's fully zoomed out
+ */
+ public static float getWallpaperZoomOutMaxScale(Context context) {
+ return context.getResources()
+ .getFloat(Resources.getSystem().getIdentifier(
+ /* name= */ "config_wallpaperMaxScale",
+ /* defType= */ "dimen",
+ /* defPackage= */ "android"));
+ }
} \ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index a46ab3a9e35b..5235a451d021 100644
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -234,7 +234,7 @@ public class BatteryMeterView extends LinearLayout implements
}
Dependency.get(TunerService.class)
- .addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+ .addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
mIsSubscribedForTunerUpdates = true;
}
@@ -287,8 +287,8 @@ public class BatteryMeterView extends LinearLayout implements
@Override
public void onTuningChanged(String key, String newValue) {
- if (StatusBarIconController.ICON_BLACKLIST.equals(key)) {
- ArraySet<String> icons = StatusBarIconController.getIconBlacklist(
+ if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
+ ArraySet<String> icons = StatusBarIconController.getIconHideList(
getContext(), newValue);
setVisibility(icons.contains(mSlotBattery) ? View.GONE : View.VISIBLE);
}
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index 7861211e802d..ad11d71eb132 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -48,10 +48,11 @@ import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PixelFormat;
+import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
-import android.graphics.drawable.VectorDrawable;
+import android.graphics.drawable.Drawable;
import android.hardware.display.DisplayManager;
import android.os.Handler;
import android.os.HandlerExecutor;
@@ -61,6 +62,7 @@ import android.os.UserHandle;
import android.provider.Settings.Secure;
import android.util.DisplayMetrics;
import android.util.Log;
+import android.view.Display;
import android.view.DisplayCutout;
import android.view.DisplayCutout.BoundsPosition;
import android.view.DisplayInfo;
@@ -117,12 +119,15 @@ public class ScreenDecorations extends SystemUI implements Tunable {
private DisplayManager.DisplayListener mDisplayListener;
private CameraAvailabilityListener mCameraListener;
+ //TODO: These are piecemeal being updated to Points for now to support non-square rounded
+ // corners. for now it is only supposed when reading the intrinsic size from the drawables with
+ // mIsRoundedCornerMultipleRadius is set
@VisibleForTesting
- protected int mRoundedDefault;
+ protected Point mRoundedDefault = new Point(0, 0);
@VisibleForTesting
- protected int mRoundedDefaultTop;
+ protected Point mRoundedDefaultTop = new Point(0, 0);
@VisibleForTesting
- protected int mRoundedDefaultBottom;
+ protected Point mRoundedDefaultBottom = new Point(0, 0);
@VisibleForTesting
protected View[] mOverlays;
@Nullable
@@ -375,8 +380,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
if (mOverlays[pos] != null) {
return;
}
- mOverlays[pos] = LayoutInflater.from(mContext)
- .inflate(R.layout.rounded_corners, null);
+ mOverlays[pos] = overlayForPosition(pos);
mCutoutViews[pos] = new DisplayCutoutView(mContext, pos, this);
((ViewGroup) mOverlays[pos]).addView(mCutoutViews[pos]);
@@ -405,6 +409,23 @@ public class ScreenDecorations extends SystemUI implements Tunable {
new ValidatingPreDrawListener(mOverlays[pos]));
}
+ /**
+ * Allow overrides for top/bottom positions
+ */
+ private View overlayForPosition(@BoundsPosition int pos) {
+ switch (pos) {
+ case BOUNDS_POSITION_TOP:
+ return LayoutInflater.from(mContext)
+ .inflate(R.layout.rounded_corners_top, null);
+ case BOUNDS_POSITION_BOTTOM:
+ return LayoutInflater.from(mContext)
+ .inflate(R.layout.rounded_corners_bottom, null);
+ default:
+ return LayoutInflater.from(mContext)
+ .inflate(R.layout.rounded_corners, null);
+ }
+ }
+
private void updateView(@BoundsPosition int pos) {
if (mOverlays == null || mOverlays[pos] == null) {
return;
@@ -590,27 +611,36 @@ public class ScreenDecorations extends SystemUI implements Tunable {
}
private void updateRoundedCornerRadii() {
+ // We should eventually move to just using the intrinsic size of the drawables since
+ // they should be sized to the exact pixels they want to cover. Therefore I'm purposely not
+ // upgrading all of the configs to contain (width, height) pairs. Instead assume that a
+ // device configured using the single integer config value is okay with drawing the corners
+ // as a square
final int newRoundedDefault = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.rounded_corner_radius);
final int newRoundedDefaultTop = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.rounded_corner_radius_top);
final int newRoundedDefaultBottom = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.rounded_corner_radius_bottom);
- final boolean roundedCornersChanged = mRoundedDefault != newRoundedDefault
- || mRoundedDefaultBottom != newRoundedDefaultBottom
- || mRoundedDefaultTop != newRoundedDefaultTop;
- if (roundedCornersChanged) {
+ final boolean changed = mRoundedDefault.x != newRoundedDefault
+ || mRoundedDefaultTop.x != newRoundedDefault
+ || mRoundedDefaultBottom.x != newRoundedDefault;
+
+ if (changed) {
// If config_roundedCornerMultipleRadius set as true, ScreenDecorations respect the
- // max(width, height) size of drawable/rounded.xml instead of rounded_corner_radius
+ // (width, height) size of drawable/rounded.xml instead of rounded_corner_radius
if (mIsRoundedCornerMultipleRadius) {
- final VectorDrawable d = (VectorDrawable) mContext.getDrawable(R.drawable.rounded);
- mRoundedDefault = Math.max(d.getIntrinsicWidth(), d.getIntrinsicHeight());
- mRoundedDefaultTop = mRoundedDefaultBottom = mRoundedDefault;
+ Drawable d = mContext.getDrawable(R.drawable.rounded);
+ mRoundedDefault.set(d.getIntrinsicWidth(), d.getIntrinsicHeight());
+ d = mContext.getDrawable(R.drawable.rounded_corner_top);
+ mRoundedDefaultTop.set(d.getIntrinsicWidth(), d.getIntrinsicHeight());
+ d = mContext.getDrawable(R.drawable.rounded_corner_bottom);
+ mRoundedDefaultBottom.set(d.getIntrinsicWidth(), d.getIntrinsicHeight());
} else {
- mRoundedDefault = newRoundedDefault;
- mRoundedDefaultTop = newRoundedDefaultTop;
- mRoundedDefaultBottom = newRoundedDefaultBottom;
+ mRoundedDefault.set(newRoundedDefault, newRoundedDefault);
+ mRoundedDefaultTop.set(newRoundedDefaultTop, newRoundedDefaultTop);
+ mRoundedDefaultBottom.set(newRoundedDefaultBottom, newRoundedDefaultBottom);
}
onTuningChanged(SIZE, null);
}
@@ -625,7 +655,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
if (shouldShowRoundedCorner(pos)) {
final int gravity = getRoundedCornerGravity(pos, id == R.id.left);
((FrameLayout.LayoutParams) rounded.getLayoutParams()).gravity = gravity;
- rounded.setRotation(getRoundedCornerRotation(gravity));
+ setRoundedCornerOrientation(rounded, gravity);
rounded.setVisibility(View.VISIBLE);
}
}
@@ -646,23 +676,38 @@ public class ScreenDecorations extends SystemUI implements Tunable {
}
}
- private int getRoundedCornerRotation(int gravity) {
+ /**
+ * Configures the rounded corner drawable's view matrix based on the gravity.
+ *
+ * The gravity describes which corner to configure for, and the drawable we are rotating is
+ * assumed to be oriented for the top-left corner of the device regardless of the target corner.
+ * Therefore we need to rotate 180 degrees to get a bottom-left corner, and mirror in the x- or
+ * y-axis for the top-right and bottom-left corners.
+ */
+ private void setRoundedCornerOrientation(View corner, int gravity) {
+ corner.setRotation(0);
+ corner.setScaleX(1);
+ corner.setScaleY(1);
switch (gravity) {
case Gravity.TOP | Gravity.LEFT:
- return 0;
+ return;
case Gravity.TOP | Gravity.RIGHT:
- return 90;
+ corner.setScaleX(-1); // flip X axis
+ return;
case Gravity.BOTTOM | Gravity.LEFT:
- return 270;
+ corner.setScaleY(-1); // flip Y axis
+ return;
case Gravity.BOTTOM | Gravity.RIGHT:
- return 180;
+ corner.setRotation(180);
+ return;
default:
throw new IllegalArgumentException("Unsupported gravity: " + gravity);
}
}
-
private boolean hasRoundedCorners() {
- return mRoundedDefault > 0 || mRoundedDefaultBottom > 0 || mRoundedDefaultTop > 0
+ return mRoundedDefault.x > 0
+ || mRoundedDefaultBottom.x > 0
+ || mRoundedDefaultTop.x > 0
|| mIsRoundedCornerMultipleRadius;
}
@@ -712,12 +757,13 @@ public class ScreenDecorations extends SystemUI implements Tunable {
mHandler.post(() -> {
if (mOverlays == null) return;
if (SIZE.equals(key)) {
- int size = mRoundedDefault;
- int sizeTop = mRoundedDefaultTop;
- int sizeBottom = mRoundedDefaultBottom;
+ Point size = mRoundedDefault;
+ Point sizeTop = mRoundedDefaultTop;
+ Point sizeBottom = mRoundedDefaultBottom;
if (newValue != null) {
try {
- size = (int) (Integer.parseInt(newValue) * mDensity);
+ int s = (int) (Integer.parseInt(newValue) * mDensity);
+ size = new Point(s, s);
} catch (Exception e) {
}
}
@@ -726,14 +772,17 @@ public class ScreenDecorations extends SystemUI implements Tunable {
});
}
- private void updateRoundedCornerSize(int sizeDefault, int sizeTop, int sizeBottom) {
+ private void updateRoundedCornerSize(
+ Point sizeDefault,
+ Point sizeTop,
+ Point sizeBottom) {
if (mOverlays == null) {
return;
}
- if (sizeTop == 0) {
+ if (sizeTop.x == 0) {
sizeTop = sizeDefault;
}
- if (sizeBottom == 0) {
+ if (sizeBottom.x == 0) {
sizeBottom = sizeDefault;
}
@@ -760,10 +809,10 @@ public class ScreenDecorations extends SystemUI implements Tunable {
}
@VisibleForTesting
- protected void setSize(View view, int pixelSize) {
+ protected void setSize(View view, Point pixelSize) {
LayoutParams params = view.getLayoutParams();
- params.width = pixelSize;
- params.height = pixelSize;
+ params.width = pixelSize.x;
+ params.height = pixelSize.y;
view.setLayoutParams(params);
}
@@ -772,6 +821,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
private static final float HIDDEN_CAMERA_PROTECTION_SCALE = 0.5f;
+ private Display.Mode mDisplayMode = null;
private final DisplayInfo mInfo = new DisplayInfo();
private final Paint mPaint = new Paint();
private final List<Rect> mBounds = new ArrayList();
@@ -856,11 +906,33 @@ public class ScreenDecorations extends SystemUI implements Tunable {
@Override
public void onDisplayChanged(int displayId) {
+ Display.Mode oldMode = mDisplayMode;
+ mDisplayMode = getDisplay().getMode();
+
+ // Display mode hasn't meaningfully changed, we can ignore it
+ if (!modeChanged(oldMode, mDisplayMode)) {
+ return;
+ }
+
if (displayId == getDisplay().getDisplayId()) {
update();
}
}
+ private boolean modeChanged(Display.Mode oldMode, Display.Mode newMode) {
+ if (oldMode == null) {
+ return true;
+ }
+
+ boolean changed = false;
+ changed |= oldMode.getPhysicalHeight() != newMode.getPhysicalHeight();
+ changed |= oldMode.getPhysicalWidth() != newMode.getPhysicalWidth();
+ // We purposely ignore refresh rate and id changes here, because we don't need to
+ // invalidate for those, and they can trigger the refresh rate to increase
+
+ return changed;
+ }
+
public void setRotation(int rotation) {
mRotation = rotation;
update();
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 6f103b020814..e252195da136 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -207,12 +207,6 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
/** Whether or not the BubbleStackView has been added to the WindowManager. */
private boolean mAddedToWindowManager = false;
- /**
- * Value from {@link NotificationShadeWindowController#getForceHasTopUi()} when we forced top UI
- * due to expansion. We'll restore this value when the stack collapses.
- */
- private boolean mHadTopUi = false;
-
// Listens to user switch so bubbles can be saved and restored.
private final NotificationLockscreenUserManager mNotifUserManager;
@@ -1303,7 +1297,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
// Collapsing? Do this first before remaining steps.
if (update.expandedChanged && !update.expanded) {
mStackView.setExpanded(false);
- mNotificationShadeWindowController.setForceHasTopUi(mHadTopUi);
+ mNotificationShadeWindowController.setRequestTopUi(false, TAG);
}
// Do removals, if any.
@@ -1393,8 +1387,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
if (update.expandedChanged && update.expanded) {
if (mStackView != null) {
mStackView.setExpanded(true);
- mHadTopUi = mNotificationShadeWindowController.getForceHasTopUi();
- mNotificationShadeWindowController.setForceHasTopUi(true);
+ mNotificationShadeWindowController.setRequestTopUi(true, TAG);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java
index d5b54f94d938..2569f7c107cb 100644
--- a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java
+++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingAnimation.java
@@ -54,25 +54,28 @@ public class WirelessChargingAnimation {
* before calling {@link #show} - can be done through {@link #makeWirelessChargingAnimation}.
* @hide
*/
- public WirelessChargingAnimation(@NonNull Context context, @Nullable Looper looper, int
- batteryLevel, Callback callback, boolean isDozing) {
+ public WirelessChargingAnimation(@NonNull Context context, @Nullable Looper looper,
+ int transmittingBatteryLevel, int batteryLevel, Callback callback, boolean isDozing) {
mCurrentWirelessChargingView = new WirelessChargingView(context, looper,
- batteryLevel, callback, isDozing);
+ transmittingBatteryLevel, batteryLevel, callback, isDozing);
}
/**
* Creates a wireless charging animation object populated with next view.
+ *
* @hide
*/
public static WirelessChargingAnimation makeWirelessChargingAnimation(@NonNull Context context,
- @Nullable Looper looper, int batteryLevel, Callback callback, boolean isDozing) {
- return new WirelessChargingAnimation(context, looper, batteryLevel, callback, isDozing);
+ @Nullable Looper looper, int transmittingBatteryLevel, int batteryLevel,
+ Callback callback, boolean isDozing) {
+ return new WirelessChargingAnimation(context, looper, transmittingBatteryLevel,
+ batteryLevel, callback, isDozing);
}
/**
* Show the view for the specified duration.
*/
- public void show() {
+ public void show(long delay) {
if (mCurrentWirelessChargingView == null ||
mCurrentWirelessChargingView.mNextView == null) {
throw new RuntimeException("setView must have been called");
@@ -83,8 +86,8 @@ public class WirelessChargingAnimation {
}
mPreviousWirelessChargingView = mCurrentWirelessChargingView;
- mCurrentWirelessChargingView.show();
- mCurrentWirelessChargingView.hide(DURATION);
+ mCurrentWirelessChargingView.show(delay);
+ mCurrentWirelessChargingView.hide(delay + DURATION);
}
private static class WirelessChargingView {
@@ -100,10 +103,12 @@ public class WirelessChargingAnimation {
private WindowManager mWM;
private Callback mCallback;
- public WirelessChargingView(Context context, @Nullable Looper looper, int batteryLevel,
- Callback callback, boolean isDozing) {
+ public WirelessChargingView(Context context, @Nullable Looper looper,
+ int transmittingBatteryLevel, int batteryLevel, Callback callback,
+ boolean isDozing) {
mCallback = callback;
- mNextView = new WirelessChargingLayout(context, batteryLevel, isDozing);
+ mNextView = new WirelessChargingLayout(context, transmittingBatteryLevel, batteryLevel,
+ isDozing);
mGravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER;
final WindowManager.LayoutParams params = mParams;
@@ -149,9 +154,9 @@ public class WirelessChargingAnimation {
};
}
- public void show() {
+ public void show(long delay) {
if (DEBUG) Slog.d(TAG, "SHOW: " + this);
- mHandler.obtainMessage(SHOW).sendToTarget();
+ mHandler.sendMessageDelayed(Message.obtain(mHandler, SHOW), delay);
}
public void hide(long duration) {
diff --git a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java
index ec150873d56e..e8407f01516b 100644
--- a/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/charging/WirelessChargingLayout.java
@@ -22,6 +22,7 @@ import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.drawable.Animatable;
import android.util.AttributeSet;
+import android.util.TypedValue;
import android.view.ContextThemeWrapper;
import android.view.animation.PathInterpolator;
import android.widget.FrameLayout;
@@ -37,16 +38,17 @@ import java.text.NumberFormat;
* @hide
*/
public class WirelessChargingLayout extends FrameLayout {
- private final static int UNKNOWN_BATTERY_LEVEL = -1;
+ public final static int UNKNOWN_BATTERY_LEVEL = -1;
public WirelessChargingLayout(Context context) {
super(context);
init(context, null, false);
}
- public WirelessChargingLayout(Context context, int batteryLevel, boolean isDozing) {
+ public WirelessChargingLayout(Context context, int transmittingBatteryLevel, int batteryLevel,
+ boolean isDozing) {
super(context);
- init(context, null, batteryLevel, isDozing);
+ init(context, null, transmittingBatteryLevel, batteryLevel, isDozing);
}
public WirelessChargingLayout(Context context, AttributeSet attrs) {
@@ -55,11 +57,13 @@ public class WirelessChargingLayout extends FrameLayout {
}
private void init(Context c, AttributeSet attrs, boolean isDozing) {
- init(c, attrs, -1, false);
+ init(c, attrs, -1, -1, false);
}
- private void init(Context context, AttributeSet attrs, int batteryLevel, boolean isDozing) {
- final int mBatteryLevel = batteryLevel;
+ private void init(Context context, AttributeSet attrs, int transmittingBatteryLevel,
+ int batteryLevel, boolean isDozing) {
+ final boolean showTransmittingBatteryLevel =
+ (transmittingBatteryLevel != UNKNOWN_BATTERY_LEVEL);
// set style based on background
int style = R.style.ChargingAnim_WallpaperBackground;
@@ -74,39 +78,40 @@ public class WirelessChargingLayout extends FrameLayout {
final Animatable chargingAnimation = (Animatable) chargingView.getDrawable();
// amount of battery:
- final TextView mPercentage = findViewById(R.id.wireless_charging_percentage);
+ final TextView percentage = findViewById(R.id.wireless_charging_percentage);
if (batteryLevel != UNKNOWN_BATTERY_LEVEL) {
- mPercentage.setText(NumberFormat.getPercentInstance().format(mBatteryLevel / 100f));
- mPercentage.setAlpha(0);
+ percentage.setText(NumberFormat.getPercentInstance().format(batteryLevel / 100f));
+ percentage.setAlpha(0);
}
- final long chargingAnimationFadeStartOffset = (long) context.getResources().getInteger(
+ final long chargingAnimationFadeStartOffset = context.getResources().getInteger(
R.integer.wireless_charging_fade_offset);
- final long chargingAnimationFadeDuration = (long) context.getResources().getInteger(
+ final long chargingAnimationFadeDuration = context.getResources().getInteger(
R.integer.wireless_charging_fade_duration);
final float batteryLevelTextSizeStart = context.getResources().getFloat(
R.dimen.wireless_charging_anim_battery_level_text_size_start);
final float batteryLevelTextSizeEnd = context.getResources().getFloat(
- R.dimen.wireless_charging_anim_battery_level_text_size_end);
+ R.dimen.wireless_charging_anim_battery_level_text_size_end) * (
+ showTransmittingBatteryLevel ? 0.75f : 1.0f);
// Animation Scale: battery percentage text scales from 0% to 100%
- ValueAnimator textSizeAnimator = ObjectAnimator.ofFloat(mPercentage, "textSize",
+ ValueAnimator textSizeAnimator = ObjectAnimator.ofFloat(percentage, "textSize",
batteryLevelTextSizeStart, batteryLevelTextSizeEnd);
textSizeAnimator.setInterpolator(new PathInterpolator(0, 0, 0, 1));
- textSizeAnimator.setDuration((long) context.getResources().getInteger(
+ textSizeAnimator.setDuration(context.getResources().getInteger(
R.integer.wireless_charging_battery_level_text_scale_animation_duration));
// Animation Opacity: battery percentage text transitions from 0 to 1 opacity
- ValueAnimator textOpacityAnimator = ObjectAnimator.ofFloat(mPercentage, "alpha", 0, 1);
+ ValueAnimator textOpacityAnimator = ObjectAnimator.ofFloat(percentage, "alpha", 0, 1);
textOpacityAnimator.setInterpolator(Interpolators.LINEAR);
- textOpacityAnimator.setDuration((long) context.getResources().getInteger(
+ textOpacityAnimator.setDuration(context.getResources().getInteger(
R.integer.wireless_charging_battery_level_text_opacity_duration));
- textOpacityAnimator.setStartDelay((long) context.getResources().getInteger(
+ textOpacityAnimator.setStartDelay(context.getResources().getInteger(
R.integer.wireless_charging_anim_opacity_offset));
// Animation Opacity: battery percentage text fades from 1 to 0 opacity
- ValueAnimator textFadeAnimator = ObjectAnimator.ofFloat(mPercentage, "alpha", 1, 0);
+ ValueAnimator textFadeAnimator = ObjectAnimator.ofFloat(percentage, "alpha", 1, 0);
textFadeAnimator.setDuration(chargingAnimationFadeDuration);
textFadeAnimator.setInterpolator(Interpolators.LINEAR);
textFadeAnimator.setStartDelay(chargingAnimationFadeStartOffset);
@@ -114,7 +119,80 @@ public class WirelessChargingLayout extends FrameLayout {
// play all animations together
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(textSizeAnimator, textOpacityAnimator, textFadeAnimator);
+
+ if (!showTransmittingBatteryLevel) {
+ chargingAnimation.start();
+ animatorSet.start();
+ return;
+ }
+
+ // amount of transmitting battery:
+ final TextView transmittingPercentage = findViewById(
+ R.id.reverse_wireless_charging_percentage);
+ transmittingPercentage.setVisibility(VISIBLE);
+ transmittingPercentage.setText(
+ NumberFormat.getPercentInstance().format(transmittingBatteryLevel / 100f));
+ transmittingPercentage.setAlpha(0);
+
+ // Animation Scale: transmitting battery percentage text scales from 0% to 100%
+ ValueAnimator textSizeAnimatorTransmitting = ObjectAnimator.ofFloat(transmittingPercentage,
+ "textSize", batteryLevelTextSizeStart, batteryLevelTextSizeEnd);
+ textSizeAnimatorTransmitting.setInterpolator(new PathInterpolator(0, 0, 0, 1));
+ textSizeAnimatorTransmitting.setDuration(context.getResources().getInteger(
+ R.integer.wireless_charging_battery_level_text_scale_animation_duration));
+
+ // Animation Opacity: transmitting battery percentage text transitions from 0 to 1 opacity
+ ValueAnimator textOpacityAnimatorTransmitting = ObjectAnimator.ofFloat(
+ transmittingPercentage, "alpha", 0, 1);
+ textOpacityAnimatorTransmitting.setInterpolator(Interpolators.LINEAR);
+ textOpacityAnimatorTransmitting.setDuration(context.getResources().getInteger(
+ R.integer.wireless_charging_battery_level_text_opacity_duration));
+ textOpacityAnimatorTransmitting.setStartDelay(
+ context.getResources().getInteger(R.integer.wireless_charging_anim_opacity_offset));
+
+ // Animation Opacity: transmitting battery percentage text fades from 1 to 0 opacity
+ ValueAnimator textFadeAnimatorTransmitting = ObjectAnimator.ofFloat(transmittingPercentage,
+ "alpha", 1, 0);
+ textFadeAnimatorTransmitting.setDuration(chargingAnimationFadeDuration);
+ textFadeAnimatorTransmitting.setInterpolator(Interpolators.LINEAR);
+ textFadeAnimatorTransmitting.setStartDelay(chargingAnimationFadeStartOffset);
+
+ // play all animations together
+ AnimatorSet animatorSetTransmitting = new AnimatorSet();
+ animatorSetTransmitting.playTogether(textSizeAnimatorTransmitting,
+ textOpacityAnimatorTransmitting, textFadeAnimatorTransmitting);
+
+ // transmitting battery icon
+ final ImageView chargingViewIcon = findViewById(R.id.reverse_wireless_charging_icon);
+ chargingViewIcon.setVisibility(VISIBLE);
+ final int padding = Math.round(
+ TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, batteryLevelTextSizeEnd,
+ getResources().getDisplayMetrics()));
+ chargingViewIcon.setPadding(padding, 0, padding, 0);
+
+ // Animation Opacity: transmitting battery icon transitions from 0 to 1 opacity
+ ValueAnimator textOpacityAnimatorIcon = ObjectAnimator.ofFloat(chargingViewIcon, "alpha", 0,
+ 1);
+ textOpacityAnimatorIcon.setInterpolator(Interpolators.LINEAR);
+ textOpacityAnimatorIcon.setDuration(context.getResources().getInteger(
+ R.integer.wireless_charging_battery_level_text_opacity_duration));
+ textOpacityAnimatorIcon.setStartDelay(
+ context.getResources().getInteger(R.integer.wireless_charging_anim_opacity_offset));
+
+ // Animation Opacity: transmitting battery icon fades from 1 to 0 opacity
+ ValueAnimator textFadeAnimatorIcon = ObjectAnimator.ofFloat(chargingViewIcon, "alpha", 1,
+ 0);
+ textFadeAnimatorIcon.setDuration(chargingAnimationFadeDuration);
+ textFadeAnimatorIcon.setInterpolator(Interpolators.LINEAR);
+ textFadeAnimatorIcon.setStartDelay(chargingAnimationFadeStartOffset);
+
+ // play all animations together
+ AnimatorSet animatorSetIcon = new AnimatorSet();
+ animatorSetIcon.playTogether(textOpacityAnimatorIcon, textFadeAnimatorIcon);
+
chargingAnimation.start();
animatorSet.start();
+ animatorSetTransmitting.start();
+ animatorSetIcon.start();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerProxy.java b/packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerProxy.java
index ef2ef4570fca..f35322bd2a77 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerProxy.java
@@ -22,7 +22,6 @@ import android.content.Context;
import android.hardware.SensorManager;
import android.net.Uri;
import android.provider.DeviceConfig;
-import android.util.DisplayMetrics;
import android.view.MotionEvent;
import androidx.annotation.NonNull;
@@ -62,7 +61,7 @@ public class FalsingManagerProxy implements FalsingManager, Dumpable {
private static final String PROXIMITY_SENSOR_TAG = "FalsingManager";
private final ProximitySensor mProximitySensor;
- private final DisplayMetrics mDisplayMetrics;
+ private final FalsingDataProvider mFalsingDataProvider;
private FalsingManager mInternalFalsingManager;
private DeviceConfig.OnPropertiesChangedListener mDeviceConfigListener;
private final DeviceConfigProxy mDeviceConfig;
@@ -74,20 +73,21 @@ public class FalsingManagerProxy implements FalsingManager, Dumpable {
@Inject
FalsingManagerProxy(Context context, PluginManager pluginManager, @Main Executor executor,
- DisplayMetrics displayMetrics, ProximitySensor proximitySensor,
+ ProximitySensor proximitySensor,
DeviceConfigProxy deviceConfig, DockManager dockManager,
KeyguardUpdateMonitor keyguardUpdateMonitor,
DumpManager dumpManager,
@UiBackground Executor uiBgExecutor,
- StatusBarStateController statusBarStateController) {
- mDisplayMetrics = displayMetrics;
+ StatusBarStateController statusBarStateController,
+ FalsingDataProvider falsingDataProvider) {
mProximitySensor = proximitySensor;
mDockManager = dockManager;
mKeyguardUpdateMonitor = keyguardUpdateMonitor;
mUiBgExecutor = uiBgExecutor;
mStatusBarStateController = statusBarStateController;
+ mFalsingDataProvider = falsingDataProvider;
mProximitySensor.setTag(PROXIMITY_SENSOR_TAG);
- mProximitySensor.setSensorDelay(SensorManager.SENSOR_DELAY_GAME);
+ mProximitySensor.setDelay(SensorManager.SENSOR_DELAY_GAME);
mDeviceConfig = deviceConfig;
mDeviceConfigListener =
properties -> onDeviceConfigPropertiesChanged(context, properties.getNamespace());
@@ -143,7 +143,7 @@ public class FalsingManagerProxy implements FalsingManager, Dumpable {
mInternalFalsingManager = new FalsingManagerImpl(context, mUiBgExecutor);
} else {
mInternalFalsingManager = new BrightLineFalsingManager(
- new FalsingDataProvider(mDisplayMetrics),
+ mFalsingDataProvider,
mKeyguardUpdateMonitor,
mProximitySensor,
mDeviceConfig,
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/brightline/BrightLineFalsingManager.java b/packages/SystemUI/src/com/android/systemui/classifier/brightline/BrightLineFalsingManager.java
index 62254a64dfcc..a50f9ce9713b 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/brightline/BrightLineFalsingManager.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/brightline/BrightLineFalsingManager.java
@@ -37,6 +37,7 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.util.DeviceConfigProxy;
import com.android.systemui.util.sensors.ProximitySensor;
+import com.android.systemui.util.sensors.ThresholdSensor;
import java.io.PrintWriter;
import java.util.ArrayDeque;
@@ -76,7 +77,7 @@ public class BrightLineFalsingManager implements FalsingManager {
private final List<FalsingClassifier> mClassifiers;
- private ProximitySensor.ProximitySensorListener mSensorEventListener = this::onProximityEvent;
+ private ThresholdSensor.Listener mSensorEventListener = this::onProximityEvent;
private final KeyguardUpdateMonitorCallback mKeyguardUpdateCallback =
new KeyguardUpdateMonitorCallback() {
@@ -131,7 +132,9 @@ public class BrightLineFalsingManager implements FalsingManager {
}
private void registerSensors() {
- mProximitySensor.register(mSensorEventListener);
+ if (!mDataProvider.isWirelessCharging()) {
+ mProximitySensor.register(mSensorEventListener);
+ }
}
private void unregisterSensors() {
@@ -240,7 +243,7 @@ public class BrightLineFalsingManager implements FalsingManager {
mClassifiers.forEach((classifier) -> classifier.onTouchEvent(motionEvent));
}
- private void onProximityEvent(ProximitySensor.ProximityEvent proximityEvent) {
+ private void onProximityEvent(ThresholdSensor.ThresholdSensorEvent proximityEvent) {
// TODO: some of these classifiers might allow us to abort early, meaning we don't have to
// make these calls.
mClassifiers.forEach((classifier) -> classifier.onProximityEvent(proximityEvent));
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingClassifier.java
index cf088213644e..85e95a66bfe3 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingClassifier.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingClassifier.java
@@ -96,7 +96,7 @@ abstract class FalsingClassifier {
/**
* Called when a ProximityEvent occurs (change in near/far).
*/
- void onProximityEvent(ProximitySensor.ProximityEvent proximityEvent) {};
+ void onProximityEvent(ProximitySensor.ThresholdSensorEvent proximityEvent) {};
/**
* The phone screen has turned on and we need to begin falsing detection.
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingDataProvider.java b/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingDataProvider.java
index 5494c644c22c..ea46441c8fbe 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingDataProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/brightline/FalsingDataProvider.java
@@ -22,10 +22,13 @@ import android.view.MotionEvent.PointerCoords;
import android.view.MotionEvent.PointerProperties;
import com.android.systemui.classifier.Classifier;
+import com.android.systemui.statusbar.policy.BatteryController;
import java.util.ArrayList;
import java.util.List;
+import javax.inject.Inject;
+
/**
* Acts as a cache and utility class for FalsingClassifiers.
*/
@@ -36,6 +39,7 @@ public class FalsingDataProvider {
private final int mWidthPixels;
private final int mHeightPixels;
+ private final BatteryController mBatteryController;
private final float mXdpi;
private final float mYdpi;
@@ -50,11 +54,13 @@ public class FalsingDataProvider {
private MotionEvent mFirstRecentMotionEvent;
private MotionEvent mLastMotionEvent;
- public FalsingDataProvider(DisplayMetrics displayMetrics) {
+ @Inject
+ public FalsingDataProvider(DisplayMetrics displayMetrics, BatteryController batteryController) {
mXdpi = displayMetrics.xdpi;
mYdpi = displayMetrics.ydpi;
mWidthPixels = displayMetrics.widthPixels;
mHeightPixels = displayMetrics.heightPixels;
+ mBatteryController = batteryController;
FalsingClassifier.logInfo("xdpi, ydpi: " + getXdpi() + ", " + getYdpi());
FalsingClassifier.logInfo("width, height: " + getWidthPixels() + ", " + getHeightPixels());
@@ -177,6 +183,11 @@ public class FalsingDataProvider {
return mLastMotionEvent.getY() < mFirstRecentMotionEvent.getY();
}
+ /** Returns true if phone is being charged without a cable. */
+ boolean isWirelessCharging() {
+ return mBatteryController.isWirelessCharging();
+ }
+
private void recalculateData() {
if (!mDirty) {
return;
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/brightline/ProximityClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/brightline/ProximityClassifier.java
index 749914e1b625..b128678af5db 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/brightline/ProximityClassifier.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/brightline/ProximityClassifier.java
@@ -101,8 +101,8 @@ class ProximityClassifier extends FalsingClassifier {
@Override
public void onProximityEvent(
- ProximitySensor.ProximityEvent proximityEvent) {
- boolean near = proximityEvent.getNear();
+ ProximitySensor.ThresholdSensorEvent proximityEvent) {
+ boolean near = proximityEvent.getBelow();
long timestampNs = proximityEvent.getTimestampNs();
logDebug("Sensor is: " + near + " at time " + timestampNs);
update(near, timestampNs);
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java
index 5697fc0d577f..f683a639af10 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemServicesModule.java
@@ -37,6 +37,7 @@ import android.content.pm.LauncherApps;
import android.content.pm.PackageManager;
import android.content.pm.ShortcutManager;
import android.content.res.Resources;
+import android.hardware.SensorManager;
import android.hardware.SensorPrivacyManager;
import android.hardware.display.DisplayManager;
import android.media.AudioManager;
@@ -254,6 +255,12 @@ public class SystemServicesModule {
return context.getResources();
}
+ @Provides
+ @Singleton
+ static SensorManager providesSensorManager(Context context) {
+ return context.getSystemService(SensorManager.class);
+ }
+
@Singleton
@Provides
static SensorPrivacyManager provideSensorPrivacyManager(Context context) {
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java
index 3bb953ab9da3..aeba64a59a7a 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIDefaultModule.java
@@ -36,6 +36,7 @@ import com.android.systemui.plugins.qs.QSFactory;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.power.EnhancedEstimates;
import com.android.systemui.power.EnhancedEstimatesImpl;
+import com.android.systemui.qs.dagger.QSModule;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsImplementation;
@@ -70,7 +71,7 @@ import dagger.Provides;
* A dagger module for injecting default implementations of components of System UI that may be
* overridden by the System UI implementation.
*/
-@Module(includes = {DividerModule.class})
+@Module(includes = {DividerModule.class, QSModule.class})
public abstract class SystemUIDefaultModule {
@Singleton
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 90cd13fd1330..cb45926d3f24 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -43,6 +43,7 @@ import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.util.concurrency.ConcurrencyModule;
import com.android.systemui.util.sensors.AsyncSensorManager;
+import com.android.systemui.util.sensors.SensorModule;
import com.android.systemui.util.time.SystemClock;
import com.android.systemui.util.time.SystemClockImpl;
@@ -62,7 +63,8 @@ import dagger.Provides;
ConcurrencyModule.class,
LogModule.class,
PeopleHubModule.class,
- SettingsModule.class
+ SensorModule.class,
+ SettingsModule.class,
},
subcomponents = {StatusBarComponent.class,
NotificationRowComponent.class,
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java b/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
index 490890f263aa..ae7d82ac4a5e 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeMachine.java
@@ -199,6 +199,12 @@ public class DozeMachine {
requestState(State.DOZE_REQUEST_PULSE, pulseReason);
}
+ void onScreenState(int state) {
+ for (Part part : mParts) {
+ part.onScreenState(state);
+ }
+ }
+
private void requestState(State requestedState, int pulseReason) {
Assert.isMainThread();
if (DEBUG) {
@@ -423,6 +429,9 @@ public class DozeMachine {
/** Give the Part a chance to clean itself up. */
default void destroy() {}
+
+ /** Alerts that the screenstate is being changed. */
+ default void onScreenState(int state) {}
}
/** A wrapper interface for {@link android.service.dreams.DreamService} */
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
index f6fccc00bf99..64cfb4bcd058 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
@@ -29,6 +29,7 @@ import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.provider.Settings;
+import android.view.Display;
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.broadcast.BroadcastDispatcher;
@@ -68,6 +69,7 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi
* --ei brightness_bucket 1}
*/
private int mDebugBrightnessBucket = -1;
+ private DozeMachine.State mState;
@VisibleForTesting
public DozeScreenBrightness(Context context, DozeMachine.Service service,
@@ -107,17 +109,10 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi
@Override
public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) {
+ mState = newState;
switch (newState) {
case INITIALIZED:
- resetBrightnessToDefault();
- break;
- case DOZE_AOD:
- case DOZE_REQUEST_PULSE:
- case DOZE_AOD_DOCKED:
- setLightSensorEnabled(true);
- break;
case DOZE:
- setLightSensorEnabled(false);
resetBrightnessToDefault();
break;
case FINISH:
@@ -130,6 +125,18 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi
}
}
+ @Override
+ public void onScreenState(int state) {
+ if (!mScreenOff
+ && (mState == DozeMachine.State.DOZE_AOD
+ || mState == DozeMachine.State.DOZE_AOD_DOCKED)
+ && (state == Display.STATE_DOZE || state == Display.STATE_DOZE_SUSPEND)) {
+ setLightSensorEnabled(true);
+ } else {
+ setLightSensorEnabled(false);
+ }
+ }
+
private void onDestroy() {
setLightSensorEnabled(false);
if (mDebuggable) {
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
index 78f8f673cab9..aebf41b884c4 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
@@ -37,6 +37,7 @@ import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
+import android.view.Display;
import androidx.annotation.VisibleForTesting;
@@ -66,7 +67,6 @@ public class DozeSensors {
private final AlarmManager mAlarmManager;
private final AsyncSensorManager mSensorManager;
private final ContentResolver mResolver;
- private final TriggerSensor mPickupSensor;
private final DozeParameters mDozeParameters;
private final AmbientDisplayConfiguration mConfig;
private final WakeLock mWakeLock;
@@ -80,7 +80,6 @@ public class DozeSensors {
private long mDebounceFrom;
private boolean mSettingRegistered;
private boolean mListening;
- private boolean mPaused;
@VisibleForTesting
public enum DozeSensorsUiEvent implements UiEventLogger.UiEventEnum {
@@ -122,7 +121,7 @@ public class DozeSensors {
dozeParameters.getPulseOnSigMotion(),
DozeLog.PULSE_REASON_SENSOR_SIGMOTION, false /* touchCoords */,
false /* touchscreen */, dozeLog),
- mPickupSensor = new TriggerSensor(
+ new TriggerSensor(
mSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE),
Settings.Secure.DOZE_PICK_UP_GESTURE,
true /* settingDef */,
@@ -179,7 +178,7 @@ public class DozeSensors {
mProximitySensor.register(
proximityEvent -> {
if (proximityEvent != null) {
- mProxCallback.accept(!proximityEvent.getNear());
+ mProxCallback.accept(!proximityEvent.getBelow());
}
});
}
@@ -232,18 +231,6 @@ public class DozeSensors {
}
/**
- * Unregister sensors, when listening, unless they are prox gated.
- * @see #setListening(boolean)
- */
- public void setPaused(boolean paused) {
- if (mPaused == paused) {
- return;
- }
- mPaused = paused;
- updateListening();
- }
-
- /**
* Registers/unregisters sensors based on internal state.
*/
public void updateListening() {
@@ -280,6 +267,13 @@ public class DozeSensors {
}
}
+ void onScreenState(int state) {
+ mProximitySensor.setSecondarySafe(
+ state == Display.STATE_DOZE
+ || state == Display.STATE_DOZE_SUSPEND
+ || state == Display.STATE_OFF);
+ }
+
public void setProxListening(boolean listen) {
if (mProximitySensor.isRegistered() && listen) {
mProximitySensor.alertListeners();
@@ -304,10 +298,6 @@ public class DozeSensors {
}
};
- public void setDisableSensorsInterferingWithProximity(boolean disable) {
- mPickupSensor.setDisabled(disable);
- }
-
/** Ignore the setting value of only the sensors that require the touchscreen. */
public void ignoreTouchScreenSensorsSettingInterferingWithDocking(boolean ignore) {
for (TriggerSensor sensor : mSensors) {
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
index 529b016aaca6..d2bebb7b27d1 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
@@ -130,4 +130,10 @@ public class DozeService extends DreamService
mDozeMachine.requestState(DozeMachine.State.DOZE);
}
}
+
+ @Override
+ public void setDozeScreenState(int state) {
+ super.setDozeScreenState(state);
+ mDozeMachine.onScreenState(state);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
index 82639ba4375e..cbf8f578744c 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
@@ -30,6 +30,7 @@ import android.os.SystemClock;
import android.os.UserHandle;
import android.text.format.Formatter;
import android.util.Log;
+import android.view.Display;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
@@ -92,6 +93,9 @@ public class DozeTriggers implements DozeMachine.Part {
private boolean mPulsePending;
private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class);
+ private boolean mWantProx;
+ private boolean mWantSensors;
+ private boolean mWantTouchScreenSensors;
@VisibleForTesting
public enum DozingUpdateUiEvent implements UiEventLogger.UiEventEnum {
@@ -382,24 +386,25 @@ public class DozeTriggers implements DozeMachine.Part {
break;
case DOZE:
case DOZE_AOD:
- mDozeSensors.setProxListening(newState != DozeMachine.State.DOZE);
- mDozeSensors.setListening(true);
- mDozeSensors.setPaused(false);
+ mWantProx = newState != DozeMachine.State.DOZE;
+ mWantSensors = true;
+ mWantTouchScreenSensors = true;
if (newState == DozeMachine.State.DOZE_AOD && !sWakeDisplaySensorState) {
onWakeScreen(false, newState);
}
break;
case DOZE_AOD_PAUSED:
case DOZE_AOD_PAUSING:
- mDozeSensors.setProxListening(true);
- mDozeSensors.setPaused(true);
+ mWantProx = true;
break;
case DOZE_PULSING:
case DOZE_PULSING_BRIGHT:
+ mWantProx = true;
+ mWantTouchScreenSensors = false;
+ break;
case DOZE_AOD_DOCKED:
- mDozeSensors.setTouchscreenSensorsListening(false);
- mDozeSensors.setProxListening(true);
- mDozeSensors.setPaused(false);
+ mWantProx = false;
+ mWantTouchScreenSensors = false;
break;
case DOZE_PULSE_DONE:
mDozeSensors.requestTemporaryDisable();
@@ -413,11 +418,28 @@ public class DozeTriggers implements DozeMachine.Part {
mDockManager.removeListener(mDockEventListener);
mDozeSensors.setListening(false);
mDozeSensors.setProxListening(false);
+ mWantSensors = false;
+ mWantProx = false;
+ mWantTouchScreenSensors = false;
break;
default:
}
}
+ @Override
+ public void onScreenState(int state) {
+ mDozeSensors.onScreenState(state);
+ if (state == Display.STATE_DOZE || state == Display.STATE_DOZE_SUSPEND
+ || state == Display.STATE_OFF) {
+ mDozeSensors.setProxListening(mWantProx);
+ mDozeSensors.setListening(mWantSensors);
+ mDozeSensors.setTouchscreenSensorsListening(mWantTouchScreenSensors);
+ } else {
+ mDozeSensors.setProxListening(false);
+ mDozeSensors.setListening(mWantSensors);
+ }
+ }
+
private void checkTriggersAtInit() {
if (mUiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_CAR
|| mDozeHost.isBlockingDoze()
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index b2e91643bed2..ef51abb1404d 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -2129,7 +2129,6 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
private boolean mShowing;
private float mScrimAlpha;
private ResetOrientationData mResetOrientationData;
- private boolean mHadTopUi;
private final NotificationShadeWindowController mNotificationShadeWindowController;
private final NotificationShadeDepthController mDepthController;
private final SysUiState mSysUiState;
@@ -2397,8 +2396,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
public void show() {
super.show();
mShowing = true;
- mHadTopUi = mNotificationShadeWindowController.getForceHasTopUi();
- mNotificationShadeWindowController.setForceHasTopUi(true);
+ mNotificationShadeWindowController.setRequestTopUi(true, TAG);
mSysUiState.setFlag(SYSUI_STATE_GLOBAL_ACTIONS_SHOWING, true)
.commitUpdate(mContext.getDisplayId());
@@ -2499,7 +2497,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
dismissOverflow(true);
dismissPowerOptions(true);
if (mControlsUiController != null) mControlsUiController.hide();
- mNotificationShadeWindowController.setForceHasTopUi(mHadTopUi);
+ mNotificationShadeWindowController.setRequestTopUi(false, TAG);
mDepthController.updateGlobalDialogVisibility(0, null /* view */);
mSysUiState.setFlag(SYSUI_STATE_GLOBAL_ACTIONS_SHOWING, false)
.commitUpdate(mContext.getDisplayId());
diff --git a/packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java b/packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java
index 0a84f5ee1bb9..38b20ee45946 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/AutoAddTracker.java
@@ -57,12 +57,18 @@ public class AutoAddTracker implements UserAwareController {
mContext = context;
mUserId = userId;
mAutoAdded = new ArraySet<>(getAdded());
+ }
+
+ /**
+ * Init method must be called after construction to start listening
+ */
+ public void initialize() {
// TODO: remove migration code and shared preferences keys after P release
if (mUserId == UserHandle.USER_SYSTEM) {
for (String[] convertPref : CONVERT_PREFS) {
- if (Prefs.getBoolean(context, convertPref[0], false)) {
+ if (Prefs.getBoolean(mContext, convertPref[0], false)) {
setTileAdded(convertPref[1]);
- Prefs.remove(context, convertPref[0]);
+ Prefs.remove(mContext, convertPref[0]);
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/dagger/QSModule.java b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSModule.java
new file mode 100644
index 000000000000..8740581240b5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/dagger/QSModule.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2020 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.qs.dagger;
+
+import android.content.Context;
+import android.hardware.display.NightDisplayListener;
+import android.os.Handler;
+
+import com.android.systemui.dagger.qualifiers.Background;
+import com.android.systemui.qs.AutoAddTracker;
+import com.android.systemui.qs.QSTileHost;
+import com.android.systemui.statusbar.phone.AutoTileManager;
+import com.android.systemui.statusbar.phone.ManagedProfileController;
+import com.android.systemui.statusbar.policy.CastController;
+import com.android.systemui.statusbar.policy.DataSaverController;
+import com.android.systemui.statusbar.policy.HotspotController;
+
+import dagger.Module;
+import dagger.Provides;
+
+/**
+ * Module for QS dependencies
+ */
+// TODO: Add other QS classes
+@Module
+public interface QSModule {
+
+ @Provides
+ static AutoTileManager provideAutoTileManager(
+ Context context,
+ AutoAddTracker.Builder autoAddTrackerBuilder,
+ QSTileHost host,
+ @Background Handler handler,
+ HotspotController hotspotController,
+ DataSaverController dataSaverController,
+ ManagedProfileController managedProfileController,
+ NightDisplayListener nightDisplayListener,
+ CastController castController) {
+ AutoTileManager manager = new AutoTileManager(context, autoAddTrackerBuilder,
+ host, handler, hotspotController, dataSaverController, managedProfileController,
+ nightDisplayListener, castController);
+ manager.init();
+ return manager;
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java
index fbcd6ba0ff47..42dde4064a97 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java
@@ -205,7 +205,8 @@ public class ScreenshotNotificationsController {
mPublicNotificationBuilder
.setContentTitle(mResources.getString(R.string.screenshot_saved_title))
.setContentText(mResources.getString(R.string.screenshot_saved_text))
- .setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0))
+ .setContentIntent(PendingIntent
+ .getActivity(mContext, 0, launchIntent, PendingIntent.FLAG_IMMUTABLE))
.setWhen(now)
.setAutoCancel(true)
.setColor(mContext.getColor(
@@ -213,7 +214,8 @@ public class ScreenshotNotificationsController {
mNotificationBuilder
.setContentTitle(mResources.getString(R.string.screenshot_saved_title))
.setContentText(mResources.getString(R.string.screenshot_saved_text))
- .setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0))
+ .setContentIntent(PendingIntent
+ .getActivity(mContext, 0, launchIntent, PendingIntent.FLAG_IMMUTABLE))
.setWhen(now)
.setAutoCancel(true)
.setColor(mContext.getColor(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
index 9abc66056452..d04389d6cbe8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
@@ -36,6 +36,7 @@ import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.statusbar.NotificationVisibility;
import com.android.systemui.Dumpable;
+import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.NotificationLifetimeExtender;
import com.android.systemui.statusbar.NotificationListener;
@@ -189,6 +190,8 @@ public class NotificationEntryManager implements
}
}
+ private final Lazy<BubbleController> mBubbleControllerLazy;
+
/**
* Injected constructor. See {@link NotificationsModule}.
*/
@@ -201,6 +204,7 @@ public class NotificationEntryManager implements
Lazy<NotificationRowBinder> notificationRowBinderLazy,
Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy,
LeakDetector leakDetector,
+ Lazy<BubbleController> bubbleController,
ForegroundServiceDismissalFeatureController fgsFeatureController) {
mLogger = logger;
mGroupManager = groupManager;
@@ -211,6 +215,7 @@ public class NotificationEntryManager implements
mRemoteInputManagerLazy = notificationRemoteInputManagerLazy;
mLeakDetector = leakDetector;
mFgsFeatureController = fgsFeatureController;
+ mBubbleControllerLazy = bubbleController;
}
/** Once called, the NEM will start processing notification events from system server. */
@@ -920,8 +925,20 @@ public class NotificationEntryManager implements
/**
* @return {@code true} if there is at least one notification that should be visible right now
*/
- public boolean hasActiveNotifications() {
- return mReadOnlyNotifications.size() != 0;
+ public boolean hasVisibleNotifications() {
+ if (mReadOnlyNotifications.size() == 0) {
+ return false;
+ }
+
+ // Filter out suppressed notifications, which are active notifications backing a bubble
+ // but are not present in the shade
+ for (NotificationEntry e : mSortedAndFiltered) {
+ if (!mBubbleControllerLazy.get().isBubbleNotificationSuppressedFromShade(e)) {
+ return true;
+ }
+ }
+
+ return false;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
index df1de63b65a0..c37e93d4fcc5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
@@ -87,6 +87,7 @@ public interface NotificationsModule {
Lazy<NotificationRowBinder> notificationRowBinderLazy,
Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy,
LeakDetector leakDetector,
+ Lazy<BubbleController> bubbleController,
ForegroundServiceDismissalFeatureController fgsFeatureController) {
return new NotificationEntryManager(
logger,
@@ -97,6 +98,7 @@ public interface NotificationsModule {
notificationRowBinderLazy,
notificationRemoteInputManagerLazy,
leakDetector,
+ bubbleController,
fgsFeatureController);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index b9d31a93f408..a4a58194a46b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -6580,7 +6580,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
if (mFeatureFlags.isNewNotifPipelineRenderingEnabled()) {
return !mNotifPipeline.getShadeList().isEmpty();
} else {
- return mEntryManager.hasActiveNotifications();
+ return mEntryManager.hasVisibleNotifications();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
index 825919f17661..db9956a4074f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
@@ -40,8 +40,6 @@ import com.android.systemui.util.UserAwareController;
import java.util.ArrayList;
import java.util.Objects;
-import javax.inject.Inject;
-
/**
* Manages which tiles should be automatically added to QS.
*/
@@ -57,6 +55,7 @@ public class AutoTileManager implements UserAwareController {
static final String SETTING_SEPARATOR = ":";
private UserHandle mCurrentUser;
+ private boolean mInitialized;
private final Context mContext;
private final QSTileHost mHost;
@@ -69,7 +68,6 @@ public class AutoTileManager implements UserAwareController {
private final CastController mCastController;
private final ArrayList<AutoAddSetting> mAutoAddSettingList = new ArrayList<>();
- @Inject
public AutoTileManager(Context context, AutoAddTracker.Builder autoAddTrackerBuilder,
QSTileHost host,
@Background Handler handler,
@@ -88,9 +86,20 @@ public class AutoTileManager implements UserAwareController {
mManagedProfileController = managedProfileController;
mNightDisplayListener = nightDisplayListener;
mCastController = castController;
+ }
+ /**
+ * Init method must be called after construction to start listening
+ */
+ public void init() {
+ if (mInitialized) {
+ Log.w(TAG, "Trying to re-initialize");
+ return;
+ }
+ mAutoTracker.initialize();
populateSettingsList();
startControllersAndSettingsListeners();
+ mInitialized = true;
}
protected void startControllersAndSettingsListeners() {
@@ -168,8 +177,14 @@ public class AutoTileManager implements UserAwareController {
}
}
+ /*
+ * This will be sent off the main thread if needed
+ */
@Override
public void changeUser(UserHandle newUser) {
+ if (!mInitialized) {
+ throw new IllegalStateException("AutoTileManager not initialized");
+ }
if (!Thread.currentThread().equals(mHandler.getLooper().getThread())) {
mHandler.post(() -> changeUser(newUser));
return;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 303a0831b52f..0e76c904f8cd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -152,6 +152,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
private final Context mContext;
private final int mWakeUpDelay;
private int mMode;
+ private BiometricSourceType mBiometricType;
private KeyguardViewController mKeyguardViewController;
private DozeScrimController mDozeScrimController;
private KeyguardViewMediator mKeyguardViewMediator;
@@ -340,6 +341,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
Trace.endSection();
return;
}
+ mBiometricType = biometricSourceType;
mMetricsLogger.write(new LogMaker(MetricsEvent.BIOMETRIC_AUTH)
.setType(MetricsEvent.TYPE_SUCCESS).setSubtype(toSubtype(biometricSourceType)));
Optional.ofNullable(BiometricUiEvent.SUCCESS_EVENT_BY_SOURCE_TYPE.get(biometricSourceType))
@@ -615,6 +617,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
private void resetMode() {
mMode = MODE_NONE;
+ mBiometricType = null;
mNotificationShadeWindowController.setForceDozeBrightness(false);
if (mStatusBar.getNavigationBarView() != null) {
mStatusBar.getNavigationBarView().setWakeAndUnlocking(false);
@@ -680,8 +683,8 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
/**
* Successful authentication with fingerprint, face, or iris when the lockscreen fades away
*/
- public boolean isUnlockFading() {
- return mMode == MODE_UNLOCK_FADING;
+ public BiometricSourceType getBiometricType() {
+ return mBiometricType;
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightsOutNotifController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightsOutNotifController.java
index 8e192c5bf17d..c758670fc457 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightsOutNotifController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LightsOutNotifController.java
@@ -97,7 +97,7 @@ public class LightsOutNotifController {
}
private boolean hasActiveNotifications() {
- return mEntryManager.hasActiveNotifications();
+ return mEntryManager.hasVisibleNotifications();
}
@VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenLockIconController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenLockIconController.java
index 5d3910b4c415..7a8dc32741bf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenLockIconController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenLockIconController.java
@@ -83,6 +83,7 @@ public class LockscreenLockIconController {
private boolean mWakeAndUnlockRunning;
private boolean mShowingLaunchAffordance;
private boolean mBouncerShowingScrimmed;
+ private boolean mFingerprintUnlock;
private int mStatusBarState = StatusBarState.SHADE;
private LockIcon mLockIcon;
@@ -389,14 +390,19 @@ public class LockscreenLockIconController {
/**
* We need to hide the lock whenever there's a fingerprint unlock, otherwise you'll see the
* icon on top of the black front scrim.
+ * We also want to halt padlock the animation when we're in face bypass mode or dismissing the
+ * keyguard with fingerprint.
* @param wakeAndUnlock are we wake and unlocking
* @param isUnlock are we currently unlocking
*/
- public void onBiometricAuthModeChanged(boolean wakeAndUnlock, boolean isUnlock) {
+ public void onBiometricAuthModeChanged(boolean wakeAndUnlock, boolean isUnlock,
+ BiometricSourceType type) {
if (wakeAndUnlock) {
mWakeAndUnlockRunning = true;
}
- if (isUnlock && mKeyguardBypassController.getBypassEnabled() && canBlockUpdates()) {
+ mFingerprintUnlock = type == BiometricSourceType.FINGERPRINT;
+ if (isUnlock && (mFingerprintUnlock || mKeyguardBypassController.getBypassEnabled())
+ && canBlockUpdates()) {
// We don't want the icon to change while we are unlocking
mBlockUpdates = true;
}
@@ -513,10 +519,13 @@ public class LockscreenLockIconController {
&& (!mStatusBarStateController.isPulsing() || mDocked);
boolean invisible = onAodNotPulsingOrDocked || mWakeAndUnlockRunning
|| mShowingLaunchAffordance;
- if (mKeyguardBypassController.getBypassEnabled() && !mBouncerShowingScrimmed) {
+ boolean fingerprintOrBypass = mFingerprintUnlock
+ || mKeyguardBypassController.getBypassEnabled();
+ if (fingerprintOrBypass && !mBouncerShowingScrimmed) {
if ((mHeadsUpManagerPhone.isHeadsUpGoingAway()
|| mHeadsUpManagerPhone.hasPinnedHeadsUp()
- || mStatusBarState == StatusBarState.KEYGUARD)
+ || mStatusBarState == StatusBarState.KEYGUARD
+ || mStatusBarState == StatusBarState.SHADE)
&& !mNotificationWakeUpCoordinator.getNotificationsFullyHidden()) {
invisible = true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
index 375af6b099c2..64202d221b2d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
@@ -3003,7 +3003,7 @@ public class NotificationPanelViewController extends PanelViewController {
private void updateShowEmptyShadeView() {
boolean
showEmptyShadeView =
- mBarState != StatusBarState.KEYGUARD && !mEntryManager.hasActiveNotifications();
+ mBarState != StatusBarState.KEYGUARD && !mEntryManager.hasVisibleNotifications();
showEmptyShadeView(showEmptyShadeView);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java
index 5164440c1463..bc73be19ab59 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java
@@ -61,6 +61,8 @@ import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
import java.util.function.Consumer;
import javax.inject.Inject;
@@ -432,7 +434,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable,
}
private void applyHasTopUi(State state) {
- mHasTopUiChanged = state.mForceHasTopUi || isExpanded(state);
+ mHasTopUiChanged = !state.mComponentsForcingTopUi.isEmpty() || isExpanded(state);
}
private void applyNotTouchable(State state) {
@@ -635,12 +637,17 @@ public class NotificationShadeWindowController implements Callback, Dumpable,
apply(mCurrentState);
}
- public boolean getForceHasTopUi() {
- return mCurrentState.mForceHasTopUi;
- }
-
- public void setForceHasTopUi(boolean forceHasTopUi) {
- mCurrentState.mForceHasTopUi = forceHasTopUi;
+ /**
+ * SystemUI may need top-ui to avoid jank when performing animations. After the
+ * animation is performed, the component should remove itself from the list of features that
+ * are forcing SystemUI to be top-ui.
+ */
+ public void setRequestTopUi(boolean requestTopUi, String componentTag) {
+ if (requestTopUi) {
+ mCurrentState.mComponentsForcingTopUi.add(componentTag);
+ } else {
+ mCurrentState.mComponentsForcingTopUi.remove(componentTag);
+ }
apply(mCurrentState);
}
@@ -663,7 +670,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable,
boolean mBackdropShowing;
boolean mWallpaperSupportsAmbientMode;
boolean mNotTouchable;
- boolean mForceHasTopUi;
+ Set<String> mComponentsForcingTopUi = new HashSet<>();
/**
* The {@link StatusBar} state from the status bar.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index 60fc17d9474a..686b87127239 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -348,10 +348,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
}
if (mKeyguardUpdateMonitor.needsSlowUnlockTransition() && mState == ScrimState.UNLOCKED) {
- // In case the user isn't unlocked, make sure to delay a bit because the system is hosed
- // with too many things at this case, in order to not skip the initial frames.
- mScrimInFront.postOnAnimationDelayed(this::scheduleUpdate, 16);
mAnimationDelay = StatusBar.FADE_KEYGUARD_START_DELAY;
+ scheduleUpdate();
} else if ((!mDozeParameters.getAlwaysOn() && oldState == ScrimState.AOD)
|| (mState == ScrimState.AOD && !mDozeParameters.getDisplayNeedsBlanking())) {
// Scheduling a frame isn't enough when:
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index a5cc1a83fc85..f125b7d10035 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -29,7 +29,10 @@ import static android.view.InsetsState.containsType;
import static android.view.WindowInsetsController.APPEARANCE_LOW_PROFILE_BARS;
import static android.view.WindowInsetsController.APPEARANCE_OPAQUE_STATUS_BARS;
+import static androidx.lifecycle.Lifecycle.State.RESUMED;
+
import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME;
+import static com.android.systemui.charging.WirelessChargingLayout.UNKNOWN_BATTERY_LEVEL;
import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_ASLEEP;
import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_AWAKE;
import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_WAKING;
@@ -45,6 +48,7 @@ import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARE
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_WARNING;
import static com.android.systemui.statusbar.phone.BarTransitions.TransitionMode;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.ActivityOptions;
@@ -114,6 +118,10 @@ import android.view.WindowManagerGlobal;
import android.view.accessibility.AccessibilityManager;
import android.widget.DateTimeView;
+import androidx.lifecycle.Lifecycle;
+import androidx.lifecycle.LifecycleOwner;
+import androidx.lifecycle.LifecycleRegistry;
+
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.colorextraction.ColorExtractor;
import com.android.internal.logging.MetricsLogger;
@@ -205,7 +213,6 @@ import com.android.systemui.statusbar.notification.stack.NotificationListContain
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneModule;
import com.android.systemui.statusbar.policy.BatteryController;
-import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener;
@@ -237,7 +244,8 @@ public class StatusBar extends SystemUI implements DemoMode,
ActivityStarter, KeyguardStateController.Callback,
OnHeadsUpChangedListener, CommandQueue.Callbacks,
ColorExtractor.OnColorsChangedListener, ConfigurationListener,
- StatusBarStateController.StateListener, ActivityLaunchAnimator.Callback {
+ StatusBarStateController.StateListener, ActivityLaunchAnimator.Callback,
+ LifecycleOwner, BatteryController.BatteryStateChangeCallback {
public static final boolean MULTIUSER_DEBUG = false;
protected static final int MSG_HIDE_RECENT_APPS = 1020;
@@ -586,7 +594,8 @@ public class StatusBar extends SystemUI implements DemoMode,
private KeyguardUserSwitcher mKeyguardUserSwitcher;
private final UserSwitcherController mUserSwitcherController;
private final NetworkController mNetworkController;
- private final BatteryController mBatteryController;
+ private final LifecycleRegistry mLifecycle = new LifecycleRegistry(this);
+ protected final BatteryController mBatteryController;
protected boolean mPanelExpanded;
private UiModeManager mUiModeManager;
protected boolean mIsKeyguard;
@@ -935,6 +944,9 @@ public class StatusBar extends SystemUI implements DemoMode,
mConfigurationController.addCallback(this);
+ mBatteryController.observe(mLifecycle, this);
+ mLifecycle.setCurrentState(RESUMED);
+
// set the initial view visibility
int disabledFlags1 = result.mDisabledFlags1;
int disabledFlags2 = result.mDisabledFlags2;
@@ -1101,22 +1113,6 @@ public class StatusBar extends SystemUI implements DemoMode,
mAmbientIndicationContainer = mNotificationShadeWindowView.findViewById(
R.id.ambient_indication_container);
- // TODO: Find better place for this callback.
- mBatteryController.addCallback(new BatteryStateChangeCallback() {
- @Override
- public void onPowerSaveChanged(boolean isPowerSave) {
- mHandler.post(mCheckBarModes);
- if (mDozeServiceHost != null) {
- mDozeServiceHost.firePowerSaveChanged(isPowerSave);
- }
- }
-
- @Override
- public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
- // noop
- }
- });
-
mAutoHideController.setStatusBar(new AutoHideUiElement() {
@Override
public void synchronizeState() {
@@ -1267,6 +1263,25 @@ public class StatusBar extends SystemUI implements DemoMode,
ThreadedRenderer.overrideProperty("ambientRatio", String.valueOf(1.5f));
}
+ @NonNull
+ @Override
+ public Lifecycle getLifecycle() {
+ return mLifecycle;
+ }
+
+ @Override
+ public void onPowerSaveChanged(boolean isPowerSave) {
+ mHandler.post(mCheckBarModes);
+ if (mDozeServiceHost != null) {
+ mDozeServiceHost.firePowerSaveChanged(isPowerSave);
+ }
+ }
+
+ @Override
+ public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
+ // noop
+ }
+
@VisibleForTesting
protected void registerBroadcastReceiver() {
IntentFilter filter = new IntentFilter();
@@ -2369,24 +2384,43 @@ public class StatusBar extends SystemUI implements DemoMode,
@Override
public void showWirelessChargingAnimation(int batteryLevel) {
+ showChargingAnimation(batteryLevel, UNKNOWN_BATTERY_LEVEL, 0);
+ }
+
+ protected void showChargingAnimation(int batteryLevel, int transmittingBatteryLevel,
+ long animationDelay) {
if (mDozing || mKeyguardManager.isKeyguardLocked()) {
// on ambient or lockscreen, hide notification panel
WirelessChargingAnimation.makeWirelessChargingAnimation(mContext, null,
- batteryLevel, new WirelessChargingAnimation.Callback() {
+ transmittingBatteryLevel, batteryLevel,
+ new WirelessChargingAnimation.Callback() {
@Override
public void onAnimationStarting() {
+ mNotificationShadeWindowController.setRequestTopUi(true, TAG);
CrossFadeHelper.fadeOut(mNotificationPanelViewController.getView(), 1);
}
@Override
public void onAnimationEnded() {
CrossFadeHelper.fadeIn(mNotificationPanelViewController.getView());
+ mNotificationShadeWindowController.setRequestTopUi(false, TAG);
}
- }, mDozing).show();
+ }, mDozing).show(animationDelay);
} else {
// workspace
WirelessChargingAnimation.makeWirelessChargingAnimation(mContext, null,
- batteryLevel, null, false).show();
+ transmittingBatteryLevel, batteryLevel,
+ new WirelessChargingAnimation.Callback() {
+ @Override
+ public void onAnimationStarting() {
+ mNotificationShadeWindowController.setRequestTopUi(true, TAG);
+ }
+
+ @Override
+ public void onAnimationEnded() {
+ mNotificationShadeWindowController.setRequestTopUi(false, TAG);
+ }
+ }, false).show(animationDelay);
}
}
@@ -3947,7 +3981,8 @@ public class StatusBar extends SystemUI implements DemoMode,
updateScrimController();
mLockscreenLockIconController.onBiometricAuthModeChanged(
mBiometricUnlockController.isWakeAndUnlock(),
- mBiometricUnlockController.isBiometricUnlock());
+ mBiometricUnlockController.isBiometricUnlock(),
+ mBiometricUnlockController.getBiometricType());
}
@VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
index 93df14f18fda..0364186a83a2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
@@ -83,15 +83,16 @@ public interface StatusBarIconController {
public void removeIcon(String slot, int tag);
public void removeAllIconsForSlot(String slot);
- public static final String ICON_BLACKLIST = "icon_blacklist";
+ // TODO: See if we can rename this tunable name.
+ String ICON_HIDE_LIST = "icon_blacklist";
- /** Reads the default blacklist from config value unless blacklistStr is provided. */
- static ArraySet<String> getIconBlacklist(Context context, String blackListStr) {
+ /** Reads the default hide list from config value unless hideListStr is provided. */
+ static ArraySet<String> getIconHideList(Context context, String hideListStr) {
ArraySet<String> ret = new ArraySet<>();
- String[] blacklist = blackListStr == null
+ String[] hideList = hideListStr == null
? context.getResources().getStringArray(R.array.config_statusBarIconBlackList)
- : blackListStr.split(",");
- for (String slot : blacklist) {
+ : hideListStr.split(",");
+ for (String slot : hideList) {
if (!TextUtils.isEmpty(slot)) {
ret.add(slot);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java
index d0e806769f14..21e1d319cffa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconControllerImpl.java
@@ -59,7 +59,7 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
private static final String TAG = "StatusBarIconController";
private final ArrayList<IconManager> mIconGroups = new ArrayList<>();
- private final ArraySet<String> mIconBlacklist = new ArraySet<>();
+ private final ArraySet<String> mIconHideList = new ArraySet<>();
// Points to light or dark context depending on the... context?
private Context mContext;
@@ -79,7 +79,7 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
loadDimens();
commandQueue.addCallback(this);
- Dependency.get(TunerService.class).addTunable(this, ICON_BLACKLIST);
+ Dependency.get(TunerService.class).addTunable(this, ICON_HIDE_LIST);
}
@Override
@@ -89,12 +89,12 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
for (int i = 0; i < allSlots.size(); i++) {
Slot slot = allSlots.get(i);
List<StatusBarIconHolder> holders = slot.getHolderListInViewOrder();
- boolean blocked = mIconBlacklist.contains(slot.getName());
+ boolean hidden = mIconHideList.contains(slot.getName());
for (StatusBarIconHolder holder : holders) {
int tag = holder.getTag();
int viewIndex = getViewIndex(getSlotIndex(slot.getName()), holder.getTag());
- group.onIconAdded(viewIndex, slot.getName(), blocked, holder);
+ group.onIconAdded(viewIndex, slot.getName(), hidden, holder);
}
}
}
@@ -107,11 +107,11 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
@Override
public void onTuningChanged(String key, String newValue) {
- if (!ICON_BLACKLIST.equals(key)) {
+ if (!ICON_HIDE_LIST.equals(key)) {
return;
}
- mIconBlacklist.clear();
- mIconBlacklist.addAll(StatusBarIconController.getIconBlacklist(mContext, newValue));
+ mIconHideList.clear();
+ mIconHideList.addAll(StatusBarIconController.getIconHideList(mContext, newValue));
ArrayList<Slot> currentSlots = getSlots();
ArrayMap<Slot, List<StatusBarIconHolder>> slotsToReAdd = new ArrayMap<>();
@@ -142,9 +142,9 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
private void addSystemIcon(int index, StatusBarIconHolder holder) {
String slot = getSlotName(index);
int viewIndex = getViewIndex(index, holder.getTag());
- boolean blocked = mIconBlacklist.contains(slot);
+ boolean hidden = mIconHideList.contains(slot);
- mIconGroups.forEach(l -> l.onIconAdded(viewIndex, slot, blocked, holder));
+ mIconGroups.forEach(l -> l.onIconAdded(viewIndex, slot, hidden, holder));
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
index 45f0c49a4fd4..8e933a281b3b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
@@ -330,7 +330,7 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
}
public boolean hasActiveNotifications() {
- return mEntryManager.hasActiveNotifications();
+ return mEntryManager.hasVisibleNotifications();
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java
index 690d57345db6..7eefaf28517e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java
@@ -52,12 +52,12 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
private final SecurityController mSecurityController;
private final Handler mHandler = Handler.getMain();
- private boolean mBlockAirplane;
- private boolean mBlockMobile;
- private boolean mBlockWifi;
- private boolean mBlockEthernet;
+ private boolean mHideAirplane;
+ private boolean mHideMobile;
+ private boolean mHideWifi;
+ private boolean mHideEthernet;
private boolean mActivityEnabled;
- private boolean mForceBlockWifi;
+ private boolean mForceHideWifi;
// Track as little state as possible, and only for padding purposes
private boolean mIsAirplaneMode = false;
@@ -80,7 +80,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
mNetworkController = Dependency.get(NetworkController.class);
mSecurityController = Dependency.get(SecurityController.class);
- Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+ Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
mNetworkController.addCallback(this);
mSecurityController.addCallback(this);
}
@@ -114,21 +114,21 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
@Override
public void onTuningChanged(String key, String newValue) {
- if (!StatusBarIconController.ICON_BLACKLIST.equals(key)) {
+ if (!StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
return;
}
- ArraySet<String> blockList = StatusBarIconController.getIconBlacklist(mContext, newValue);
- boolean blockAirplane = blockList.contains(mSlotAirplane);
- boolean blockMobile = blockList.contains(mSlotMobile);
- boolean blockWifi = blockList.contains(mSlotWifi);
- boolean blockEthernet = blockList.contains(mSlotEthernet);
-
- if (blockAirplane != mBlockAirplane || blockMobile != mBlockMobile
- || blockEthernet != mBlockEthernet || blockWifi != mBlockWifi) {
- mBlockAirplane = blockAirplane;
- mBlockMobile = blockMobile;
- mBlockEthernet = blockEthernet;
- mBlockWifi = blockWifi || mForceBlockWifi;
+ ArraySet<String> hideList = StatusBarIconController.getIconHideList(mContext, newValue);
+ boolean hideAirplane = hideList.contains(mSlotAirplane);
+ boolean hideMobile = hideList.contains(mSlotMobile);
+ boolean hideWifi = hideList.contains(mSlotWifi);
+ boolean hideEthernet = hideList.contains(mSlotEthernet);
+
+ if (hideAirplane != mHideAirplane || hideMobile != mHideMobile
+ || hideEthernet != mHideEthernet || hideWifi != mHideWifi) {
+ mHideAirplane = hideAirplane;
+ mHideMobile = hideMobile;
+ mHideEthernet = hideEthernet;
+ mHideWifi = hideWifi || mForceHideWifi;
// Re-register to get new callbacks.
mNetworkController.removeCallback(this);
mNetworkController.addCallback(this);
@@ -140,7 +140,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
boolean activityIn, boolean activityOut, String description, boolean isTransient,
String statusLabel) {
- boolean visible = statusIcon.visible && !mBlockWifi;
+ boolean visible = statusIcon.visible && !mHideWifi;
boolean in = activityIn && mActivityEnabled && visible;
boolean out = activityOut && mActivityEnabled && visible;
@@ -189,7 +189,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
// Visibility of the data type indicator changed
boolean typeChanged = statusType != state.typeId && (statusType == 0 || state.typeId == 0);
- state.visible = statusIcon.visible && !mBlockMobile;
+ state.visible = statusIcon.visible && !mHideMobile;
state.strengthId = statusIcon.icon;
state.typeId = statusType;
state.contentDescription = statusIcon.contentDescription;
@@ -270,7 +270,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
@Override
public void setEthernetIndicators(IconState state) {
- boolean visible = state.visible && !mBlockEthernet;
+ boolean visible = state.visible && !mHideEthernet;
int resId = state.icon;
String description = state.contentDescription;
@@ -284,7 +284,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
@Override
public void setIsAirplaneMode(IconState icon) {
- mIsAirplaneMode = icon.visible && !mBlockAirplane;
+ mIsAirplaneMode = icon.visible && !mHideAirplane;
int resId = icon.icon;
String description = icon.contentDescription;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
index b9168e3c2223..673549ab589f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
@@ -58,6 +58,11 @@ public interface BatteryController extends DemoMode, Dumpable,
default void init() { }
/**
+ * Returns {@code true} if the device is currently in wireless charging mode.
+ */
+ default boolean isWirelessCharging() { return false; }
+
+ /**
* Returns {@code true} if reverse is supported.
*/
default boolean isReverseSupported() { return false; }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index c4c0d3fdff42..d43dd232e7c5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -190,7 +190,7 @@ public class Clock extends TextView implements DemoMode, Tunable, CommandQueue.C
mBroadcastDispatcher.registerReceiverWithHandler(mIntentReceiver, filter,
Dependency.get(Dependency.TIME_TICK_HANDLER), UserHandle.ALL);
Dependency.get(TunerService.class).addTunable(this, CLOCK_SECONDS,
- StatusBarIconController.ICON_BLACKLIST);
+ StatusBarIconController.ICON_HIDE_LIST);
mCommandQueue.addCallback(this);
if (mShowDark) {
Dependency.get(DarkIconDispatcher.class).addDarkReceiver(this);
@@ -296,8 +296,8 @@ public class Clock extends TextView implements DemoMode, Tunable, CommandQueue.C
if (CLOCK_SECONDS.equals(key)) {
mShowSeconds = TunerService.parseIntegerSwitch(newValue, false);
updateShowSeconds();
- } else {
- setClockVisibleByUser(!StatusBarIconController.getIconBlacklist(getContext(), newValue)
+ } else if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
+ setClockVisibleByUser(!StatusBarIconController.getIconHideList(getContext(), newValue)
.contains("clock"));
updateClockVisibility();
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
index 66372c311325..b71aafdf6b96 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java
@@ -38,7 +38,7 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
private final String mBattery;
private boolean mBatteryEnabled;
private boolean mHasPercentage;
- private ArraySet<String> mBlacklist;
+ private ArraySet<String> mHideList;
private boolean mHasSetValue;
public BatteryPreference(Context context, AttributeSet attrs) {
@@ -52,7 +52,7 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
super.onAttached();
mHasPercentage = Settings.System.getInt(getContext().getContentResolver(),
SHOW_BATTERY_PERCENT, 0) != 0;
- Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+ Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
}
@Override
@@ -63,9 +63,9 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
@Override
public void onTuningChanged(String key, String newValue) {
- if (StatusBarIconController.ICON_BLACKLIST.equals(key)) {
- mBlacklist = StatusBarIconController.getIconBlacklist(getContext(), newValue);
- mBatteryEnabled = !mBlacklist.contains(mBattery);
+ if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
+ mHideList = StatusBarIconController.getIconHideList(getContext(), newValue);
+ mBatteryEnabled = !mHideList.contains(mBattery);
}
if (!mHasSetValue) {
// Because of the complicated tri-state it can end up looping and setting state back to
@@ -88,12 +88,12 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
MetricsLogger.action(getContext(), MetricsEvent.TUNER_BATTERY_PERCENTAGE, v);
Settings.System.putInt(getContext().getContentResolver(), SHOW_BATTERY_PERCENT, v ? 1 : 0);
if (DISABLED.equals(value)) {
- mBlacklist.add(mBattery);
+ mHideList.add(mBattery);
} else {
- mBlacklist.remove(mBattery);
+ mHideList.remove(mBattery);
}
- Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_BLACKLIST,
- TextUtils.join(",", mBlacklist));
+ Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_HIDE_LIST,
+ TextUtils.join(",", mHideList));
return true;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java b/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
index f7d0c9fb9d86..c92d7bbfe0b7 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java
@@ -33,7 +33,7 @@ public class ClockPreference extends DropDownPreference implements TunerService.
private final String mClock;
private boolean mClockEnabled;
private boolean mHasSeconds;
- private ArraySet<String> mBlacklist;
+ private ArraySet<String> mHideList;
private boolean mHasSetValue;
private boolean mReceivedSeconds;
private boolean mReceivedClock;
@@ -47,7 +47,7 @@ public class ClockPreference extends DropDownPreference implements TunerService.
@Override
public void onAttached() {
super.onAttached();
- Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST,
+ Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST,
Clock.CLOCK_SECONDS);
}
@@ -59,10 +59,10 @@ public class ClockPreference extends DropDownPreference implements TunerService.
@Override
public void onTuningChanged(String key, String newValue) {
- if (StatusBarIconController.ICON_BLACKLIST.equals(key)) {
+ if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
mReceivedClock = true;
- mBlacklist = StatusBarIconController.getIconBlacklist(getContext(), newValue);
- mClockEnabled = !mBlacklist.contains(mClock);
+ mHideList = StatusBarIconController.getIconHideList(getContext(), newValue);
+ mClockEnabled = !mHideList.contains(mClock);
} else if (Clock.CLOCK_SECONDS.equals(key)) {
mReceivedSeconds = true;
mHasSeconds = newValue != null && Integer.parseInt(newValue) != 0;
@@ -87,12 +87,12 @@ public class ClockPreference extends DropDownPreference implements TunerService.
Dependency.get(TunerService.class).setValue(Clock.CLOCK_SECONDS, SECONDS.equals(value) ? 1
: 0);
if (DISABLED.equals(value)) {
- mBlacklist.add(mClock);
+ mHideList.add(mClock);
} else {
- mBlacklist.remove(mClock);
+ mHideList.remove(mClock);
}
- Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_BLACKLIST,
- TextUtils.join(",", mBlacklist));
+ Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_HIDE_LIST,
+ TextUtils.join(",", mHideList));
return true;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java
index de8ccfa848e3..cc0050b64d60 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarSwitch.java
@@ -34,7 +34,7 @@ import java.util.Set;
public class StatusBarSwitch extends SwitchPreference implements Tunable {
- private Set<String> mBlacklist;
+ private Set<String> mHideList;
public StatusBarSwitch(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -43,7 +43,7 @@ public class StatusBarSwitch extends SwitchPreference implements Tunable {
@Override
public void onAttached() {
super.onAttached();
- Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+ Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
}
@Override
@@ -54,35 +54,35 @@ public class StatusBarSwitch extends SwitchPreference implements Tunable {
@Override
public void onTuningChanged(String key, String newValue) {
- if (!StatusBarIconController.ICON_BLACKLIST.equals(key)) {
+ if (!StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
return;
}
- mBlacklist = StatusBarIconController.getIconBlacklist(getContext(), newValue);
- setChecked(!mBlacklist.contains(getKey()));
+ mHideList = StatusBarIconController.getIconHideList(getContext(), newValue);
+ setChecked(!mHideList.contains(getKey()));
}
@Override
protected boolean persistBoolean(boolean value) {
if (!value) {
- // If not enabled add to blacklist.
- if (!mBlacklist.contains(getKey())) {
+ // If not enabled add to hideList.
+ if (!mHideList.contains(getKey())) {
MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_DISABLE,
getKey());
- mBlacklist.add(getKey());
- setList(mBlacklist);
+ mHideList.add(getKey());
+ setList(mHideList);
}
} else {
- if (mBlacklist.remove(getKey())) {
+ if (mHideList.remove(getKey())) {
MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_ENABLE, getKey());
- setList(mBlacklist);
+ setList(mHideList);
}
}
return true;
}
- private void setList(Set<String> blacklist) {
+ private void setList(Set<String> hideList) {
ContentResolver contentResolver = getContext().getContentResolver();
- Settings.Secure.putStringForUser(contentResolver, StatusBarIconController.ICON_BLACKLIST,
- TextUtils.join(",", blacklist), ActivityManager.getCurrentUser());
+ Settings.Secure.putStringForUser(contentResolver, StatusBarIconController.ICON_HIDE_LIST,
+ TextUtils.join(",", hideList), ActivityManager.getCurrentUser());
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
index 9ad2aa257aa0..644f7582f146 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
@@ -60,7 +60,7 @@ public class TunerServiceImpl extends TunerService {
// Things that use the tunable infrastructure but are now real user settings and
// shouldn't be reset with tuner settings.
- private static final String[] RESET_BLACKLIST = new String[] {
+ private static final String[] RESET_EXCEPTION_LIST = new String[] {
QSTileHost.TILES_SETTING,
Settings.Secure.DOZE_ALWAYS_ON,
Settings.Secure.MEDIA_CONTROLS_RESUME
@@ -116,17 +116,17 @@ public class TunerServiceImpl extends TunerService {
private void upgradeTuner(int oldVersion, int newVersion, Handler mainHandler) {
if (oldVersion < 1) {
- String blacklistStr = getValue(StatusBarIconController.ICON_BLACKLIST);
- if (blacklistStr != null) {
- ArraySet<String> iconBlacklist =
- StatusBarIconController.getIconBlacklist(mContext, blacklistStr);
+ String hideListStr = getValue(StatusBarIconController.ICON_HIDE_LIST);
+ if (hideListStr != null) {
+ ArraySet<String> iconHideList =
+ StatusBarIconController.getIconHideList(mContext, hideListStr);
- iconBlacklist.add("rotate");
- iconBlacklist.add("headset");
+ iconHideList.add("rotate");
+ iconHideList.add("headset");
Settings.Secure.putStringForUser(mContentResolver,
- StatusBarIconController.ICON_BLACKLIST,
- TextUtils.join(",", iconBlacklist), mCurrentUser);
+ StatusBarIconController.ICON_HIDE_LIST,
+ TextUtils.join(",", iconHideList), mCurrentUser);
}
}
if (oldVersion < 2) {
@@ -251,7 +251,7 @@ public class TunerServiceImpl extends TunerService {
mContext.sendBroadcast(intent);
for (String key : mTunableLookup.keySet()) {
- if (ArrayUtils.contains(RESET_BLACKLIST, key)) {
+ if (ArrayUtils.contains(RESET_EXCEPTION_LIST, key)) {
continue;
}
Settings.Secure.putStringForUser(mContentResolver, key, null, user);
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
index 7561af770298..b1241b160d70 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
@@ -70,6 +70,8 @@ public class UsbDebuggingActivity extends AlertActivity
if (SystemProperties.getInt("service.adb.tcp.port", 0) == 0) {
mDisconnectedReceiver = new UsbDisconnectedReceiver(this);
+ IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
+ mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
}
Intent intent = getIntent();
@@ -119,6 +121,7 @@ public class UsbDebuggingActivity extends AlertActivity
}
boolean connected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false);
if (!connected) {
+ Log.d(TAG, "USB disconnected, notifying service");
notifyService(false);
mActivity.finish();
}
@@ -126,29 +129,20 @@ public class UsbDebuggingActivity extends AlertActivity
}
@Override
- public void onStart() {
- super.onStart();
- if (mDisconnectedReceiver != null) {
- IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
- mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
- }
- }
-
- @Override
- protected void onStop() {
+ protected void onDestroy() {
if (mDisconnectedReceiver != null) {
mBroadcastDispatcher.unregisterReceiver(mDisconnectedReceiver);
}
- super.onStop();
- }
-
- @Override
- protected void onDestroy() {
- // If the ADB service has not yet been notified due to this dialog being closed in some
- // other way then notify the service to deny the connection to ensure system_server sends
- // a response to adbd.
- if (!mServiceNotified) {
- notifyService(false);
+ // Only notify the service if the activity is finishing; if onDestroy has been called due to
+ // a configuration change then allow the user to still authorize the connection the next
+ // time the activity is in the foreground.
+ if (isFinishing()) {
+ // If the ADB service has not yet been notified due to this dialog being closed in some
+ // other way then notify the service to deny the connection to ensure system_server
+ // sends a response to adbd.
+ if (!mServiceNotified) {
+ notifyService(false);
+ }
}
super.onDestroy();
}
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java b/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
index b25df5f9c07f..5e7280840bb9 100644
--- a/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
@@ -104,9 +104,13 @@ public class LeakReporter {
.setContentText(String.format(
"SystemUI has detected %d leaked objects. Tap to send", garbageCount))
.setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
- .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
+ .setContentIntent(PendingIntent.getActivityAsUser(
+ mContext,
+ 0,
getIntent(hprofFile, dumpFile),
- PendingIntent.FLAG_UPDATE_CURRENT, null, UserHandle.CURRENT));
+ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE,
+ null,
+ UserHandle.CURRENT));
notiMan.notify(TAG, 0, builder.build());
} catch (IOException e) {
Log.e(TAG, "Couldn't dump heap for leak", e);
diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/PrimaryProxSensor.java b/packages/SystemUI/src/com/android/systemui/util/sensors/PrimaryProxSensor.java
new file mode 100644
index 000000000000..96c76c1a15d0
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/sensors/PrimaryProxSensor.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Documented
+@Retention(RUNTIME)
+@interface PrimaryProxSensor {
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/ProximitySensor.java b/packages/SystemUI/src/com/android/systemui/util/sensors/ProximitySensor.java
index 52d46476df83..06806d0e6ab6 100644
--- a/packages/SystemUI/src/com/android/systemui/util/sensors/ProximitySensor.java
+++ b/packages/SystemUI/src/com/android/systemui/util/sensors/ProximitySensor.java
@@ -16,94 +16,128 @@
package com.android.systemui.util.sensors;
-import android.content.res.Resources;
-import android.hardware.Sensor;
-import android.hardware.SensorEvent;
-import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.util.Assert;
import com.android.systemui.util.concurrency.DelayableExecutor;
import java.util.ArrayList;
import java.util.List;
-import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;
import javax.inject.Inject;
/**
- * Simple wrapper around SensorManager customized for the Proximity sensor.
+ * Wrapper around SensorManager customized for the Proximity sensor.
+ *
+ * The ProximitySensor supports the concept of a primary and a
+ * secondary hardware sensor. The primary sensor is used for a first
+ * pass check if the phone covered. When triggered, it then checks
+ * the secondary sensor for confirmation (if there is one). It does
+ * not send a proximity event until the secondary sensor confirms (or
+ * rejects) the reading. The secondary sensor is, in fact, the source
+ * of truth.
+ *
+ * This is necessary as sometimes keeping the secondary sensor on for
+ * extends periods is undesirable. It may, however, result in increased
+ * latency for proximity readings.
+ *
+ * Phones should configure this via a config.xml overlay. If no
+ * proximity sensor is set (primary or secondary) we fall back to the
+ * default Sensor.TYPE_PROXIMITY. If proximity_sensor_type is set in
+ * config.xml, that will be used as the primary sensor. If
+ * proximity_sensor_secondary_type is set, that will function as the
+ * secondary sensor. If no secondary is set, only the primary will be
+ * used.
*/
-public class ProximitySensor {
+public class ProximitySensor implements ThresholdSensor {
private static final String TAG = "ProxSensor";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+ private static final long SECONDARY_PING_INTERVAL_MS = 5000;
- private final Sensor mSensor;
- private final AsyncSensorManager mSensorManager;
- private final float mThreshold;
- private List<ProximitySensorListener> mListeners = new ArrayList<>();
+ private final ThresholdSensor mPrimaryThresholdSensor;
+ private final ThresholdSensor mSecondaryThresholdSensor;
+ private final DelayableExecutor mDelayableExecutor;
+ private final List<ThresholdSensor.Listener> mListeners = new ArrayList<>();
private String mTag = null;
- @VisibleForTesting ProximityEvent mLastEvent;
- private int mSensorDelay = SensorManager.SENSOR_DELAY_NORMAL;
@VisibleForTesting protected boolean mPaused;
+ private ThresholdSensorEvent mLastPrimaryEvent;
+ @VisibleForTesting
+ ThresholdSensorEvent mLastEvent;
private boolean mRegistered;
private final AtomicBoolean mAlerting = new AtomicBoolean();
+ private Runnable mCancelSecondaryRunnable;
+ private boolean mInitializedListeners = false;
+ private boolean mSecondarySafe = false;
- private SensorEventListener mSensorEventListener = new SensorEventListener() {
+ private ThresholdSensor.Listener mPrimaryEventListener = new ThresholdSensor.Listener() {
@Override
- public synchronized void onSensorChanged(SensorEvent event) {
- onSensorEvent(event);
- }
-
- @Override
- public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ public void onThresholdCrossed(ThresholdSensorEvent event) {
+ onPrimarySensorEvent(event);
}
};
- @Inject
- public ProximitySensor(@Main Resources resources,
- AsyncSensorManager sensorManager) {
- mSensorManager = sensorManager;
-
- Sensor sensor = findCustomProxSensor(resources);
- float threshold = 0;
- if (sensor != null) {
- try {
- threshold = getCustomProxThreshold(resources);
- } catch (IllegalStateException e) {
- Log.e(TAG, "Can not load custom proximity sensor.", e);
- sensor = null;
+ private ThresholdSensor.Listener mSecondaryEventListener = new ThresholdSensor.Listener() {
+ @Override
+ public void onThresholdCrossed(ThresholdSensorEvent event) {
+ // If we no longer have a "below" signal and the secondary sensor is not
+ // considered "safe", then we need to turn it off.
+ if (!mSecondarySafe
+ && (mLastPrimaryEvent == null
+ || !mLastPrimaryEvent.getBelow()
+ || !event.getBelow())) {
+ mSecondaryThresholdSensor.pause();
+ if (mLastPrimaryEvent == null || !mLastPrimaryEvent.getBelow()) {
+ // Only check the secondary as long as the primary thinks we're near.
+ mCancelSecondaryRunnable = null;
+ return;
+ } else {
+ // Check this sensor again in a moment.
+ mCancelSecondaryRunnable = mDelayableExecutor.executeDelayed(
+ mSecondaryThresholdSensor::resume, SECONDARY_PING_INTERVAL_MS);
+ }
}
- }
- if (sensor == null) {
- sensor = sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
- if (sensor != null) {
- threshold = sensor.getMaximumRange();
+ logDebug("Secondary sensor event: " + event.getBelow() + ".");
+
+ if (!mPaused) {
+ onSensorEvent(event);
}
}
+ };
- mThreshold = threshold;
-
- mSensor = sensor;
+ @Inject
+ public ProximitySensor(@PrimaryProxSensor ThresholdSensor primary,
+ @SecondaryProxSensor ThresholdSensor secondary,
+ @Main DelayableExecutor delayableExecutor) {
+ mPrimaryThresholdSensor = primary;
+ mSecondaryThresholdSensor = secondary;
+ mDelayableExecutor = delayableExecutor;
}
+ @Override
public void setTag(String tag) {
mTag = tag;
+ mPrimaryThresholdSensor.setTag(tag + ":primary");
+ mSecondaryThresholdSensor.setTag(tag + ":secondary");
}
- public void setSensorDelay(int sensorDelay) {
- mSensorDelay = sensorDelay;
+ @Override
+ public void setDelay(int delay) {
+ Assert.isMainThread();
+ mPrimaryThresholdSensor.setDelay(delay);
+ mSecondaryThresholdSensor.setDelay(delay);
}
/**
* Unregister with the {@link SensorManager} without unsetting listeners on this object.
*/
+ @Override
public void pause() {
+ Assert.isMainThread();
mPaused = true;
unregisterInternal();
}
@@ -111,39 +145,20 @@ public class ProximitySensor {
/**
* Register with the {@link SensorManager}. No-op if no listeners are registered on this object.
*/
+ @Override
public void resume() {
+ Assert.isMainThread();
mPaused = false;
registerInternal();
}
- /**
- * Returns a brightness sensor that can be used for proximity purposes.
- */
- private Sensor findCustomProxSensor(Resources resources) {
- String sensorType = resources.getString(R.string.proximity_sensor_type);
- if (sensorType.isEmpty()) {
- return null;
- }
-
- List<Sensor> sensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL);
- Sensor sensor = null;
- for (Sensor s : sensorList) {
- if (sensorType.equals(s.getStringType())) {
- sensor = s;
- break;
- }
- }
-
- return sensor;
- }
/**
- * Returns a threshold value that can be used along with {@link #findCustomProxSensor}
+ * Sets that it is safe to leave the secondary sensor on indefinitely.
*/
- private float getCustomProxThreshold(Resources resources) {
- try {
- return resources.getFloat(R.dimen.proximity_sensor_threshold);
- } catch (Resources.NotFoundException e) {
- throw new IllegalStateException("R.dimen.proximity_sensor_threshold must be set.");
+ public void setSecondarySafe(boolean safe) {
+ mSecondarySafe = safe;
+ if (!mSecondarySafe) {
+ mSecondaryThresholdSensor.pause();
}
}
@@ -157,38 +172,46 @@ public class ProximitySensor {
/**
* Returns {@code false} if a Proximity sensor is not available.
*/
- public boolean getSensorAvailable() {
- return mSensor != null;
+ @Override
+ public boolean isLoaded() {
+ return mPrimaryThresholdSensor.isLoaded();
}
/**
* Add a listener.
*
* Registers itself with the {@link SensorManager} if this is the first listener
- * added. If a cool down is currently running, the sensor will be registered when it is over.
+ * added. If the ProximitySensor is paused, it will be registered when resumed.
*/
- public boolean register(ProximitySensorListener listener) {
- if (!getSensorAvailable()) {
- return false;
+ @Override
+ public void register(ThresholdSensor.Listener listener) {
+ Assert.isMainThread();
+ if (!isLoaded()) {
+ return;
}
if (mListeners.contains(listener)) {
- Log.d(TAG, "ProxListener registered multiple times: " + listener);
+ logDebug("ProxListener registered multiple times: " + listener);
} else {
mListeners.add(listener);
}
registerInternal();
-
- return true;
}
protected void registerInternal() {
+ Assert.isMainThread();
if (mRegistered || mPaused || mListeners.isEmpty()) {
return;
}
+ if (!mInitializedListeners) {
+ mPrimaryThresholdSensor.register(mPrimaryEventListener);
+ mSecondaryThresholdSensor.pause();
+ mSecondaryThresholdSensor.register(mSecondaryEventListener);
+ mInitializedListeners = true;
+ }
logDebug("Registering sensor listener");
+ mPrimaryThresholdSensor.resume();
mRegistered = true;
- mSensorManager.registerListener(mSensorEventListener, mSensor, mSensorDelay);
}
/**
@@ -197,7 +220,9 @@ public class ProximitySensor {
* If all listeners are removed from an instance of this class,
* it will unregister itself with the SensorManager.
*/
- public void unregister(ProximitySensorListener listener) {
+ @Override
+ public void unregister(ThresholdSensor.Listener listener) {
+ Assert.isMainThread();
mListeners.remove(listener);
if (mListeners.size() == 0) {
unregisterInternal();
@@ -205,40 +230,85 @@ public class ProximitySensor {
}
protected void unregisterInternal() {
+ Assert.isMainThread();
if (!mRegistered) {
return;
}
logDebug("unregistering sensor listener");
- mSensorManager.unregisterListener(mSensorEventListener);
+ mPrimaryThresholdSensor.pause();
+ mSecondaryThresholdSensor.pause();
+ if (mCancelSecondaryRunnable != null) {
+ mCancelSecondaryRunnable.run();
+ mCancelSecondaryRunnable = null;
+ }
+ mLastPrimaryEvent = null; // Forget what we know.
+ mLastEvent = null;
mRegistered = false;
}
public Boolean isNear() {
- return getSensorAvailable() && mLastEvent != null ? mLastEvent.getNear() : null;
+ return isLoaded() && mLastEvent != null ? mLastEvent.getBelow() : null;
}
/** Update all listeners with the last value this class received from the sensor. */
public void alertListeners() {
+ Assert.isMainThread();
if (mAlerting.getAndSet(true)) {
return;
}
+ if (mLastEvent != null) {
+ ThresholdSensorEvent lastEvent = mLastEvent; // Listeners can null out mLastEvent.
+ List<ThresholdSensor.Listener> listeners = new ArrayList<>(mListeners);
+ listeners.forEach(proximitySensorListener ->
+ proximitySensorListener.onThresholdCrossed(lastEvent));
+ }
- List<ProximitySensorListener> listeners = new ArrayList<>(mListeners);
- listeners.forEach(proximitySensorListener ->
- proximitySensorListener.onSensorEvent(mLastEvent));
mAlerting.set(false);
}
- private void onSensorEvent(SensorEvent event) {
- boolean near = event.values[0] < mThreshold;
- mLastEvent = new ProximityEvent(near, event.timestamp);
+ private void onPrimarySensorEvent(ThresholdSensorEvent event) {
+ Assert.isMainThread();
+ if (mLastPrimaryEvent != null && event.getBelow() == mLastPrimaryEvent.getBelow()) {
+ return;
+ }
+
+ mLastPrimaryEvent = event;
+
+ if (event.getBelow() && mSecondaryThresholdSensor.isLoaded()) {
+ logDebug("Primary sensor is near. Checking secondary.");
+ if (mCancelSecondaryRunnable == null) {
+ mSecondaryThresholdSensor.resume();
+ }
+ } else {
+ if (!mSecondaryThresholdSensor.isLoaded()) {
+ logDebug("Primary sensor event: " + event.getBelow() + ". No secondary.");
+ } else {
+ logDebug("Primary sensor event: " + event.getBelow() + ".");
+ }
+ onSensorEvent(event);
+ }
+ }
+
+ private void onSensorEvent(ThresholdSensorEvent event) {
+ Assert.isMainThread();
+ if (mLastEvent != null && event.getBelow() == mLastEvent.getBelow()) {
+ return;
+ }
+
+ if (!mSecondarySafe && !event.getBelow()) {
+ mSecondaryThresholdSensor.pause();
+ }
+
+ mLastEvent = event;
alertListeners();
}
@Override
public String toString() {
- return String.format("{registered=%s, paused=%s, near=%s, sensor=%s}",
- isRegistered(), mPaused, isNear(), mSensor);
+ return String.format("{registered=%s, paused=%s, near=%s, primarySensor=%s, "
+ + "secondarySensor=%s}",
+ isRegistered(), mPaused, isNear(), mPrimaryThresholdSensor,
+ mSecondaryThresholdSensor);
}
/**
@@ -249,7 +319,7 @@ public class ProximitySensor {
private final ProximitySensor mSensor;
private final DelayableExecutor mDelayableExecutor;
private List<Consumer<Boolean>> mCallbacks = new ArrayList<>();
- private final ProximitySensor.ProximitySensorListener mListener;
+ private final ThresholdSensor.Listener mListener;
private final AtomicBoolean mRegistered = new AtomicBoolean();
@Inject
@@ -268,14 +338,14 @@ public class ProximitySensor {
@Override
public void run() {
unregister();
- mSensor.alertListeners();
+ onProximityEvent(null);
}
/**
* Query the proximity sensor, timing out if no result.
*/
public void check(long timeoutMs, Consumer<Boolean> callback) {
- if (!mSensor.getSensorAvailable()) {
+ if (!mSensor.isLoaded()) {
callback.accept(null);
}
mCallbacks.add(callback);
@@ -290,54 +360,17 @@ public class ProximitySensor {
mRegistered.set(false);
}
- private void onProximityEvent(ProximityEvent proximityEvent) {
+ private void onProximityEvent(ThresholdSensorEvent proximityEvent) {
mCallbacks.forEach(
booleanConsumer ->
booleanConsumer.accept(
- proximityEvent == null ? null : proximityEvent.getNear()));
+ proximityEvent == null ? null : proximityEvent.getBelow()));
mCallbacks.clear();
unregister();
mRegistered.set(false);
}
}
- /** Implement to be notified of ProximityEvents. */
- public interface ProximitySensorListener {
- /** Called when the ProximitySensor changes. */
- void onSensorEvent(ProximityEvent proximityEvent);
- }
-
- /**
- * Returned when the near/far state of a {@link ProximitySensor} changes.
- */
- public static class ProximityEvent {
- private final boolean mNear;
- private final long mTimestampNs;
-
- public ProximityEvent(boolean near, long timestampNs) {
- mNear = near;
- mTimestampNs = timestampNs;
- }
-
- public boolean getNear() {
- return mNear;
- }
-
- public long getTimestampNs() {
- return mTimestampNs;
- }
-
- public long getTimestampMs() {
- return mTimestampNs / 1000000;
- }
-
- @Override
- public String toString() {
- return String.format((Locale) null, "{near=%s, timestamp_ns=%d}", mNear, mTimestampNs);
- }
-
- }
-
private void logDebug(String msg) {
if (DEBUG) {
Log.d(TAG, (mTag != null ? "[" + mTag + "] " : "") + msg);
diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/SecondaryProxSensor.java b/packages/SystemUI/src/com/android/systemui/util/sensors/SecondaryProxSensor.java
new file mode 100644
index 000000000000..89fc0eabf607
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/sensors/SecondaryProxSensor.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+@Documented
+@Retention(RUNTIME)
+@interface SecondaryProxSensor {
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/SensorModule.java b/packages/SystemUI/src/com/android/systemui/util/sensors/SensorModule.java
new file mode 100644
index 000000000000..7f3756244629
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/sensors/SensorModule.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import android.hardware.Sensor;
+import android.hardware.SensorManager;
+
+import com.android.systemui.R;
+
+import dagger.Module;
+import dagger.Provides;
+
+/**
+ * Dagger module for Sensor related classes.
+ */
+@Module
+public class SensorModule {
+ @Provides
+ @PrimaryProxSensor
+ static ThresholdSensor providePrimaryProxSensor(SensorManager sensorManager,
+ ThresholdSensorImpl.Builder thresholdSensorBuilder) {
+ try {
+ return thresholdSensorBuilder
+ .setSensorDelay(SensorManager.SENSOR_DELAY_NORMAL)
+ .setSensorResourceId(R.string.proximity_sensor_type)
+ .setThresholdResourceId(R.dimen.proximity_sensor_threshold)
+ .setThresholdLatchResourceId(R.dimen.proximity_sensor_threshold_latch)
+ .build();
+ } catch (IllegalStateException e) {
+ Sensor defaultSensor = sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
+ return thresholdSensorBuilder
+ .setSensor(defaultSensor)
+ .setThresholdValue(defaultSensor != null ? defaultSensor.getMaximumRange() : 0)
+ .build();
+ }
+ }
+
+ @Provides
+ @SecondaryProxSensor
+ static ThresholdSensor provideSecondaryProxSensor(
+ ThresholdSensorImpl.Builder thresholdSensorBuilder) {
+ try {
+ return thresholdSensorBuilder
+ .setSensorResourceId(R.string.proximity_sensor_secondary_type)
+ .setThresholdResourceId(R.dimen.proximity_sensor_secondary_threshold)
+ .setThresholdLatchResourceId(R.dimen.proximity_sensor_secondary_threshold_latch)
+ .build();
+ } catch (IllegalStateException e) {
+ return thresholdSensorBuilder.setSensor(null).setThresholdValue(0).build();
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensor.java b/packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensor.java
new file mode 100644
index 000000000000..363a734a6ae5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensor.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import java.util.Locale;
+
+/**
+ * A wrapper class for sensors that have a boolean state - above/below.
+ */
+public interface ThresholdSensor {
+ /**
+ * Optional label to use for logging.
+ *
+ * This should be set to something meaningful by owner of the instance.
+ */
+ void setTag(String tag);
+
+ /**
+ * Change the delay used when registering the sensor.
+ *
+ * If the sensor is already registered, this should cause it to re-register with the new
+ * delay.
+ */
+ void setDelay(int delay);
+
+ /**
+ * True if this sensor successfully loads and can be listened to.
+ */
+ boolean isLoaded();
+
+ /**
+ * Registers with the sensor and calls the supplied callback on value change.
+ *
+ * If this instance is paused, the listener will be recorded, but no registration with
+ * the underlying physical sensor will occur until {@link #resume()} is called.
+ *
+ * @see #unregister(Listener)
+ */
+ void register(Listener listener);
+
+ /**
+ * Unregisters from the physical sensor without removing any supplied listeners.
+ *
+ * No events will be sent to listeners as long as this sensor is paused.
+ *
+ * @see #resume()
+ * @see #unregister(Listener)
+ */
+ void pause();
+
+ /**
+ * Resumes listening to the physical sensor after previously pausing.
+ *
+ * @see #pause()
+ */
+ void resume();
+
+ /**
+ * Unregister a listener with the sensor.
+ *
+ * @see #register(Listener)
+ */
+ void unregister(Listener listener);
+
+ /**
+ * Interface for listening to events on {@link ThresholdSensor}
+ */
+ interface Listener {
+ /**
+ * Called whenever the threshold for the registered sensor is crossed.
+ */
+ void onThresholdCrossed(ThresholdSensorEvent event);
+ }
+
+ /**
+ * Returned when the below/above state of a {@link ThresholdSensor} changes.
+ */
+ class ThresholdSensorEvent {
+ private final boolean mBelow;
+ private final long mTimestampNs;
+
+ public ThresholdSensorEvent(boolean below, long timestampNs) {
+ mBelow = below;
+ mTimestampNs = timestampNs;
+ }
+
+ public boolean getBelow() {
+ return mBelow;
+ }
+
+ public long getTimestampNs() {
+ return mTimestampNs;
+ }
+
+ public long getTimestampMs() {
+ return mTimestampNs / 1000000;
+ }
+
+ @Override
+ public String toString() {
+ return String.format((Locale) null, "{near=%s, timestamp_ns=%d}", mBelow, mTimestampNs);
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensorImpl.java b/packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensorImpl.java
new file mode 100644
index 000000000000..aa50292edbf7
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/sensors/ThresholdSensorImpl.java
@@ -0,0 +1,325 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import android.content.res.Resources;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.util.Log;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.util.Assert;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+class ThresholdSensorImpl implements ThresholdSensor {
+ private static final String TAG = "ThresholdSensor";
+ private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+
+ private final AsyncSensorManager mSensorManager;
+ private final Sensor mSensor;
+ private final float mThreshold;
+ private boolean mRegistered;
+ private boolean mPaused;
+ private List<Listener> mListeners = new ArrayList<>();
+ private Boolean mLastBelow;
+ private String mTag;
+ private final float mThresholdLatch;
+ private int mSensorDelay;
+
+ private SensorEventListener mSensorEventListener = new SensorEventListener() {
+ @Override
+ public void onSensorChanged(SensorEvent event) {
+ boolean below = event.values[0] < mThreshold;
+ boolean above = event.values[0] >= mThresholdLatch;
+ logDebug("Sensor value: " + event.values[0]);
+ onSensorEvent(below, above, event.timestamp);
+ }
+
+ @Override
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
+ }
+ };
+
+ private ThresholdSensorImpl(AsyncSensorManager sensorManager,
+ Sensor sensor, float threshold, float thresholdLatch, int sensorDelay) {
+ mSensorManager = sensorManager;
+ mSensor = sensor;
+ mThreshold = threshold;
+ mThresholdLatch = thresholdLatch;
+ mSensorDelay = sensorDelay;
+ }
+
+ @Override
+ public void setTag(String tag) {
+ mTag = tag;
+ }
+
+ @Override
+ public void setDelay(int delay) {
+ if (delay == mSensorDelay) {
+ return;
+ }
+
+ mSensorDelay = delay;
+ if (isLoaded()) {
+ unregisterInternal();
+ registerInternal();
+ }
+ }
+
+ @Override
+ public boolean isLoaded() {
+ return mSensor != null;
+ }
+
+ @VisibleForTesting
+ boolean isRegistered() {
+ return mRegistered;
+ }
+
+ /**
+ * Registers the listener with the sensor.
+ *
+ * Multiple listeners are not supported at this time.
+ *
+ * Returns true if the listener was successfully registered. False otherwise.
+ */
+ @Override
+ public void register(Listener listener) {
+ Assert.isMainThread();
+ if (!mListeners.contains(listener)) {
+ mListeners.add(listener);
+ }
+ registerInternal();
+ }
+
+ @Override
+ public void unregister(Listener listener) {
+ Assert.isMainThread();
+ mListeners.remove(listener);
+ unregisterInternal();
+ }
+
+ /**
+ * Unregister with the {@link SensorManager} without unsetting listeners on this object.
+ */
+ @Override
+ public void pause() {
+ Assert.isMainThread();
+ mPaused = true;
+ unregisterInternal();
+ }
+
+ /**
+ * Register with the {@link SensorManager}. No-op if no listeners are registered on this object.
+ */
+ @Override
+ public void resume() {
+ Assert.isMainThread();
+ mPaused = false;
+ registerInternal();
+ }
+
+ private void alertListenersInternal(boolean below, long timestampNs) {
+ List<Listener> listeners = new ArrayList<>(mListeners);
+ listeners.forEach(listener ->
+ listener.onThresholdCrossed(new ThresholdSensorEvent(below, timestampNs)));
+ }
+
+ private void registerInternal() {
+ Assert.isMainThread();
+ if (mRegistered || mPaused || mListeners.isEmpty()) {
+ return;
+ }
+ logDebug("Registering sensor listener");
+ mSensorManager.registerListener(mSensorEventListener, mSensor, mSensorDelay);
+ mRegistered = true;
+ }
+
+ private void unregisterInternal() {
+ Assert.isMainThread();
+ if (!mRegistered) {
+ return;
+ }
+ logDebug("Unregister sensor listener");
+ mSensorManager.unregisterListener(mSensorEventListener);
+ mRegistered = false;
+ mLastBelow = null; // Forget what we know.
+ }
+
+ /**
+ * Call when the sensor reports a new value.
+ *
+ * Separate below-threshold and above-thresholds are specified. this allows latching behavior,
+ * where a different threshold can be specified for triggering the sensor depending on if it's
+ * going from above to below or below to above. To outside listeners of this class, the class
+ * still appears entirely binary.
+ */
+ private void onSensorEvent(boolean belowThreshold, boolean aboveThreshold, long timestampNs) {
+ Assert.isMainThread();
+ if (!mRegistered) {
+ return;
+ }
+ if (mLastBelow != null) {
+ // If we last reported below and are not yet above, change nothing.
+ if (mLastBelow && !aboveThreshold) {
+ return;
+ }
+ // If we last reported above and are not yet below, change nothing.
+ if (!mLastBelow && !belowThreshold) {
+ return;
+ }
+ }
+ mLastBelow = belowThreshold;
+ logDebug("Alerting below: " + belowThreshold);
+ alertListenersInternal(belowThreshold, timestampNs);
+ }
+
+
+ @Override
+ public String toString() {
+ return String.format("{registered=%s, paused=%s, threshold=%s, sensor=%s}",
+ isLoaded(), mRegistered, mPaused, mThreshold, mSensor);
+ }
+
+ private void logDebug(String msg) {
+ if (DEBUG) {
+ Log.d(TAG, (mTag != null ? "[" + mTag + "] " : "") + msg);
+ }
+ }
+
+ static class Builder {
+ private final Resources mResources;
+ private final AsyncSensorManager mSensorManager;
+ private int mSensorDelay = SensorManager.SENSOR_DELAY_NORMAL;;
+ private float mThresholdValue;
+ private float mThresholdLatchValue;
+ private Sensor mSensor;
+ private boolean mSensorSet;
+ private boolean mThresholdSet;
+ private boolean mThresholdLatchValueSet;
+
+ @Inject
+ Builder(@Main Resources resources, AsyncSensorManager sensorManager) {
+ mResources = resources;
+ mSensorManager = sensorManager;
+ }
+
+
+ Builder setSensorDelay(int sensorDelay) {
+ mSensorDelay = sensorDelay;
+ return this;
+ }
+
+ Builder setSensorResourceId(int sensorResourceId) {
+ setSensorType(mResources.getString(sensorResourceId));
+ return this;
+ }
+
+ Builder setThresholdResourceId(int thresholdResourceId) {
+ try {
+ setThresholdValue(mResources.getFloat(thresholdResourceId));
+ } catch (Resources.NotFoundException e) {
+ // no-op
+ }
+ return this;
+ }
+
+ Builder setThresholdLatchResourceId(int thresholdLatchResourceId) {
+ try {
+ setThresholdLatchValue(mResources.getFloat(thresholdLatchResourceId));
+ } catch (Resources.NotFoundException e) {
+ // no-op
+ }
+ return this;
+ }
+
+ Builder setSensorType(String sensorType) {
+ Sensor sensor = findSensorByType(sensorType);
+ if (sensor != null) {
+ setSensor(sensor);
+ }
+ return this;
+ }
+
+ Builder setThresholdValue(float thresholdValue) {
+ mThresholdValue = thresholdValue;
+ mThresholdSet = true;
+ if (!mThresholdLatchValueSet) {
+ mThresholdLatchValue = mThresholdValue;
+ }
+ return this;
+ }
+
+ Builder setThresholdLatchValue(float thresholdLatchValue) {
+ mThresholdLatchValue = thresholdLatchValue;
+ mThresholdLatchValueSet = true;
+ return this;
+ }
+
+ Builder setSensor(Sensor sensor) {
+ mSensor = sensor;
+ mSensorSet = true;
+ return this;
+ }
+
+ /**
+ * Creates a {@link ThresholdSensor} backed by a {@link ThresholdSensorImpl}.
+ */
+ public ThresholdSensor build() {
+ if (!mSensorSet) {
+ throw new IllegalStateException("A sensor was not successfully set.");
+ }
+
+ if (!mThresholdSet) {
+ throw new IllegalStateException("A threshold was not successfully set.");
+ }
+
+ if (mThresholdValue > mThresholdLatchValue) {
+ throw new IllegalStateException(
+ "Threshold must be less than or equal to Threshold Latch");
+ }
+
+ return new ThresholdSensorImpl(
+ mSensorManager, mSensor, mThresholdValue, mThresholdLatchValue, mSensorDelay);
+ }
+
+ private Sensor findSensorByType(String sensorType) {
+ if (sensorType.isEmpty()) {
+ return null;
+ }
+
+ List<Sensor> sensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL);
+ Sensor sensor = null;
+ for (Sensor s : sensorList) {
+ if (sensorType.equals(s.getStringType())) {
+ sensor = s;
+ break;
+ }
+ }
+
+ return sensor;
+ }
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
index b9ddff3a59ea..d107f646bb6b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
@@ -44,6 +44,7 @@ import static org.mockito.Mockito.when;
import android.content.res.Configuration;
import android.graphics.Insets;
+import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.VectorDrawable;
import android.hardware.display.DisplayManager;
@@ -193,6 +194,7 @@ public class ScreenDecorationsTest extends SysuiTestCase {
@Test
public void testRoundingRadius_NoCutout() {
final int testRadius = 1;
+ final Point testRadiusPoint = new Point(1, 1);
mContext.getOrCreateTestableResources().addOverride(
com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout, false);
mContext.getOrCreateTestableResources().addOverride(
@@ -209,9 +211,9 @@ public class ScreenDecorationsTest extends SysuiTestCase {
mScreenDecorations.start();
// Size of corner view should same as rounded_corner_radius{_top|_bottom}
- assertThat(mScreenDecorations.mRoundedDefault).isEqualTo(testRadius);
- assertThat(mScreenDecorations.mRoundedDefaultTop).isEqualTo(testRadius);
- assertThat(mScreenDecorations.mRoundedDefaultBottom).isEqualTo(testRadius);
+ assertThat(mScreenDecorations.mRoundedDefault).isEqualTo(testRadiusPoint);
+ assertThat(mScreenDecorations.mRoundedDefaultTop).isEqualTo(testRadiusPoint);
+ assertThat(mScreenDecorations.mRoundedDefaultBottom).isEqualTo(testRadiusPoint);
}
@Test
@@ -237,14 +239,18 @@ public class ScreenDecorationsTest extends SysuiTestCase {
mScreenDecorations.mOverlays[BOUNDS_POSITION_TOP].findViewById(R.id.left);
View rightRoundedCorner =
mScreenDecorations.mOverlays[BOUNDS_POSITION_TOP].findViewById(R.id.right);
- verify(mScreenDecorations, atLeastOnce()).setSize(leftRoundedCorner, testTopRadius);
- verify(mScreenDecorations, atLeastOnce()).setSize(rightRoundedCorner, testTopRadius);
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(leftRoundedCorner, new Point(testTopRadius, testTopRadius));
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(rightRoundedCorner, new Point(testTopRadius, testTopRadius));
leftRoundedCorner =
mScreenDecorations.mOverlays[BOUNDS_POSITION_BOTTOM].findViewById(R.id.left);
rightRoundedCorner =
mScreenDecorations.mOverlays[BOUNDS_POSITION_BOTTOM].findViewById(R.id.right);
- verify(mScreenDecorations, atLeastOnce()).setSize(leftRoundedCorner, testBottomRadius);
- verify(mScreenDecorations, atLeastOnce()).setSize(rightRoundedCorner, testBottomRadius);
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(leftRoundedCorner, new Point(testBottomRadius, testBottomRadius));
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(rightRoundedCorner, new Point(testBottomRadius, testBottomRadius));
}
@Test
@@ -276,20 +282,24 @@ public class ScreenDecorationsTest extends SysuiTestCase {
mScreenDecorations.mOverlays[BOUNDS_POSITION_LEFT].findViewById(R.id.left);
View rightRoundedCorner =
mScreenDecorations.mOverlays[BOUNDS_POSITION_LEFT].findViewById(R.id.right);
- verify(mScreenDecorations, atLeastOnce()).setSize(leftRoundedCorner, testTopRadius);
- verify(mScreenDecorations, atLeastOnce()).setSize(rightRoundedCorner, testBottomRadius);
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(leftRoundedCorner, new Point(testTopRadius, testTopRadius));
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(rightRoundedCorner, new Point(testBottomRadius, testBottomRadius));
leftRoundedCorner =
mScreenDecorations.mOverlays[BOUNDS_POSITION_RIGHT].findViewById(R.id.left);
rightRoundedCorner =
mScreenDecorations.mOverlays[BOUNDS_POSITION_RIGHT].findViewById(R.id.right);
- verify(mScreenDecorations, atLeastOnce()).setSize(leftRoundedCorner, testTopRadius);
- verify(mScreenDecorations, atLeastOnce()).setSize(rightRoundedCorner, testBottomRadius);
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(leftRoundedCorner, new Point(testTopRadius, testTopRadius));
+ verify(mScreenDecorations, atLeastOnce())
+ .setSize(rightRoundedCorner, new Point(testBottomRadius, testBottomRadius));
}
@Test
public void testRoundingMultipleRadius_NoCutout() {
final VectorDrawable d = (VectorDrawable) mContext.getDrawable(R.drawable.rounded);
- final int multipleRadiusSize = Math.max(d.getIntrinsicWidth(), d.getIntrinsicHeight());
+ final Point multipleRadiusSize = new Point(d.getIntrinsicWidth(), d.getIntrinsicHeight());
mContext.getOrCreateTestableResources().addOverride(
com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout, false);
@@ -600,14 +610,15 @@ public class ScreenDecorationsTest extends SysuiTestCase {
.addOverride(R.bool.config_roundedCornerMultipleRadius, false);
mScreenDecorations.start();
- assertEquals(mScreenDecorations.mRoundedDefault, 20);
+ assertEquals(mScreenDecorations.mRoundedDefault, new Point(20, 20));
mContext.getOrCreateTestableResources().addOverride(
com.android.internal.R.dimen.rounded_corner_radius, 5);
mScreenDecorations.onConfigurationChanged(null);
- assertEquals(mScreenDecorations.mRoundedDefault, 5);
+ assertEquals(mScreenDecorations.mRoundedDefault, new Point(5, 5));
}
+
@Test
public void testBoundingRectsToRegion() throws Exception {
Rect rect = new Rect(1, 2, 3, 4);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
index dd3a7858fd1f..b6cc2ee03f38 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
@@ -140,6 +140,10 @@ public abstract class SysuiTestCase {
return null;
}
+ protected FakeBroadcastDispatcher getFakeBroadcastDispatcher() {
+ return mFakeBroadcastDispatcher;
+ }
+
public SysuiTestableContext getContext() {
return mContext;
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java b/packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java
index ae7387996322..c3c9ecc23d59 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingManagerProxyTest.java
@@ -29,8 +29,8 @@ import androidx.test.filters.SmallTest;
import com.android.internal.logging.testing.UiEventLoggerFake;
import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.systemui.SysuiTestCase;
import com.android.systemui.classifier.brightline.BrightLineFalsingManager;
+import com.android.systemui.classifier.brightline.FalsingDataProvider;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dock.DockManagerFake;
import com.android.systemui.dump.DumpManager;
@@ -42,6 +42,8 @@ import com.android.systemui.util.DeviceConfigProxyFake;
import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.sensors.ProximitySensor;
import com.android.systemui.util.time.FakeSystemClock;
+import com.android.systemui.utils.leaks.FakeBatteryController;
+import com.android.systemui.utils.leaks.LeakCheckedTest;
import org.junit.After;
import org.junit.Before;
@@ -52,7 +54,7 @@ import org.mockito.MockitoAnnotations;
@SmallTest
@RunWith(AndroidTestingRunner.class)
-public class FalsingManagerProxyTest extends SysuiTestCase {
+public class FalsingManagerProxyTest extends LeakCheckedTest {
@Mock(stubOnly = true)
PluginManager mPluginManager;
@Mock(stubOnly = true)
@@ -62,7 +64,7 @@ public class FalsingManagerProxyTest extends SysuiTestCase {
@Mock DumpManager mDumpManager;
private FalsingManagerProxy mProxy;
private DeviceConfigProxy mDeviceConfig;
- private DisplayMetrics mDisplayMetrics = new DisplayMetrics();
+ private FalsingDataProvider mFalsingDataProvider;
private FakeExecutor mExecutor = new FakeExecutor(new FakeSystemClock());
private FakeExecutor mUiBgExecutor = new FakeExecutor(new FakeSystemClock());
private DockManager mDockManager = new DockManagerFake();
@@ -75,6 +77,8 @@ public class FalsingManagerProxyTest extends SysuiTestCase {
mDeviceConfig = new DeviceConfigProxyFake();
mDeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
BRIGHTLINE_FALSING_MANAGER_ENABLED, "false", false);
+ mFalsingDataProvider = new FalsingDataProvider(
+ new DisplayMetrics(), new FakeBatteryController(getLeakCheck()));
}
@After
@@ -86,9 +90,9 @@ public class FalsingManagerProxyTest extends SysuiTestCase {
@Test
public void test_brightLineFalsingManagerDisabled() {
- mProxy = new FalsingManagerProxy(getContext(), mPluginManager, mExecutor, mDisplayMetrics,
+ mProxy = new FalsingManagerProxy(getContext(), mPluginManager, mExecutor,
mProximitySensor, mDeviceConfig, mDockManager, mKeyguardUpdateMonitor,
- mDumpManager, mUiBgExecutor, mStatusBarStateController);
+ mDumpManager, mUiBgExecutor, mStatusBarStateController, mFalsingDataProvider);
assertThat(mProxy.getInternalFalsingManager(), instanceOf(FalsingManagerImpl.class));
}
@@ -97,17 +101,17 @@ public class FalsingManagerProxyTest extends SysuiTestCase {
mDeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
BRIGHTLINE_FALSING_MANAGER_ENABLED, "true", false);
mExecutor.runAllReady();
- mProxy = new FalsingManagerProxy(getContext(), mPluginManager, mExecutor, mDisplayMetrics,
+ mProxy = new FalsingManagerProxy(getContext(), mPluginManager, mExecutor,
mProximitySensor, mDeviceConfig, mDockManager, mKeyguardUpdateMonitor,
- mDumpManager, mUiBgExecutor, mStatusBarStateController);
+ mDumpManager, mUiBgExecutor, mStatusBarStateController, mFalsingDataProvider);
assertThat(mProxy.getInternalFalsingManager(), instanceOf(BrightLineFalsingManager.class));
}
@Test
public void test_brightLineFalsingManagerToggled() throws InterruptedException {
- mProxy = new FalsingManagerProxy(getContext(), mPluginManager, mExecutor, mDisplayMetrics,
+ mProxy = new FalsingManagerProxy(getContext(), mPluginManager, mExecutor,
mProximitySensor, mDeviceConfig, mDockManager, mKeyguardUpdateMonitor,
- mDumpManager, mUiBgExecutor, mStatusBarStateController);
+ mDumpManager, mUiBgExecutor, mStatusBarStateController, mFalsingDataProvider);
assertThat(mProxy.getInternalFalsingManager(), instanceOf(FalsingManagerImpl.class));
mDeviceConfig.setProperty(DeviceConfig.NAMESPACE_SYSTEMUI,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/BrightLineFalsingManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/BrightLineFalsingManagerTest.java
index b9cb499420ee..061664b4f6d4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/BrightLineFalsingManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/BrightLineFalsingManagerTest.java
@@ -17,6 +17,7 @@
package com.android.systemui.classifier.brightline;
import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
@@ -27,7 +28,6 @@ import android.util.DisplayMetrics;
import com.android.internal.logging.testing.UiEventLoggerFake;
import com.android.keyguard.KeyguardUpdateMonitor;
-import com.android.systemui.SysuiTestCase;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dock.DockManagerFake;
import com.android.systemui.statusbar.StatusBarState;
@@ -36,6 +36,9 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.util.DeviceConfigProxy;
import com.android.systemui.util.DeviceConfigProxyFake;
import com.android.systemui.util.sensors.ProximitySensor;
+import com.android.systemui.util.sensors.ThresholdSensor;
+import com.android.systemui.utils.leaks.FakeBatteryController;
+import com.android.systemui.utils.leaks.LeakCheckedTest;
import org.junit.Before;
import org.junit.Test;
@@ -46,7 +49,7 @@ import org.mockito.MockitoAnnotations;
@SmallTest
@RunWith(AndroidTestingRunner.class)
@TestableLooper.RunWithLooper
-public class BrightLineFalsingManagerTest extends SysuiTestCase {
+public class BrightLineFalsingManagerTest extends LeakCheckedTest {
@Mock
@@ -54,23 +57,26 @@ public class BrightLineFalsingManagerTest extends SysuiTestCase {
@Mock
private ProximitySensor mProximitySensor;
private SysuiStatusBarStateController mStatusBarStateController;
+ private FalsingDataProvider mFalsingDataProvider;
+ private FakeBatteryController mFakeBatteryController;
private BrightLineFalsingManager mFalsingManager;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
+ mFakeBatteryController = new FakeBatteryController(getLeakCheck());
DisplayMetrics dm = new DisplayMetrics();
dm.xdpi = 100;
dm.ydpi = 100;
dm.widthPixels = 100;
dm.heightPixels = 100;
- FalsingDataProvider falsingDataProvider = new FalsingDataProvider(dm);
+ mFalsingDataProvider = new FalsingDataProvider(dm, mFakeBatteryController);
DeviceConfigProxy deviceConfigProxy = new DeviceConfigProxyFake();
DockManager dockManager = new DockManagerFake();
mStatusBarStateController = new StatusBarStateControllerImpl(new UiEventLoggerFake());
mStatusBarStateController.setState(StatusBarState.KEYGUARD);
- mFalsingManager = new BrightLineFalsingManager(falsingDataProvider,
+ mFalsingManager = new BrightLineFalsingManager(mFalsingDataProvider,
mKeyguardUpdateMonitor, mProximitySensor, deviceConfigProxy, dockManager,
mStatusBarStateController);
}
@@ -78,7 +84,14 @@ public class BrightLineFalsingManagerTest extends SysuiTestCase {
@Test
public void testRegisterSensor() {
mFalsingManager.onScreenTurningOn();
- verify(mProximitySensor).register(any(ProximitySensor.ProximitySensorListener.class));
+ verify(mProximitySensor).register(any(ThresholdSensor.Listener.class));
+ }
+
+ @Test
+ public void testNoProximityWhenWirelessCharging() {
+ mFakeBatteryController.setWirelessCharging(true);
+ mFalsingManager.onScreenTurningOn();
+ verify(mProximitySensor, never()).register(any(ThresholdSensor.Listener.class));
}
@Test
@@ -86,7 +99,7 @@ public class BrightLineFalsingManagerTest extends SysuiTestCase {
mFalsingManager.onScreenTurningOn();
reset(mProximitySensor);
mFalsingManager.onScreenOff();
- verify(mProximitySensor).unregister(any(ProximitySensor.ProximitySensorListener.class));
+ verify(mProximitySensor).unregister(any(ThresholdSensor.Listener.class));
}
@Test
@@ -94,9 +107,9 @@ public class BrightLineFalsingManagerTest extends SysuiTestCase {
mFalsingManager.onScreenTurningOn();
reset(mProximitySensor);
mFalsingManager.setQsExpanded(true);
- verify(mProximitySensor).unregister(any(ProximitySensor.ProximitySensorListener.class));
+ verify(mProximitySensor).unregister(any(ThresholdSensor.Listener.class));
mFalsingManager.setQsExpanded(false);
- verify(mProximitySensor).register(any(ProximitySensor.ProximitySensorListener.class));
+ verify(mProximitySensor).register(any(ThresholdSensor.Listener.class));
}
@Test
@@ -104,9 +117,9 @@ public class BrightLineFalsingManagerTest extends SysuiTestCase {
mFalsingManager.onScreenTurningOn();
reset(mProximitySensor);
mFalsingManager.onBouncerShown();
- verify(mProximitySensor).unregister(any(ProximitySensor.ProximitySensorListener.class));
+ verify(mProximitySensor).unregister(any(ThresholdSensor.Listener.class));
mFalsingManager.onBouncerHidden();
- verify(mProximitySensor).register(any(ProximitySensor.ProximitySensorListener.class));
+ verify(mProximitySensor).register(any(ThresholdSensor.Listener.class));
}
@Test
@@ -114,6 +127,6 @@ public class BrightLineFalsingManagerTest extends SysuiTestCase {
mFalsingManager.onScreenTurningOn();
reset(mProximitySensor);
mStatusBarStateController.setState(StatusBarState.SHADE);
- verify(mProximitySensor).unregister(any(ProximitySensor.ProximitySensorListener.class));
+ verify(mProximitySensor).unregister(any(ThresholdSensor.Listener.class));
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ClassifierTest.java b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ClassifierTest.java
index 3ba5d1ac79ea..a4d198a14541 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ClassifierTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ClassifierTest.java
@@ -21,29 +21,30 @@ import static com.android.systemui.classifier.Classifier.UNLOCK;
import android.util.DisplayMetrics;
import android.view.MotionEvent;
-import com.android.systemui.SysuiTestCase;
+import com.android.systemui.utils.leaks.FakeBatteryController;
+import com.android.systemui.utils.leaks.LeakCheckedTest;
import org.junit.After;
-import org.junit.Before;
import java.util.ArrayList;
import java.util.List;
-public class ClassifierTest extends SysuiTestCase {
+public class ClassifierTest extends LeakCheckedTest {
private FalsingDataProvider mDataProvider;
private List<MotionEvent> mMotionEvents = new ArrayList<>();
private float mOffsetX = 0;
private float mOffsetY = 0;
+ private FakeBatteryController mFakeBatteryController;
- @Before
public void setup() {
DisplayMetrics displayMetrics = new DisplayMetrics();
displayMetrics.xdpi = 100;
displayMetrics.ydpi = 100;
displayMetrics.widthPixels = 1000;
displayMetrics.heightPixels = 1000;
- mDataProvider = new FalsingDataProvider(displayMetrics);
+ mFakeBatteryController = new FakeBatteryController(getLeakCheck());
+ mDataProvider = new FalsingDataProvider(displayMetrics, mFakeBatteryController);
mDataProvider.setInteractionType(UNLOCK);
}
@@ -56,6 +57,10 @@ public class ClassifierTest extends SysuiTestCase {
return mDataProvider;
}
+ FakeBatteryController getFakeBatteryController() {
+ return mFakeBatteryController;
+ }
+
void setOffsetX(float offsetX) {
mOffsetX = offsetX;
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/FalsingDataProviderTest.java b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/FalsingDataProviderTest.java
index 448c2f7b33ad..f13bc7379436 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/FalsingDataProviderTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/FalsingDataProviderTest.java
@@ -26,6 +26,8 @@ import android.view.MotionEvent;
import androidx.test.filters.SmallTest;
+import com.android.systemui.utils.leaks.FakeBatteryController;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -37,17 +39,19 @@ import java.util.List;
@RunWith(AndroidTestingRunner.class)
public class FalsingDataProviderTest extends ClassifierTest {
+ private FakeBatteryController mFakeBatteryController;
private FalsingDataProvider mDataProvider;
@Before
public void setup() {
super.setup();
+ mFakeBatteryController = new FakeBatteryController(getLeakCheck());
DisplayMetrics displayMetrics = new DisplayMetrics();
displayMetrics.xdpi = 100;
displayMetrics.ydpi = 100;
displayMetrics.widthPixels = 1000;
displayMetrics.heightPixels = 1000;
- mDataProvider = new FalsingDataProvider(displayMetrics);
+ mDataProvider = new FalsingDataProvider(displayMetrics, mFakeBatteryController);
}
@After
@@ -246,4 +250,12 @@ public class FalsingDataProviderTest extends ClassifierTest {
assertThat(mDataProvider.isUp(), is(false));
mDataProvider.onSessionEnd();
}
+
+ @Test
+ public void test_isWirelessCharging() {
+ assertThat(mDataProvider.isWirelessCharging(), is(false));
+
+ mFakeBatteryController.setWirelessCharging(true);
+ assertThat(mDataProvider.isWirelessCharging(), is(true));
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ProximityClassifierTest.java b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ProximityClassifierTest.java
index 5b32a39403cd..3cebf0d6af57 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ProximityClassifierTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ProximityClassifierTest.java
@@ -136,7 +136,8 @@ public class ProximityClassifierTest extends ClassifierTest {
motionEvent.recycle();
}
- private ProximitySensor.ProximityEvent createSensorEvent(boolean covered, long timestampMs) {
- return new ProximitySensor.ProximityEvent(covered, timestampMs * NS_PER_MS);
+ private ProximitySensor.ThresholdSensorEvent createSensorEvent(
+ boolean covered, long timestampMs) {
+ return new ProximitySensor.ThresholdSensorEvent(covered, timestampMs * NS_PER_MS);
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
index f535351f0f13..3ef60274cd76 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
@@ -18,7 +18,6 @@ package com.android.systemui.doze;
import static com.android.systemui.doze.DozeMachine.State.DOZE;
import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD;
-import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_DOCKED;
import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_PAUSED;
import static com.android.systemui.doze.DozeMachine.State.DOZE_AOD_PAUSING;
import static com.android.systemui.doze.DozeMachine.State.DOZE_PULSE_DONE;
@@ -41,6 +40,7 @@ import android.content.Intent;
import android.os.PowerManager;
import android.os.UserHandle;
import android.provider.Settings;
+import android.view.Display;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -89,6 +89,8 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
mSensor.getSensor(), mBroadcastDispatcher, mDozeHost, null /* handler */,
DEFAULT_BRIGHTNESS, SENSOR_TO_BRIGHTNESS, SENSOR_TO_OPACITY,
true /* debuggable */);
+
+ mScreen.onScreenState(Display.STATE_ON);
}
@Test
@@ -100,9 +102,10 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
}
@Test
- public void testAod_usesLightSensor() throws Exception {
+ public void testAod_usesLightSensor() {
mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+ mScreen.onScreenState(Display.STATE_DOZE);
mSensor.sendSensorEvent(3);
@@ -134,24 +137,10 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
}
@Test
- public void testPausingAod_doesntPauseLightSensor() throws Exception {
- mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
- mScreen.transitionTo(INITIALIZED, DOZE_AOD);
-
- mSensor.sendSensorEvent(1);
-
- mScreen.transitionTo(DOZE_AOD, DOZE_AOD_PAUSING);
- mScreen.transitionTo(DOZE_AOD_PAUSING, DOZE_AOD_PAUSED);
-
- mSensor.sendSensorEvent(2);
-
- assertEquals(2, mServiceFake.screenBrightness);
- }
-
- @Test
public void testPausingAod_doesNotResetBrightness() throws Exception {
mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+ mScreen.onScreenState(Display.STATE_DOZE);
mSensor.sendSensorEvent(1);
@@ -162,17 +151,6 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
}
@Test
- public void testPulsing_usesLightSensor() throws Exception {
- mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
- mScreen.transitionTo(INITIALIZED, DOZE);
- mScreen.transitionTo(DOZE, DOZE_REQUEST_PULSE);
-
- mSensor.sendSensorEvent(1);
-
- assertEquals(1, mServiceFake.screenBrightness);
- }
-
- @Test
public void testPulsing_withoutLightSensor_setsAoDDimmingScrimTransparent() throws Exception {
mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager,
null /* sensor */, mBroadcastDispatcher, mDozeHost, null /* handler */,
@@ -188,16 +166,6 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
}
@Test
- public void testDockedAod_usesLightSensor() {
- mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
- mScreen.transitionTo(INITIALIZED, DOZE_AOD_DOCKED);
-
- mSensor.sendSensorEvent(3);
-
- assertEquals(3, mServiceFake.screenBrightness);
- }
-
- @Test
public void testDozingAfterPulsing_pausesLightSensor() throws Exception {
mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
mScreen.transitionTo(INITIALIZED, DOZE);
@@ -205,6 +173,7 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
mScreen.transitionTo(DOZE_REQUEST_PULSE, DOZE_PULSING);
mScreen.transitionTo(DOZE_PULSING, DOZE_PULSE_DONE);
mScreen.transitionTo(DOZE_PULSE_DONE, DOZE);
+ mScreen.onScreenState(Display.STATE_DOZE);
mSensor.sendSensorEvent(1);
@@ -239,6 +208,7 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
public void testNonPositiveBrightness_keepsPreviousBrightnessAndScrim() throws Exception {
mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+ mScreen.onScreenState(Display.STATE_DOZE);
mSensor.sendSensorEvent(1);
mSensor.sendSensorEvent(0);
@@ -248,9 +218,10 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
}
@Test
- public void pausingAod_unblanksAfterSensor() throws Exception {
+ public void pausingAod_unblanksAfterSensor() {
mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+ mScreen.onScreenState(Display.STATE_DOZE);
mSensor.sendSensorEvent(2);
@@ -261,6 +232,7 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
reset(mDozeHost);
mScreen.transitionTo(DOZE_AOD_PAUSED, DOZE_AOD);
+ mScreen.onScreenState(Display.STATE_DOZE);
mSensor.sendSensorEvent(2);
verify(mDozeHost).setAodDimmingScrim(eq(0f));
}
@@ -269,6 +241,7 @@ public class DozeScreenBrightnessTest extends SysuiTestCase {
public void pausingAod_unblanksIfSensorWasAlwaysReady() throws Exception {
mScreen.transitionTo(UNINITIALIZED, INITIALIZED);
mScreen.transitionTo(INITIALIZED, DOZE_AOD);
+ mScreen.onScreenState(Display.STATE_DOZE);
mSensor.sendSensorEvent(2);
mScreen.transitionTo(DOZE_AOD, DOZE_AOD_PAUSING);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeSensorsTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeSensorsTest.java
index a5675360a57e..ebd2c3afe646 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeSensorsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeSensorsTest.java
@@ -23,7 +23,6 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyFloat;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -144,21 +143,6 @@ public class DozeSensorsTest extends SysuiTestCase {
}
@Test
- public void testSetPaused_doesntPause_sensors() {
- verify(mSensorManager, never()).registerListener(any(), any(Sensor.class), anyInt());
- mDozeSensors.setListening(true);
- verify(mTriggerSensor).setListening(eq(true));
-
- clearInvocations(mTriggerSensor);
- mDozeSensors.setPaused(true);
- verify(mTriggerSensor).setListening(eq(true));
-
- clearInvocations(mTriggerSensor);
- mDozeSensors.setListening(false);
- verify(mTriggerSensor).setListening(eq(false));
- }
-
- @Test
public void testDestroy() {
mDozeSensors.destroy();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
index 1cdc02fdd01a..655f933d28fe 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
@@ -34,6 +34,7 @@ import android.os.Handler;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
+import android.view.Display;
import androidx.test.filters.SmallTest;
@@ -41,10 +42,13 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dock.DockManager;
import com.android.systemui.statusbar.phone.DozeParameters;
+import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.sensors.AsyncSensorManager;
import com.android.systemui.util.sensors.FakeProximitySensor;
import com.android.systemui.util.sensors.FakeSensorManager;
+import com.android.systemui.util.sensors.FakeThresholdSensor;
import com.android.systemui.util.sensors.ProximitySensor;
+import com.android.systemui.util.time.FakeSystemClock;
import com.android.systemui.util.wakelock.WakeLock;
import com.android.systemui.util.wakelock.WakeLockFake;
@@ -72,10 +76,12 @@ public class DozeTriggersTest extends SysuiTestCase {
private DockManager mDockManager;
@Mock
private ProximitySensor.ProximityCheck mProximityCheck;
+
private DozeTriggers mTriggers;
private FakeSensorManager mSensors;
private Sensor mTapSensor;
private FakeProximitySensor mProximitySensor;
+ private FakeExecutor mExecutor = new FakeExecutor(new FakeSystemClock());
@Before
public void setUp() throws Exception {
@@ -87,7 +93,10 @@ public class DozeTriggersTest extends SysuiTestCase {
WakeLock wakeLock = new WakeLockFake();
AsyncSensorManager asyncSensorManager =
new AsyncSensorManager(mSensors, null, new Handler());
- mProximitySensor = new FakeProximitySensor(getContext().getResources(), asyncSensorManager);
+
+ FakeThresholdSensor thresholdSensor = new FakeThresholdSensor();
+ thresholdSensor.setLoaded(true);
+ mProximitySensor = new FakeProximitySensor(thresholdSensor, null, mExecutor);
mTriggers = new DozeTriggers(mContext, mMachine, mHost, mAlarmManager, config, parameters,
asyncSensorManager, wakeLock, true, mDockManager, mProximitySensor,
@@ -105,16 +114,17 @@ public class DozeTriggersTest extends SysuiTestCase {
mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE);
clearInvocations(mMachine);
- mProximitySensor.setLastEvent(new ProximitySensor.ProximityEvent(true, 1));
+ mProximitySensor.setLastEvent(new ProximitySensor.ThresholdSensorEvent(true, 1));
captor.getValue().onNotificationAlerted(null /* pulseSuppressedListener */);
mProximitySensor.alertListeners();
verify(mMachine, never()).requestState(any());
verify(mMachine, never()).requestPulse(anyInt());
- mProximitySensor.setLastEvent(new ProximitySensor.ProximityEvent(false, 2));
- captor.getValue().onNotificationAlerted(null /* pulseSuppressedListener */);
+ mProximitySensor.setLastEvent(new ProximitySensor.ThresholdSensorEvent(false, 2));
mProximitySensor.alertListeners();
+ waitForSensorManager();
+ captor.getValue().onNotificationAlerted(null /* pulseSuppressedListener */);
verify(mMachine).requestPulse(anyInt());
}
@@ -124,6 +134,7 @@ public class DozeTriggersTest extends SysuiTestCase {
when(mMachine.getState()).thenReturn(DozeMachine.State.DOZE);
mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE);
+ mTriggers.onScreenState(Display.STATE_OFF);
waitForSensorManager();
verify(mSensors).requestTriggerSensor(any(), eq(mTapSensor));
@@ -132,6 +143,7 @@ public class DozeTriggersTest extends SysuiTestCase {
DozeMachine.State.DOZE_REQUEST_PULSE);
mTriggers.transitionTo(DozeMachine.State.DOZE_REQUEST_PULSE,
DozeMachine.State.DOZE_PULSING);
+ mTriggers.onScreenState(Display.STATE_DOZE);
waitForSensorManager();
verify(mSensors).cancelTriggerSensor(any(), eq(mTapSensor));
@@ -144,10 +156,12 @@ public class DozeTriggersTest extends SysuiTestCase {
@Test
public void transitionToDockedAod_disablesTouchSensors() {
mTriggers.transitionTo(DozeMachine.State.INITIALIZED, DozeMachine.State.DOZE);
+ mTriggers.onScreenState(Display.STATE_OFF);
waitForSensorManager();
verify(mSensors).requestTriggerSensor(any(), eq(mTapSensor));
mTriggers.transitionTo(DozeMachine.State.DOZE, DozeMachine.State.DOZE_AOD_DOCKED);
+ mTriggers.onScreenState(Display.STATE_DOZE);
waitForSensorManager();
verify(mSensors).cancelTriggerSensor(any(), eq(mTapSensor));
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/AutoAddTrackerTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/AutoAddTrackerTest.java
index 61f5a7bdd3b7..de7abf866f6a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/AutoAddTrackerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/AutoAddTrackerTest.java
@@ -55,6 +55,7 @@ public class AutoAddTrackerTest extends SysuiTestCase {
Prefs.putBoolean(mContext, Key.QS_DATA_SAVER_ADDED, true);
Prefs.putBoolean(mContext, Key.QS_WORK_ADDED, true);
mAutoTracker = new AutoAddTracker(mContext, USER);
+ mAutoTracker.initialize();
assertTrue(mAutoTracker.isAdded(SAVER));
assertTrue(mAutoTracker.isAdded(WORK));
@@ -72,6 +73,7 @@ public class AutoAddTrackerTest extends SysuiTestCase {
@Test
public void testChangeFromBackup() {
mAutoTracker = new AutoAddTracker(mContext, USER);
+ mAutoTracker.initialize();
assertFalse(mAutoTracker.isAdded(SAVER));
@@ -86,6 +88,7 @@ public class AutoAddTrackerTest extends SysuiTestCase {
@Test
public void testSetAdded() {
mAutoTracker = new AutoAddTracker(mContext, USER);
+ mAutoTracker.initialize();
assertFalse(mAutoTracker.isAdded(SAVER));
mAutoTracker.setTileAdded(SAVER);
@@ -98,6 +101,7 @@ public class AutoAddTrackerTest extends SysuiTestCase {
@Test
public void testPersist() {
mAutoTracker = new AutoAddTracker(mContext, USER);
+ mAutoTracker.initialize();
assertFalse(mAutoTracker.isAdded(SAVER));
mAutoTracker.setTileAdded(SAVER);
@@ -113,6 +117,7 @@ public class AutoAddTrackerTest extends SysuiTestCase {
@Test
public void testIndependentUsers() {
mAutoTracker = new AutoAddTracker(mContext, USER);
+ mAutoTracker.initialize();
mAutoTracker.setTileAdded(SAVER);
mAutoTracker = new AutoAddTracker(mContext, USER + 1);
@@ -122,6 +127,7 @@ public class AutoAddTrackerTest extends SysuiTestCase {
@Test
public void testChangeUser() {
mAutoTracker = new AutoAddTracker(mContext, USER);
+ mAutoTracker.initialize();
mAutoTracker.setTileAdded(SAVER);
mAutoTracker = new AutoAddTracker(mContext, USER + 1);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java
index a5a5f81bdffe..90423c18216a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java
@@ -61,6 +61,7 @@ import com.android.internal.statusbar.NotificationVisibility;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.NotificationLifetimeExtender;
import com.android.systemui.statusbar.NotificationMediaManager;
@@ -98,6 +99,8 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
+import dagger.Lazy;
+
/**
* Unit tests for {@link NotificationEntryManager}. This test will not test any interactions with
* inflation. Instead, for functional inflation tests, see
@@ -126,6 +129,7 @@ public class NotificationEntryManagerTest extends SysuiTestCase {
@Mock private LeakDetector mLeakDetector;
@Mock private NotificationMediaManager mNotificationMediaManager;
@Mock private NotificationRowBinder mNotificationRowBinder;
+ @Mock private Lazy<BubbleController> mBubbleControllerLazy;
private int mId;
private NotificationEntry mEntry;
@@ -200,6 +204,7 @@ public class NotificationEntryManagerTest extends SysuiTestCase {
() -> mNotificationRowBinder,
() -> mRemoteInputManager,
mLeakDetector,
+ mBubbleControllerLazy,
mock(ForegroundServiceDismissalFeatureController.class)
);
mEntryManager.setUpWithPresenter(mPresenter);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java
index bedbec6aadce..787b7b7e7b26 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationEntryManagerInflationTest.java
@@ -43,6 +43,7 @@ import androidx.test.filters.SmallTest;
import com.android.internal.util.NotificationMessagingUtil;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.shared.plugins.PluginManager;
@@ -95,6 +96,8 @@ import org.mockito.stubbing.Answer;
import java.util.concurrent.CountDownLatch;
+import dagger.Lazy;
+
/**
* Functional tests for notification inflation from {@link NotificationEntryManager}.
*/
@@ -136,6 +139,8 @@ public class NotificationEntryManagerInflationTest extends SysuiTestCase {
@Mock private NotificationRowComponent.Builder mNotificationRowComponentBuilder;
@Mock private PeopleNotificationIdentifier mPeopleNotificationIdentifier;
+ @Mock private Lazy<BubbleController> mBubbleControllerLazy;
+
private StatusBarNotification mSbn;
private NotificationListenerService.RankingMap mRankingMap;
private NotificationEntryManager mEntryManager;
@@ -183,6 +188,7 @@ public class NotificationEntryManagerInflationTest extends SysuiTestCase {
() -> mRowBinder,
() -> mRemoteInputManager,
mLeakDetector,
+ mBubbleControllerLazy,
mock(ForegroundServiceDismissalFeatureController.class)
);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
index b286f9486e13..2ae4caeca963 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
@@ -52,6 +52,7 @@ import com.android.internal.logging.testing.UiEventLoggerFake;
import com.android.systemui.ExpandHelper;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.media.KeyguardMediaController;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
@@ -109,6 +110,8 @@ import org.mockito.junit.MockitoRule;
import java.util.ArrayList;
import java.util.List;
+import dagger.Lazy;
+
/**
* Tests for {@link NotificationStackScrollLayout}.
*/
@@ -140,6 +143,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
@Mock private NotificationSection mNotificationSection;
@Mock private NotificationLockscreenUserManager mLockscreenUserManager;
@Mock private FeatureFlags mFeatureFlags;
+ @Mock private Lazy<BubbleController> mBubbleControllerLazy;
private UserChangedListener mUserChangedListener;
private NotificationEntryManager mEntryManager;
private int mOriginalInterruptionModelSetting;
@@ -190,6 +194,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
() -> mock(NotificationRowBinder.class),
() -> mRemoteInputManager,
mock(LeakDetector.class),
+ mBubbleControllerLazy,
mock(ForegroundServiceDismissalFeatureController.class)
);
mEntryManager.setUpWithPresenter(mock(NotificationPresenter.class));
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java
index 0a959d11d7db..3ebb77a60e15 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java
@@ -18,7 +18,9 @@ package com.android.systemui.statusbar.phone;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -27,6 +29,7 @@ import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
@@ -54,7 +57,6 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.qs.AutoAddTracker;
import com.android.systemui.qs.QSTileHost;
import com.android.systemui.qs.SecureSetting;
-import com.android.systemui.statusbar.phone.AutoTileManagerTest.MyContextWrapper;
import com.android.systemui.statusbar.policy.CastController;
import com.android.systemui.statusbar.policy.CastController.CastDevice;
import com.android.systemui.statusbar.policy.DataSaverController;
@@ -110,13 +112,15 @@ public class AutoTileManagerTest extends SysuiTestCase {
TEST_SETTING_COMPONENT + SEPARATOR + TEST_CUSTOM_SPEC
}
);
+ mContext.getOrCreateTestableResources().addOverride(
+ com.android.internal.R.bool.config_nightDisplayAvailable, true);
when(mAutoAddTrackerBuilder.build()).thenReturn(mAutoAddTracker);
when(mQsTileHost.getUserContext()).thenReturn(mUserContext);
when(mUserContext.getUser()).thenReturn(UserHandle.of(USER));
- mAutoTileManager = createAutoTileManager(new
- MyContextWrapper(mContext));
+ mAutoTileManager = createAutoTileManager(new MyContextWrapper(mContext));
+ mAutoTileManager.init();
}
@After
@@ -124,17 +128,66 @@ public class AutoTileManagerTest extends SysuiTestCase {
mAutoTileManager.destroy();
}
- private AutoTileManager createAutoTileManager(Context context) {
- return new AutoTileManager(context, mAutoAddTrackerBuilder, mQsTileHost,
+ private AutoTileManager createAutoTileManager(
+ Context context,
+ AutoAddTracker.Builder autoAddTrackerBuilder,
+ HotspotController hotspotController,
+ DataSaverController dataSaverController,
+ ManagedProfileController managedProfileController,
+ NightDisplayListener nightDisplayListener,
+ CastController castController) {
+ return new AutoTileManager(context, autoAddTrackerBuilder, mQsTileHost,
Handler.createAsync(TestableLooper.get(this).getLooper()),
- mHotspotController,
- mDataSaverController,
- mManagedProfileController,
- mNightDisplayListener,
+ hotspotController,
+ dataSaverController,
+ managedProfileController,
+ nightDisplayListener,
+ castController);
+ }
+
+ private AutoTileManager createAutoTileManager(Context context) {
+ return createAutoTileManager(context, mAutoAddTrackerBuilder, mHotspotController,
+ mDataSaverController, mManagedProfileController, mNightDisplayListener,
mCastController);
}
@Test
+ public void testCreatedAutoTileManagerIsNotInitialized() {
+ AutoAddTracker.Builder builder = mock(AutoAddTracker.Builder.class, Answers.RETURNS_SELF);
+ AutoAddTracker tracker = mock(AutoAddTracker.class);
+ when(builder.build()).thenReturn(tracker);
+ HotspotController hC = mock(HotspotController.class);
+ DataSaverController dSC = mock(DataSaverController.class);
+ ManagedProfileController mPC = mock(ManagedProfileController.class);
+ NightDisplayListener nDS = mock(NightDisplayListener.class);
+ CastController cC = mock(CastController.class);
+
+ AutoTileManager manager =
+ createAutoTileManager(mock(Context.class), builder, hC, dSC, mPC, nDS, cC);
+
+ verify(tracker, never()).initialize();
+ verify(hC, never()).addCallback(any());
+ verify(dSC, never()).addCallback(any());
+ verify(mPC, never()).addCallback(any());
+ verify(nDS, never()).setCallback(any());
+ verify(cC, never()).addCallback(any());
+ assertNull(manager.getSecureSettingForKey(TEST_SETTING));
+ assertNull(manager.getSecureSettingForKey(TEST_SETTING_COMPONENT));
+ }
+
+ @Test
+ public void testChangeUserWhenNotInitializedThrows() {
+ AutoTileManager manager = createAutoTileManager(mock(Context.class));
+
+ try {
+ manager.changeUser(UserHandle.of(USER + 1));
+ fail();
+ } catch (Exception e) {
+ // This should throw and take this path
+ }
+ }
+
+ @Test
public void testChangeUserCallbacksStoppedAndStarted() throws Exception {
TestableLooper.get(this).runWithLooper(() ->
mAutoTileManager.changeUser(UserHandle.of(USER + 1))
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
index a927c8011b8f..64907eef2dd0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
@@ -136,6 +136,8 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
anyFloat());
assertThat(mBiometricUnlockController.getMode())
.isEqualTo(BiometricUnlockController.MODE_SHOW_BOUNCER);
+ assertThat(mBiometricUnlockController.getBiometricType())
+ .isEqualTo(BiometricSourceType.FINGERPRINT);
}
@Test
@@ -268,6 +270,8 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
verify(mStatusBarKeyguardViewManager).notifyKeyguardAuthenticated(eq(false));
assertThat(mBiometricUnlockController.getMode())
.isEqualTo(BiometricUnlockController.MODE_DISMISS_BOUNCER);
+ assertThat(mBiometricUnlockController.getBiometricType())
+ .isEqualTo(BiometricSourceType.FACE);
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LightsOutNotifControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LightsOutNotifControllerTest.java
index dbb451277535..9d81a90e7af1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LightsOutNotifControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LightsOutNotifControllerTest.java
@@ -130,7 +130,7 @@ public class LightsOutNotifControllerTest extends SysuiTestCase {
@Test
public void testLightsOut_withNotifs_onSystemBarAppearanceChanged() {
// GIVEN active visible notifications
- when(mEntryManager.hasActiveNotifications()).thenReturn(true);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(true);
// WHEN lights out
mCallbacks.onSystemBarAppearanceChanged(
@@ -147,7 +147,7 @@ public class LightsOutNotifControllerTest extends SysuiTestCase {
@Test
public void testLightsOut_withoutNotifs_onSystemBarAppearanceChanged() {
// GIVEN no active visible notifications
- when(mEntryManager.hasActiveNotifications()).thenReturn(false);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(false);
// WHEN lights out
mCallbacks.onSystemBarAppearanceChanged(
@@ -164,7 +164,7 @@ public class LightsOutNotifControllerTest extends SysuiTestCase {
@Test
public void testLightsOn_afterLightsOut_onSystemBarAppearanceChanged() {
// GIVEN active visible notifications
- when(mEntryManager.hasActiveNotifications()).thenReturn(true);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(true);
// WHEN lights on
mCallbacks.onSystemBarAppearanceChanged(
@@ -181,13 +181,13 @@ public class LightsOutNotifControllerTest extends SysuiTestCase {
@Test
public void testEntryAdded() {
// GIVEN no visible notifications and lights out
- when(mEntryManager.hasActiveNotifications()).thenReturn(false);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(false);
mLightsOutNotifController.mAppearance = LIGHTS_OUT;
mLightsOutNotifController.updateLightsOutView();
assertIsShowingDot(false);
// WHEN an active notification is added
- when(mEntryManager.hasActiveNotifications()).thenReturn(true);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(true);
assertTrue(mLightsOutNotifController.shouldShowDot());
mEntryListener.onNotificationAdded(mock(NotificationEntry.class));
@@ -198,13 +198,13 @@ public class LightsOutNotifControllerTest extends SysuiTestCase {
@Test
public void testEntryRemoved() {
// GIVEN a visible notification and lights out
- when(mEntryManager.hasActiveNotifications()).thenReturn(true);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(true);
mLightsOutNotifController.mAppearance = LIGHTS_OUT;
mLightsOutNotifController.updateLightsOutView();
assertIsShowingDot(true);
// WHEN all active notifications are removed
- when(mEntryManager.hasActiveNotifications()).thenReturn(false);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(false);
assertFalse(mLightsOutNotifController.shouldShowDot());
mEntryListener.onEntryRemoved(
mock(NotificationEntry.class), null, false, REASON_CANCEL_ALL);
@@ -216,13 +216,13 @@ public class LightsOutNotifControllerTest extends SysuiTestCase {
@Test
public void testEntryUpdated() {
// GIVEN no visible notifications and lights out
- when(mEntryManager.hasActiveNotifications()).thenReturn(false);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(false);
mLightsOutNotifController.mAppearance = LIGHTS_OUT;
mLightsOutNotifController.updateLightsOutView();
assertIsShowingDot(false);
// WHEN an active notification is added
- when(mEntryManager.hasActiveNotifications()).thenReturn(true);
+ when(mEntryManager.hasVisibleNotifications()).thenReturn(true);
assertTrue(mLightsOutNotifController.shouldShowDot());
mEntryListener.onPostEntryUpdated(mock(NotificationEntry.class));
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeProximitySensor.java b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeProximitySensor.java
index bd697fe394b5..9bb4c4b08481 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeProximitySensor.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeProximitySensor.java
@@ -16,14 +16,16 @@
package com.android.systemui.util.sensors;
-import android.content.res.Resources;
+import com.android.systemui.util.concurrency.DelayableExecutor;
public class FakeProximitySensor extends ProximitySensor {
private boolean mAvailable;
private boolean mRegistered;
- public FakeProximitySensor(Resources resources, AsyncSensorManager sensorManager) {
- super(resources, sensorManager);
+ public FakeProximitySensor(ThresholdSensor primary, ThresholdSensor secondary,
+ DelayableExecutor delayableExecutor) {
+ super(primary, secondary == null ? new FakeThresholdSensor() : secondary,
+ delayableExecutor);
mAvailable = true;
}
@@ -31,7 +33,7 @@ public class FakeProximitySensor extends ProximitySensor {
mAvailable = available;
}
- public void setLastEvent(ProximityEvent event) {
+ public void setLastEvent(ThresholdSensorEvent event) {
mLastEvent = event;
}
@@ -41,7 +43,7 @@ public class FakeProximitySensor extends ProximitySensor {
}
@Override
- public boolean getSensorAvailable() {
+ public boolean isLoaded() {
return mAvailable;
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeThresholdSensor.java b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeThresholdSensor.java
new file mode 100644
index 000000000000..d9f978944cde
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/FakeThresholdSensor.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FakeThresholdSensor implements ThresholdSensor {
+ private boolean mIsLoaded;
+ private boolean mPaused;
+ private List<Listener> mListeners = new ArrayList<>();
+
+ public FakeThresholdSensor() {
+ }
+
+ public void setTag(String tag) {
+ }
+
+ @Override
+ public void setDelay(int delay) {
+ }
+
+ @Override
+ public boolean isLoaded() {
+ return mIsLoaded;
+ }
+
+ @Override
+ public void pause() {
+ mPaused = true;
+ }
+
+ @Override
+ public void resume() {
+ mPaused = false;
+ }
+
+ @Override
+ public void register(ThresholdSensor.Listener listener) {
+ mListeners.add(listener);
+ }
+
+ @Override
+ public void unregister(ThresholdSensor.Listener listener) {
+ mListeners.remove(listener);
+ }
+
+ public void setLoaded(boolean loaded) {
+ mIsLoaded = loaded;
+ }
+
+ void triggerEvent(boolean below, long timestampNs) {
+ if (!mPaused) {
+ for (Listener listener : mListeners) {
+ listener.onThresholdCrossed(new ThresholdSensorEvent(below, timestampNs));
+ }
+ }
+ }
+
+ boolean isPaused() {
+ return mPaused;
+ }
+
+ int getNumListeners() {
+ return mListeners.size();
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximityCheckTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximityCheckTest.java
index dae6b284ff15..c5a197eef2d4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximityCheckTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximityCheckTest.java
@@ -16,17 +16,18 @@
package com.android.systemui.util.sensors;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import android.os.Handler;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.util.Assert;
import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.time.FakeSystemClock;
@@ -50,9 +51,10 @@ public class ProximityCheckTest extends SysuiTestCase {
@Before
public void setUp() throws Exception {
- AsyncSensorManager asyncSensorManager =
- new AsyncSensorManager(new FakeSensorManager(mContext), null, new Handler());
- mFakeProximitySensor = new FakeProximitySensor(mContext.getResources(), asyncSensorManager);
+ Assert.setTestableLooper(TestableLooper.get(this).getLooper());
+ FakeThresholdSensor thresholdSensor = new FakeThresholdSensor();
+ thresholdSensor.setLoaded(true);
+ mFakeProximitySensor = new FakeProximitySensor(thresholdSensor, null, mFakeExecutor);
mProximityCheck = new ProximitySensor.ProximityCheck(mFakeProximitySensor, mFakeExecutor);
}
@@ -63,7 +65,7 @@ public class ProximityCheckTest extends SysuiTestCase {
assertNull(mTestableCallback.mLastResult);
- mFakeProximitySensor.setLastEvent(new ProximitySensor.ProximityEvent(true, 0));
+ mFakeProximitySensor.setLastEvent(new ProximitySensor.ThresholdSensorEvent(true, 0));
mFakeProximitySensor.alertListeners();
assertTrue(mTestableCallback.mLastResult);
@@ -79,13 +81,15 @@ public class ProximityCheckTest extends SysuiTestCase {
mFakeExecutor.runAllReady();
assertFalse(mFakeProximitySensor.isRegistered());
+ assertEquals(1, mTestableCallback.mNumCalls);
+ assertNull(mTestableCallback.mLastResult);
}
@Test
public void testProxDoesntCancelOthers() {
assertFalse(mFakeProximitySensor.isRegistered());
// We don't need our "other" listener to do anything. Just ensure our sensor is registered.
- ProximitySensor.ProximitySensorListener emptyListener = event -> { };
+ ThresholdSensor.Listener emptyListener = event -> { };
mFakeProximitySensor.register(emptyListener);
assertTrue(mFakeProximitySensor.isRegistered());
@@ -94,7 +98,7 @@ public class ProximityCheckTest extends SysuiTestCase {
assertNull(mTestableCallback.mLastResult);
- mFakeProximitySensor.setLastEvent(new ProximitySensor.ProximityEvent(true, 0));
+ mFakeProximitySensor.setLastEvent(new ProximitySensor.ThresholdSensorEvent(true, 0));
mFakeProximitySensor.alertListeners();
assertTrue(mTestableCallback.mLastResult);
@@ -109,9 +113,12 @@ public class ProximityCheckTest extends SysuiTestCase {
private static class TestableCallback implements Consumer<Boolean> {
Boolean mLastResult;
+ int mNumCalls = 0;
+
@Override
public void accept(Boolean result) {
mLastResult = result;
+ mNumCalls++;
}
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorDualTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorDualTest.java
new file mode 100644
index 000000000000..bae1d98aa310
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorDualTest.java
@@ -0,0 +1,364 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+import com.android.systemui.util.concurrency.FakeExecutor;
+import com.android.systemui.util.time.FakeSystemClock;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.MockitoAnnotations;
+
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+public class ProximitySensorDualTest extends SysuiTestCase {
+ private ProximitySensor mProximitySensor;
+ private FakeExecutor mFakeExecutor = new FakeExecutor(new FakeSystemClock());
+ private FakeThresholdSensor mThresholdSensorPrimary;
+ private FakeThresholdSensor mThresholdSensorSecondary;
+
+ @Before
+ public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
+ allowTestableLooperAsMainThread();
+ mThresholdSensorPrimary = new FakeThresholdSensor();
+ mThresholdSensorPrimary.setLoaded(true);
+ mThresholdSensorSecondary = new FakeThresholdSensor();
+ mThresholdSensorSecondary.setLoaded(true);
+
+ mProximitySensor = new ProximitySensor(
+ mThresholdSensorPrimary, mThresholdSensorSecondary, mFakeExecutor);
+ }
+
+ @Test
+ public void testSingleListener() {
+ TestableListener listener = new TestableListener();
+
+ assertFalse(mProximitySensor.isRegistered());
+ mProximitySensor.register(listener);
+ assertTrue(mProximitySensor.isRegistered());
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ // Trigger second sensor. Nothing should happen yet.
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ // Trigger first sensor. Our second sensor is now registered.
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertFalse(mThresholdSensorSecondary.isPaused());
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ // Trigger second sensor.
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertFalse(mThresholdSensorSecondary.isPaused());
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ mProximitySensor.unregister(listener);
+ }
+
+ @Test
+ public void testSecondaryPausing() {
+ TestableListener listener = new TestableListener();
+
+ assertFalse(mProximitySensor.isRegistered());
+ mProximitySensor.register(listener);
+ assertTrue(mProximitySensor.isRegistered());
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ // Trigger first sensor. Our second sensor is now registered.
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ // Trigger second sensor. Second sensor remains registered.
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+ assertFalse(mThresholdSensorSecondary.isPaused());
+
+ // Triggering above should pause.
+ mThresholdSensorSecondary.triggerEvent(false, 0);
+ assertFalse(listener.mLastEvent.getBelow());
+ assertEquals(2, listener.mCallCount);
+ assertTrue(mThresholdSensorSecondary.isPaused());
+
+ // Advance time. Second sensor should resume.
+ mFakeExecutor.advanceClockToNext();
+ mFakeExecutor.runNextReady();
+ assertFalse(mThresholdSensorSecondary.isPaused());
+
+ mProximitySensor.unregister(listener);
+ }
+
+ @Test
+ public void testUnregister() {
+ TestableListener listener = new TestableListener();
+
+ assertFalse(mProximitySensor.isRegistered());
+ mProximitySensor.register(listener);
+ assertTrue(mProximitySensor.isRegistered());
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertNull(listener.mLastEvent);
+
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertFalse(mThresholdSensorSecondary.isPaused());
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ mProximitySensor.unregister(listener);
+ assertTrue(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertFalse(mProximitySensor.isRegistered());
+ }
+
+ @Test
+ public void testUnregisterDuringCallback() {
+ ThresholdSensor.Listener listenerA = event -> mProximitySensor.pause();
+ TestableListener listenerB = new TestableListener();
+
+ assertFalse(mProximitySensor.isRegistered());
+ mProximitySensor.register(listenerA);
+ mProximitySensor.register(listenerB);
+ assertTrue(mProximitySensor.isRegistered());
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertNull(listenerB.mLastEvent);
+
+ // listenerA will pause the proximity sensor, unregistering it.
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertTrue(listenerB.mLastEvent.getBelow());
+ assertEquals(1, listenerB.mCallCount);
+
+
+ // A second call to trigger it should be ignored.
+ mThresholdSensorSecondary.triggerEvent(false, 0);
+ assertTrue(listenerB.mLastEvent.getBelow());
+ assertEquals(1, listenerB.mCallCount);
+ }
+
+ @Test
+ public void testPauseAndResume() {
+ TestableListener listener = new TestableListener();
+
+ assertFalse(mProximitySensor.isRegistered());
+ mProximitySensor.register(listener);
+ assertTrue(mProximitySensor.isRegistered());
+ assertNull(listener.mLastEvent);
+
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertFalse(mThresholdSensorSecondary.isPaused());
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ mProximitySensor.pause();
+ assertFalse(mProximitySensor.isRegistered());
+ assertTrue(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+
+ // More events do nothing when paused.
+ mThresholdSensorSecondary.triggerEvent(false, 1);
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ mProximitySensor.resume();
+ assertTrue(mProximitySensor.isRegistered());
+ // Still matches our previous call
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ // Need to trigger the primary sensor before the secondary re-registers itself.
+ mThresholdSensorPrimary.triggerEvent(true, 3);
+ mThresholdSensorSecondary.triggerEvent(false, 3);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertFalse(listener.mLastEvent.getBelow());
+ assertEquals(2, listener.mCallCount);
+
+ mProximitySensor.unregister(listener);
+ assertFalse(mProximitySensor.isRegistered());
+ }
+
+ @Test
+ public void testPrimarySecondaryDisagreement() {
+ TestableListener listener = new TestableListener();
+
+ mProximitySensor.register(listener);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ // Trigger our sensors with different values. Secondary overrides primary.
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+ mThresholdSensorSecondary.triggerEvent(false, 0);
+ assertFalse(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ mThresholdSensorSecondary.resume();
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(2, listener.mCallCount);
+
+ mThresholdSensorSecondary.resume();
+ mThresholdSensorSecondary.triggerEvent(false, 0);
+ assertFalse(listener.mLastEvent.getBelow());
+ assertEquals(3, listener.mCallCount);
+
+ mProximitySensor.unregister(listener);
+ }
+
+ @Test
+ public void testPrimaryCancelsSecondary() {
+ TestableListener listener = new TestableListener();
+
+ mProximitySensor.register(listener);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ // When the primary reports false, the secondary is no longer needed. We get an immediate
+ // report.
+ mThresholdSensorPrimary.triggerEvent(false, 1);
+ assertFalse(listener.mLastEvent.getBelow());
+ assertEquals(2, listener.mCallCount);
+
+ // The secondary is now ignored. No more work is scheduled.
+ mFakeExecutor.advanceClockToNext();
+ mFakeExecutor.runNextReady();
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertFalse(listener.mLastEvent.getBelow());
+ assertEquals(2, listener.mCallCount);
+ assertEquals(0, mFakeExecutor.numPending());
+
+ mProximitySensor.unregister(listener);
+ }
+
+ @Test
+ public void testSecondaryCancelsSecondary() {
+ TestableListener listener = new TestableListener();
+ ThresholdSensor.Listener cancelingListener = new ThresholdSensor.Listener() {
+ @Override
+ public void onThresholdCrossed(ThresholdSensor.ThresholdSensorEvent event) {
+ mProximitySensor.pause();
+ }
+ };
+
+ mProximitySensor.register(listener);
+ mProximitySensor.register(cancelingListener);
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ // The proximity sensor should now be canceled. Advancing the clock should do nothing.
+ assertEquals(0, mFakeExecutor.numPending());
+ mThresholdSensorSecondary.triggerEvent(false, 1);
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ mProximitySensor.unregister(listener);
+ }
+
+ @Test
+ public void testSecondarySafe() {
+ mProximitySensor.setSecondarySafe(true);
+
+ TestableListener listener = new TestableListener();
+
+ mProximitySensor.register(listener);
+ assertFalse(mThresholdSensorPrimary.isPaused());
+ assertTrue(mThresholdSensorSecondary.isPaused());
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+
+ mThresholdSensorPrimary.triggerEvent(true, 0);
+ assertNull(listener.mLastEvent);
+ assertEquals(0, listener.mCallCount);
+ mThresholdSensorSecondary.triggerEvent(true, 0);
+ assertTrue(listener.mLastEvent.getBelow());
+ assertEquals(1, listener.mCallCount);
+
+ // The secondary sensor should now remain resumed indefinitely.
+ assertFalse(mThresholdSensorSecondary.isPaused());
+ mThresholdSensorPrimary.triggerEvent(false, 1);
+ assertFalse(listener.mLastEvent.getBelow());
+ assertEquals(2, listener.mCallCount);
+
+ // The secondary is still running, and not polling with the executor.
+ assertFalse(mThresholdSensorSecondary.isPaused());
+ assertEquals(0, mFakeExecutor.numPending());
+
+ mProximitySensor.unregister(listener);
+ }
+
+ private static class TestableListener implements ThresholdSensor.Listener {
+ ThresholdSensor.ThresholdSensorEvent mLastEvent;
+ int mCallCount = 0;
+
+ @Override
+ public void onThresholdCrossed(ThresholdSensor.ThresholdSensorEvent proximityEvent) {
+ mLastEvent = proximityEvent;
+ mCallCount++;
+ }
+ };
+
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorTest.java
deleted file mode 100644
index 914790b53a82..000000000000
--- a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ProximitySensorTest.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (C) 2019 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.util.sensors;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Handler;
-import android.testing.AndroidTestingRunner;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@SmallTest
-@RunWith(AndroidTestingRunner.class)
-@TestableLooper.RunWithLooper
-public class ProximitySensorTest extends SysuiTestCase {
-
- private ProximitySensor mProximitySensor;
- private FakeSensorManager.FakeProximitySensor mFakeProximitySensor;
-
- @Before
- public void setUp() throws Exception {
- FakeSensorManager sensorManager = new FakeSensorManager(getContext());
- AsyncSensorManager asyncSensorManager = new AsyncSensorManager(
- sensorManager, null, new Handler());
- mFakeProximitySensor = sensorManager.getFakeProximitySensor();
- mProximitySensor = new ProximitySensor(getContext().getResources(), asyncSensorManager);
- }
-
- @Test
- public void testSingleListener() {
- TestableListener listener = new TestableListener();
-
- assertFalse(mProximitySensor.isRegistered());
- mProximitySensor.register(listener);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- assertNull(listener.mLastEvent);
-
- mFakeProximitySensor.sendProximityResult(true);
- assertFalse(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 1);
- mFakeProximitySensor.sendProximityResult(false);
- assertTrue(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 2);
-
- mProximitySensor.unregister(listener);
- waitForSensorManager();
- }
-
- @Test
- public void testMultiListener() {
- TestableListener listenerA = new TestableListener();
- TestableListener listenerB = new TestableListener();
-
- assertFalse(mProximitySensor.isRegistered());
-
- mProximitySensor.register(listenerA);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- mProximitySensor.register(listenerB);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- assertNull(listenerA.mLastEvent);
- assertNull(listenerB.mLastEvent);
-
- mFakeProximitySensor.sendProximityResult(true);
- assertFalse(listenerA.mLastEvent.getNear());
- assertFalse(listenerB.mLastEvent.getNear());
- assertEquals(listenerA.mCallCount, 1);
- assertEquals(listenerB.mCallCount, 1);
- mFakeProximitySensor.sendProximityResult(false);
- assertTrue(listenerA.mLastEvent.getNear());
- assertTrue(listenerB.mLastEvent.getNear());
- assertEquals(listenerA.mCallCount, 2);
- assertEquals(listenerB.mCallCount, 2);
-
- mProximitySensor.unregister(listenerA);
- mProximitySensor.unregister(listenerB);
- waitForSensorManager();
- }
-
- @Test
- public void testDuplicateListener() {
- TestableListener listenerA = new TestableListener();
-
- assertFalse(mProximitySensor.isRegistered());
-
- mProximitySensor.register(listenerA);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- mProximitySensor.register(listenerA);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- assertNull(listenerA.mLastEvent);
-
- mFakeProximitySensor.sendProximityResult(true);
- assertFalse(listenerA.mLastEvent.getNear());
- assertEquals(listenerA.mCallCount, 1);
- mFakeProximitySensor.sendProximityResult(false);
- assertTrue(listenerA.mLastEvent.getNear());
- assertEquals(listenerA.mCallCount, 2);
-
- mProximitySensor.unregister(listenerA);
- waitForSensorManager();
- }
- @Test
- public void testUnregister() {
- TestableListener listener = new TestableListener();
-
- assertFalse(mProximitySensor.isRegistered());
- mProximitySensor.register(listener);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- assertNull(listener.mLastEvent);
-
- mFakeProximitySensor.sendProximityResult(true);
- assertFalse(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 1);
-
- mProximitySensor.unregister(listener);
- waitForSensorManager();
- assertFalse(mProximitySensor.isRegistered());
- }
-
- @Test
- public void testPauseAndResume() {
- TestableListener listener = new TestableListener();
-
- assertFalse(mProximitySensor.isRegistered());
- mProximitySensor.register(listener);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- assertNull(listener.mLastEvent);
-
- mFakeProximitySensor.sendProximityResult(true);
- assertFalse(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 1);
-
- mProximitySensor.pause();
- waitForSensorManager();
- assertFalse(mProximitySensor.isRegistered());
-
- // More events do nothing when paused.
- mFakeProximitySensor.sendProximityResult(true);
- assertFalse(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 1);
- mFakeProximitySensor.sendProximityResult(false);
- assertFalse(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 1);
-
- mProximitySensor.resume();
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- // Still matches our previous call
- assertFalse(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 1);
-
- mFakeProximitySensor.sendProximityResult(true);
- assertFalse(listener.mLastEvent.getNear());
- assertEquals(listener.mCallCount, 2);
-
- mProximitySensor.unregister(listener);
- waitForSensorManager();
- assertFalse(mProximitySensor.isRegistered());
- }
-
- @Test
- public void testAlertListeners() {
- TestableListener listenerA = new TestableListener();
- TestableListener listenerB = new TestableListener();
-
- assertFalse(mProximitySensor.isRegistered());
-
- mProximitySensor.register(listenerA);
- mProximitySensor.register(listenerB);
- waitForSensorManager();
- assertTrue(mProximitySensor.isRegistered());
- assertNull(listenerA.mLastEvent);
- assertNull(listenerB.mLastEvent);
-
- mProximitySensor.alertListeners();
- assertNull(listenerA.mLastEvent);
- assertEquals(listenerA.mCallCount, 1);
- assertNull(listenerB.mLastEvent);
- assertEquals(listenerB.mCallCount, 1);
-
- mFakeProximitySensor.sendProximityResult(false);
- assertTrue(listenerA.mLastEvent.getNear());
- assertEquals(listenerA.mCallCount, 2);
- assertTrue(listenerB.mLastEvent.getNear());
- assertEquals(listenerB.mCallCount, 2);
-
- mProximitySensor.unregister(listenerA);
- mProximitySensor.unregister(listenerB);
- waitForSensorManager();
- }
-
- @Test
- public void testPreventRecursiveAlert() {
- TestableListener listenerA = new TestableListener() {
- @Override
- public void onSensorEvent(ProximitySensor.ProximityEvent proximityEvent) {
- super.onSensorEvent(proximityEvent);
- if (mCallCount < 2) {
- mProximitySensor.alertListeners();
- }
- }
- };
-
- mProximitySensor.register(listenerA);
-
- mProximitySensor.alertListeners();
-
- assertEquals(1, listenerA.mCallCount);
- }
-
-
- class TestableListener implements ProximitySensor.ProximitySensorListener {
- ProximitySensor.ProximityEvent mLastEvent;
- int mCallCount = 0;
-
- @Override
- public void onSensorEvent(ProximitySensor.ProximityEvent proximityEvent) {
- mLastEvent = proximityEvent;
- mCallCount++;
- }
-
- void reset() {
- mLastEvent = null;
- mCallCount = 0;
- }
- };
-
- private void waitForSensorManager() {
- TestableLooper.get(this).processAllMessages();
- }
-
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ThresholdSensorImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ThresholdSensorImplTest.java
new file mode 100644
index 000000000000..8ba7d62ba843
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/sensors/ThresholdSensorImplTest.java
@@ -0,0 +1,313 @@
+/*
+ * Copyright (C) 2020 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.util.sensors;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import android.os.Handler;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper
+public class ThresholdSensorImplTest extends SysuiTestCase {
+
+ private ThresholdSensorImpl mThresholdSensor;
+ private FakeSensorManager mSensorManager;
+ private AsyncSensorManager mAsyncSensorManager;
+ private FakeSensorManager.FakeProximitySensor mFakeProximitySensor;
+
+ @Before
+ public void setUp() throws Exception {
+ allowTestableLooperAsMainThread();
+ mSensorManager = new FakeSensorManager(getContext());
+
+ mAsyncSensorManager = new AsyncSensorManager(
+ mSensorManager, null, new Handler());
+
+ mFakeProximitySensor = mSensorManager.getFakeProximitySensor();
+ ThresholdSensorImpl.Builder thresholdSensorBuilder = new ThresholdSensorImpl.Builder(
+ null, mAsyncSensorManager);
+ mThresholdSensor = (ThresholdSensorImpl) thresholdSensorBuilder
+ .setSensor(mFakeProximitySensor.getSensor())
+ .setThresholdValue(mFakeProximitySensor.getSensor().getMaximumRange())
+ .build();
+ }
+
+ @Test
+ public void testSingleListener() {
+ TestableListener listener = new TestableListener();
+
+ assertFalse(mThresholdSensor.isRegistered());
+ mThresholdSensor.register(listener);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ assertEquals(0, listener.mCallCount);
+
+ mFakeProximitySensor.sendProximityResult(true);
+ assertFalse(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+ mFakeProximitySensor.sendProximityResult(false);
+ assertTrue(listener.mBelow);
+ assertEquals(2, listener.mCallCount);
+
+ mThresholdSensor.unregister(listener);
+ waitForSensorManager();
+ }
+
+ @Test
+ public void testMultiListener() {
+ TestableListener listenerA = new TestableListener();
+ TestableListener listenerB = new TestableListener();
+
+ assertFalse(mThresholdSensor.isRegistered());
+
+ mThresholdSensor.register(listenerA);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ mThresholdSensor.register(listenerB);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ assertEquals(0, listenerA.mCallCount);
+ assertEquals(0, listenerB.mCallCount);
+
+
+ mFakeProximitySensor.sendProximityResult(true);
+ assertFalse(listenerA.mBelow);
+ assertFalse(listenerB.mBelow);
+ assertEquals(1, listenerA.mCallCount);
+ assertEquals(1, listenerB.mCallCount);
+ mFakeProximitySensor.sendProximityResult(false);
+ assertTrue(listenerA.mBelow);
+ assertTrue(listenerB.mBelow);
+ assertEquals(2, listenerA.mCallCount);
+ assertEquals(2, listenerB.mCallCount);
+
+ mThresholdSensor.unregister(listenerA);
+ mThresholdSensor.unregister(listenerB);
+ waitForSensorManager();
+ }
+
+ @Test
+ public void testDuplicateListener() {
+ TestableListener listenerA = new TestableListener();
+
+ assertFalse(mThresholdSensor.isRegistered());
+
+ mThresholdSensor.register(listenerA);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ mThresholdSensor.register(listenerA);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ assertEquals(0, listenerA.mCallCount);
+
+ mFakeProximitySensor.sendProximityResult(true);
+ assertFalse(listenerA.mBelow);
+ assertEquals(1, listenerA.mCallCount);
+ mFakeProximitySensor.sendProximityResult(false);
+ assertTrue(listenerA.mBelow);
+ assertEquals(2, listenerA.mCallCount);
+
+ mThresholdSensor.unregister(listenerA);
+ waitForSensorManager();
+ }
+ @Test
+ public void testUnregister() {
+ TestableListener listener = new TestableListener();
+
+ assertFalse(mThresholdSensor.isRegistered());
+ mThresholdSensor.register(listener);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ assertEquals(0, listener.mCallCount);
+
+ mFakeProximitySensor.sendProximityResult(true);
+ assertFalse(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+
+ mThresholdSensor.unregister(listener);
+ waitForSensorManager();
+ assertFalse(mThresholdSensor.isRegistered());
+ }
+
+ @Test
+ public void testPauseAndResume() {
+ TestableListener listener = new TestableListener();
+
+ assertFalse(mThresholdSensor.isRegistered());
+ mThresholdSensor.register(listener);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ assertEquals(0, listener.mCallCount);
+
+ mFakeProximitySensor.sendProximityResult(true);
+ assertFalse(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+
+ mThresholdSensor.pause();
+ waitForSensorManager();
+ assertFalse(mThresholdSensor.isRegistered());
+
+ // More events do nothing when paused.
+ mFakeProximitySensor.sendProximityResult(true);
+ assertFalse(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+ mFakeProximitySensor.sendProximityResult(false);
+ assertFalse(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+
+ mThresholdSensor.resume();
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ // Still matches our previous call
+ assertFalse(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+
+ mFakeProximitySensor.sendProximityResult(false);
+ assertTrue(listener.mBelow);
+ assertEquals(2, listener.mCallCount);
+
+ mThresholdSensor.unregister(listener);
+ waitForSensorManager();
+ assertFalse(mThresholdSensor.isRegistered());
+ }
+
+ @Test
+ public void testAlertListeners() {
+ TestableListener listenerA = new TestableListener();
+ TestableListener listenerB = new TestableListener();
+
+ assertFalse(mThresholdSensor.isRegistered());
+
+ mThresholdSensor.register(listenerA);
+ mThresholdSensor.register(listenerB);
+ waitForSensorManager();
+ assertTrue(mThresholdSensor.isRegistered());
+ assertEquals(0, listenerA.mCallCount);
+ assertEquals(0, listenerB.mCallCount);
+
+ mFakeProximitySensor.sendProximityResult(true);
+ assertFalse(listenerA.mBelow);
+ assertEquals(1, listenerA.mCallCount);
+ assertFalse(listenerB.mBelow);
+ assertEquals(1, listenerB.mCallCount);
+
+ mFakeProximitySensor.sendProximityResult(false);
+ assertTrue(listenerA.mBelow);
+ assertEquals(2, listenerA.mCallCount);
+ assertTrue(listenerB.mBelow);
+ assertEquals(2, listenerB.mCallCount);
+
+ mThresholdSensor.unregister(listenerA);
+ mThresholdSensor.unregister(listenerB);
+ waitForSensorManager();
+ }
+
+ @Test
+ public void testHysteresis() {
+ float lowValue = 10f;
+ float highValue = 100f;
+ FakeSensorManager.FakeGenericSensor sensor = mSensorManager.getFakeLightSensor();
+ ThresholdSensorImpl.Builder thresholdSensorBuilder = new ThresholdSensorImpl.Builder(
+ null, mAsyncSensorManager);
+ ThresholdSensorImpl thresholdSensor = (ThresholdSensorImpl) thresholdSensorBuilder
+ .setSensor(sensor.getSensor())
+ .setThresholdValue(lowValue)
+ .setThresholdLatchValue(highValue)
+ .build();
+
+ TestableListener listener = new TestableListener();
+
+ assertFalse(thresholdSensor.isRegistered());
+ thresholdSensor.register(listener);
+ waitForSensorManager();
+ assertTrue(thresholdSensor.isRegistered());
+ assertEquals(0, listener.mCallCount);
+
+ sensor.sendSensorEvent(lowValue - 1);
+
+ assertTrue(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+
+ sensor.sendSensorEvent(lowValue + 1);
+
+ assertTrue(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+
+ sensor.sendSensorEvent(highValue);
+
+ assertFalse(listener.mBelow);
+ assertEquals(2, listener.mCallCount);
+
+ sensor.sendSensorEvent(highValue - 1);
+
+ assertFalse(listener.mBelow);
+ assertEquals(2, listener.mCallCount);
+
+
+ sensor.sendSensorEvent(lowValue - 1);
+
+ assertTrue(listener.mBelow);
+ assertEquals(3, listener.mCallCount);
+ }
+
+ @Test
+ public void testAlertAfterPause() {
+ TestableListener listener = new TestableListener();
+
+ mThresholdSensor.register(listener);
+ waitForSensorManager();
+ mFakeProximitySensor.sendProximityResult(false);
+ assertTrue(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+
+ mThresholdSensor.pause();
+
+ mFakeProximitySensor.sendProximityResult(false);
+ assertTrue(listener.mBelow);
+ assertEquals(1, listener.mCallCount);
+ }
+
+ static class TestableListener implements ThresholdSensor.Listener {
+ boolean mBelow;
+ long mTimestampNs;
+ int mCallCount;
+
+ @Override
+ public void onThresholdCrossed(ThresholdSensor.ThresholdSensorEvent event) {
+ mBelow = event.getBelow();
+ mTimestampNs = event.getTimestampNs();
+ mCallCount++;
+ }
+ }
+
+ private void waitForSensorManager() {
+ TestableLooper.get(this).processAllMessages();
+ }
+
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBatteryController.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBatteryController.java
index 8ec4cb8b927b..50c1e73f6aac 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBatteryController.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeBatteryController.java
@@ -25,6 +25,8 @@ import java.io.PrintWriter;
public class FakeBatteryController extends BaseLeakChecker<BatteryStateChangeCallback>
implements BatteryController {
+ private boolean mWirelessCharging;
+
public FakeBatteryController(LeakCheck test) {
super(test, "battery");
}
@@ -58,4 +60,13 @@ public class FakeBatteryController extends BaseLeakChecker<BatteryStateChangeCal
public boolean isAodPowerSave() {
return false;
}
+
+ @Override
+ public boolean isWirelessCharging() {
+ return mWirelessCharging;
+ }
+
+ public void setWirelessCharging(boolean wirelessCharging) {
+ mWirelessCharging = wirelessCharging;
+ }
}
diff --git a/packages/Tethering/res/values-mcc310-mnc004-ne/strings.xml b/packages/Tethering/res/values-mcc310-mnc004-ne/strings.xml
deleted file mode 100644
index d074f1569933..000000000000
--- a/packages/Tethering/res/values-mcc310-mnc004-ne/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2020 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="no_upstream_notification_title" msgid="5030042590486713460">"टेदरिङमार्फत इन्टरनेट कनेक्सन प्राप्त हुन सकेन"</string>
- <string name="no_upstream_notification_message" msgid="3843613362272973447">"यन्त्रहरू कनेक्ट गर्न सकिएन"</string>
- <string name="no_upstream_notification_disable_button" msgid="6385491461813507624">"टेदरिङ निष्क्रिय पार्नुहोस्"</string>
- <string name="upstream_roaming_notification_title" msgid="3015912166812283303">"हटस्पट वा टेदरिङ सक्रिय छ"</string>
- <string name="upstream_roaming_notification_message" msgid="6724434706748439902">"रोमिङ सेवा प्रयोग गर्दा अतिरिक्त शुल्क लाग्न सक्छ"</string>
-</resources>
diff --git a/packages/Tethering/res/values-mcc310-mnc004-zh-rTW/strings.xml b/packages/Tethering/res/values-mcc310-mnc004-zh-rTW/strings.xml
deleted file mode 100644
index 528a1e52925c..000000000000
--- a/packages/Tethering/res/values-mcc310-mnc004-zh-rTW/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2020 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="no_upstream_notification_title" msgid="5030042590486713460">"無法透過網路共用連上網際網路"</string>
- <string name="no_upstream_notification_message" msgid="3843613362272973447">"裝置無法連線"</string>
- <string name="no_upstream_notification_disable_button" msgid="6385491461813507624">"關閉網路共用"</string>
- <string name="upstream_roaming_notification_title" msgid="3015912166812283303">"無線基地台或網路共用已開啟"</string>
- <string name="upstream_roaming_notification_message" msgid="6724434706748439902">"使用漫遊服務可能須支付額外費用"</string>
-</resources>
diff --git a/packages/Tethering/res/values-mcc311-mnc480-ne/strings.xml b/packages/Tethering/res/values-mcc311-mnc480-ne/strings.xml
deleted file mode 100644
index 1503244f5000..000000000000
--- a/packages/Tethering/res/values-mcc311-mnc480-ne/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2020 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="no_upstream_notification_title" msgid="611650570559011140">"टेदरिङमार्फत इन्टरनेट कनेक्सन प्राप्त हुन सकेन"</string>
- <string name="no_upstream_notification_message" msgid="6508394877641864863">"यन्त्रहरू कनेक्ट गर्न सकिएन"</string>
- <string name="no_upstream_notification_disable_button" msgid="7609346639290990508">"टेदरिङ निष्क्रिय पार्नुहोस्"</string>
- <string name="upstream_roaming_notification_title" msgid="6032901176124830787">"हटस्पट वा टेदरिङ सक्रिय छ"</string>
- <string name="upstream_roaming_notification_message" msgid="7599056263326217523">"रोमिङ सेवा प्रयोग गर्दा अतिरिक्त शुल्क लाग्न सक्छ"</string>
-</resources>
diff --git a/packages/Tethering/res/values-mcc311-mnc480-zh-rTW/strings.xml b/packages/Tethering/res/values-mcc311-mnc480-zh-rTW/strings.xml
deleted file mode 100644
index cd653df1dac6..000000000000
--- a/packages/Tethering/res/values-mcc311-mnc480-zh-rTW/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2020 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="no_upstream_notification_title" msgid="611650570559011140">"無法透過網路共用連上網際網路"</string>
- <string name="no_upstream_notification_message" msgid="6508394877641864863">"裝置無法連線"</string>
- <string name="no_upstream_notification_disable_button" msgid="7609346639290990508">"關閉網路共用"</string>
- <string name="upstream_roaming_notification_title" msgid="6032901176124830787">"無線基地台或網路共用已開啟"</string>
- <string name="upstream_roaming_notification_message" msgid="7599056263326217523">"使用漫遊服務可能須支付額外費用"</string>
-</resources>
diff --git a/packages/Tethering/res/values-zh-rTW/strings.xml b/packages/Tethering/res/values-zh-rTW/strings.xml
index 50a50bf7a996..9a117bbca43f 100644
--- a/packages/Tethering/res/values-zh-rTW/strings.xml
+++ b/packages/Tethering/res/values-zh-rTW/strings.xml
@@ -1,29 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2020 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.
- -->
-
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="tethered_notification_title" msgid="6426563586025792944">"網路共用或無線基地台已啟用"</string>
- <string name="tethered_notification_message" msgid="64800879503420696">"輕觸即可進行設定。"</string>
- <string name="disable_tether_notification_title" msgid="3004509127903564191">"網路共用已停用"</string>
- <string name="disable_tether_notification_message" msgid="6717523799293901476">"詳情請洽你的管理員"</string>
- <string name="notification_channel_tethering_status" msgid="2663463891530932727">"無線基地台與網路共用狀態"</string>
- <string name="no_upstream_notification_title" msgid="1204601824631788482"></string>
- <string name="no_upstream_notification_message" msgid="8586582938243032621"></string>
- <string name="no_upstream_notification_disable_button" msgid="8800919436924640822"></string>
- <string name="upstream_roaming_notification_title" msgid="4772373823198997030"></string>
- <string name="upstream_roaming_notification_message" msgid="3985577843181551650"></string>
+ <string name="tethered_notification_title" msgid="3146694234398202601">"網路共用或無線基地台已啟用"</string>
+ <string name="tethered_notification_message" msgid="2113628520792055377">"輕觸即可進行設定。"</string>
+ <string name="disable_tether_notification_title" msgid="7526977944111313195">"數據連線已停用"</string>
+ <string name="disable_tether_notification_message" msgid="2913366428516852495">"詳情請洽你的管理員"</string>
</resources>
diff --git a/packages/overlays/AccentColorAmethystOverlay/Android.mk b/packages/overlays/AccentColorAmethystOverlay/Android.mk
new file mode 100644
index 000000000000..cd10ca3accda
--- /dev/null
+++ b/packages/overlays/AccentColorAmethystOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2020, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := AccentColorAmethyst
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := AccentColorAmethystOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorAmethystOverlay/AndroidManifest.xml b/packages/overlays/AccentColorAmethystOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..e5a882677057
--- /dev/null
+++ b/packages/overlays/AccentColorAmethystOverlay/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.color.amethyst"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/>
+
+ <application android:label="@string/accent_color_overlay" android:hasCode="false"/>
+</manifest>
+
diff --git a/packages/overlays/AccentColorAmethystOverlay/res/values/colors_device_defaults.xml b/packages/overlays/AccentColorAmethystOverlay/res/values/colors_device_defaults.xml
new file mode 100644
index 000000000000..e17aebcb3ada
--- /dev/null
+++ b/packages/overlays/AccentColorAmethystOverlay/res/values/colors_device_defaults.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<resources>
+ <color name="accent_device_default_light">#A03EFF</color>
+ <color name="accent_device_default_dark">#BD78FF</color>
+</resources>
+
diff --git a/packages/overlays/AccentColorAmethystOverlay/res/values/strings.xml b/packages/overlays/AccentColorAmethystOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..ecfa2a87c23e
--- /dev/null
+++ b/packages/overlays/AccentColorAmethystOverlay/res/values/strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Black accent color name application label. [CHAR LIMIT=50] -->
+ <string name="accent_color_overlay" translatable="false">Amethyst</string>
+</resources>
+
+
diff --git a/packages/overlays/AccentColorAquamarineOverlay/Android.mk b/packages/overlays/AccentColorAquamarineOverlay/Android.mk
new file mode 100644
index 000000000000..09ae45019c97
--- /dev/null
+++ b/packages/overlays/AccentColorAquamarineOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2020, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := AccentColorAquamarine
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := AccentColorAquamarineOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorAquamarineOverlay/AndroidManifest.xml b/packages/overlays/AccentColorAquamarineOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..27e2470bf36d
--- /dev/null
+++ b/packages/overlays/AccentColorAquamarineOverlay/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.color.aquamarine"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/>
+
+ <application android:label="@string/accent_color_overlay" android:hasCode="false"/>
+</manifest>
+
diff --git a/packages/overlays/AccentColorAquamarineOverlay/res/values/colors_device_defaults.xml b/packages/overlays/AccentColorAquamarineOverlay/res/values/colors_device_defaults.xml
new file mode 100644
index 000000000000..2e69b5dfc614
--- /dev/null
+++ b/packages/overlays/AccentColorAquamarineOverlay/res/values/colors_device_defaults.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<resources>
+ <color name="accent_device_default_light">#23847D</color>
+ <color name="accent_device_default_dark">#1AFFCB</color>
+</resources>
+
diff --git a/packages/overlays/AccentColorAquamarineOverlay/res/values/strings.xml b/packages/overlays/AccentColorAquamarineOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..918ba5024259
--- /dev/null
+++ b/packages/overlays/AccentColorAquamarineOverlay/res/values/strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Black accent color name application label. [CHAR LIMIT=50] -->
+ <string name="accent_color_overlay" translatable="false">Aquamarine</string>
+</resources>
+
+
diff --git a/packages/overlays/AccentColorCarbonOverlay/Android.mk b/packages/overlays/AccentColorCarbonOverlay/Android.mk
new file mode 100644
index 000000000000..5641e8eba55c
--- /dev/null
+++ b/packages/overlays/AccentColorCarbonOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright 2018, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := AccentColorCarbon
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := AccentColorCarbonOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorCarbonOverlay/AndroidManifest.xml b/packages/overlays/AccentColorCarbonOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..d7779f598013
--- /dev/null
+++ b/packages/overlays/AccentColorCarbonOverlay/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.color.carbon"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/>
+
+ <application android:label="@string/accent_color_overlay_name" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-eu/strings.xml b/packages/overlays/AccentColorCarbonOverlay/res/values/colors_device_defaults.xml
index 93ef2c8e2109..1fef36346c46 100644
--- a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-eu/strings.xml
+++ b/packages/overlays/AccentColorCarbonOverlay/res/values/colors_device_defaults.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +13,8 @@
~ 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay" msgid="3523556473422419323">"Ur-jauzi moduko mozketa"</string>
+ -->
+<resources>
+ <color name="accent_device_default_light">#434E58</color>
+ <color name="accent_device_default_dark">#3DDCFF</color>
</resources>
diff --git a/packages/overlays/AccentColorCarbonOverlay/res/values/strings.xml b/packages/overlays/AccentColorCarbonOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..dcd53e89760e
--- /dev/null
+++ b/packages/overlays/AccentColorCarbonOverlay/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Black accent color name application label. [CHAR LIMIT=50] -->
+ <string name="accent_color_overlay_name" translatable="false">Carbon</string>
+</resources>
+
diff --git a/packages/overlays/AccentColorPaletteOverlay/Android.mk b/packages/overlays/AccentColorPaletteOverlay/Android.mk
new file mode 100644
index 000000000000..e207f61ce3db
--- /dev/null
+++ b/packages/overlays/AccentColorPaletteOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright 2018, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := AccentColorPalette
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := AccentColorPaletteOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorPaletteOverlay/AndroidManifest.xml b/packages/overlays/AccentColorPaletteOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..dd089deda9b6
--- /dev/null
+++ b/packages/overlays/AccentColorPaletteOverlay/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.color.palette"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/>
+
+ <application android:label="@string/accent_color_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-kk/strings.xml b/packages/overlays/AccentColorPaletteOverlay/res/values/colors_device_defaults.xml
index bb0dfe98759c..cea0539aeaff 100644
--- a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-kk/strings.xml
+++ b/packages/overlays/AccentColorPaletteOverlay/res/values/colors_device_defaults.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +13,8 @@
~ 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay" msgid="3523556473422419323">"Сарқырама ойығы"</string>
+ -->
+<resources>
+ <color name="accent_device_default_light">#c01668</color>
+ <color name="accent_device_default_dark">#ffb6d9</color>
</resources>
diff --git a/packages/overlays/AccentColorPaletteOverlay/res/values/strings.xml b/packages/overlays/AccentColorPaletteOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..ed267b034e5b
--- /dev/null
+++ b/packages/overlays/AccentColorPaletteOverlay/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Black accent color name application label. [CHAR LIMIT=50] -->
+ <string name="accent_color_overlay" translatable="false">Palette</string>
+</resources>
+
diff --git a/packages/overlays/AccentColorSandOverlay/Android.mk b/packages/overlays/AccentColorSandOverlay/Android.mk
new file mode 100644
index 000000000000..c37455af81df
--- /dev/null
+++ b/packages/overlays/AccentColorSandOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright 2018, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := AccentColorSand
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := AccentColorSandOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorSandOverlay/AndroidManifest.xml b/packages/overlays/AccentColorSandOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..c323cc907633
--- /dev/null
+++ b/packages/overlays/AccentColorSandOverlay/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.color.sand"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/>
+
+ <application android:label="@string/accent_color_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-gu/strings.xml b/packages/overlays/AccentColorSandOverlay/res/values/colors_device_defaults.xml
index 03672fe85a35..7fb514ee3240 100644
--- a/packages/overlays/DisplayCutoutEmulationWaterfallOverlay/res/values-gu/strings.xml
+++ b/packages/overlays/AccentColorSandOverlay/res/values/colors_device_defaults.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +13,8 @@
~ 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay" msgid="3523556473422419323">"વૉટરફૉલ કટઆઉટ"</string>
+ -->
+<resources>
+ <color name="accent_device_default_light">#795548</color>
+ <color name="accent_device_default_dark">#c8ac94</color>
</resources>
diff --git a/packages/overlays/AccentColorSandOverlay/res/values/strings.xml b/packages/overlays/AccentColorSandOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..20a26cb176a1
--- /dev/null
+++ b/packages/overlays/AccentColorSandOverlay/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Black accent color name application label. [CHAR LIMIT=50] -->
+ <string name="accent_color_overlay" translatable="false">Sand</string>
+</resources>
+
diff --git a/packages/overlays/AccentColorTangerineOverlay/Android.mk b/packages/overlays/AccentColorTangerineOverlay/Android.mk
new file mode 100644
index 000000000000..0d676bba076d
--- /dev/null
+++ b/packages/overlays/AccentColorTangerineOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2020, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := AccentColorTangerine
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := AccentColorTangerineOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/AccentColorTangerineOverlay/AndroidManifest.xml b/packages/overlays/AccentColorTangerineOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..024d4cdf5873
--- /dev/null
+++ b/packages/overlays/AccentColorTangerineOverlay/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.color.tangerine"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/>
+
+ <application android:label="@string/accent_color_overlay" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/AccentColorTangerineOverlay/res/values/colors_device_defaults.xml b/packages/overlays/AccentColorTangerineOverlay/res/values/colors_device_defaults.xml
new file mode 100644
index 000000000000..ee663cf13cb1
--- /dev/null
+++ b/packages/overlays/AccentColorTangerineOverlay/res/values/colors_device_defaults.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<resources>
+ <color name="accent_device_default_light">#C85125</color>
+ <color name="accent_device_default_dark">#F19D7D</color>
+</resources>
+
diff --git a/packages/overlays/AccentColorTangerineOverlay/res/values/strings.xml b/packages/overlays/AccentColorTangerineOverlay/res/values/strings.xml
new file mode 100644
index 000000000000..4e8d8e6d539a
--- /dev/null
+++ b/packages/overlays/AccentColorTangerineOverlay/res/values/strings.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Black accent color name application label. [CHAR LIMIT=50] -->
+ <string name="accent_color_overlay" translatable="false">Tangerine</string>
+</resources>
+
+
+
diff --git a/packages/overlays/Android.mk b/packages/overlays/Android.mk
index 50e1030fda30..ab41e0f61bc8 100644
--- a/packages/overlays/Android.mk
+++ b/packages/overlays/Android.mk
@@ -24,9 +24,15 @@ LOCAL_REQUIRED_MODULES := \
AccentColorSpaceOverlay \
AccentColorGreenOverlay \
AccentColorPurpleOverlay \
+ AccentColorPaletteOverlay \
+ AccentColorCarbonOverlay \
+ AccentColorSandOverlay \
+ AccentColorAmethystOverlay \
+ AccentColorAquamarineOverlay \
+ AccentColorTangerineOverlay \
DisplayCutoutEmulationCornerOverlay \
DisplayCutoutEmulationDoubleOverlay \
- DisplayCutoutEmulationHoleOverlay \
+ DisplayCutoutEmulationHoleOverlay \
DisplayCutoutEmulationTallOverlay \
DisplayCutoutEmulationWaterfallOverlay \
FontNotoSerifSourceOverlay \
diff --git a/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenrecord.xml
new file mode 100644
index 000000000000..a875a23c3a17
--- /dev/null
+++ b/packages/overlays/IconPackCircularSystemUIOverlay/res/drawable/ic_screenrecord.xml
@@ -0,0 +1,18 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M4.13,17.62c-0.25,0-0.5-0.13-0.64-0.35c-1.98-3.2-1.98-7.33,0-10.53c0.22-0.35,0.68-0.46,1.03-0.24 c0.35,0.22,0.46,0.68,0.24,1.03c-1.68,2.72-1.68,6.23,0,8.95c0.22,0.35,0.11,0.81-0.24,1.03C4.4,17.58,4.27,17.62,4.13,17.62z M17.51,4.53c0.22-0.35,0.11-0.81-0.24-1.03c-3.2-1.98-7.33-1.98-10.53,0C6.39,3.71,6.28,4.17,6.49,4.53 c0.22,0.35,0.68,0.46,1.03,0.24c2.72-1.68,6.23-1.68,8.95,0c0.12,0.08,0.26,0.11,0.39,0.11C17.12,4.88,17.36,4.76,17.51,4.53z M17.26,20.51c0.35-0.22,0.46-0.68,0.24-1.03c-0.22-0.35-0.68-0.46-1.03-0.24c-2.72,1.68-6.23,1.68-8.95,0 c-0.35-0.22-0.81-0.11-1.03,0.24c-0.22,0.35-0.11,0.81,0.24,1.03c1.6,0.99,3.43,1.49,5.26,1.49S15.66,21.5,17.26,20.51z M20.51,17.26c1.98-3.2,1.98-7.33,0-10.53c-0.22-0.35-0.68-0.46-1.03-0.24c-0.35,0.22-0.46,0.68-0.24,1.03 c1.68,2.72,1.68,6.23,0,8.95c-0.22,0.35-0.11,0.81,0.24,1.03c0.12,0.08,0.26,0.11,0.39,0.11C20.12,17.62,20.36,17.49,20.51,17.26z M16,12c0-2.21-1.79-4-4-4c-2.21,0-4,1.79-4,4c0,2.21,1.79,4,4,4C14.21,16,16,14.21,16,12z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenrecord.xml
new file mode 100644
index 000000000000..1a7c63c08894
--- /dev/null
+++ b/packages/overlays/IconPackFilledSystemUIOverlay/res/drawable/ic_screenrecord.xml
@@ -0,0 +1,18 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M12,16c-2.21,0-4-1.79-4-4c0-2.21,1.79-4,4-4c2.21,0,4,1.79,4,4C16,14.21,14.21,16,12,16z M4.7,17.36 c0.48-0.28,0.64-0.89,0.37-1.37c-1.39-2.41-1.42-5.41-0.08-7.84c0.27-0.48,0.09-1.09-0.39-1.36C4.11,6.52,3.5,6.7,3.23,7.18 c-1.67,3.04-1.64,6.8,0.1,9.81c0.19,0.32,0.52,0.5,0.87,0.5C4.37,17.49,4.54,17.45,4.7,17.36z M8.01,5.06 c2.4-1.39,5.41-1.42,7.84-0.08c0.48,0.27,1.09,0.09,1.36-0.39c0.27-0.48,0.09-1.09-0.39-1.36c-3.04-1.67-6.8-1.64-9.81,0.1 C6.53,3.61,6.37,4.22,6.64,4.7c0.19,0.32,0.52,0.5,0.87,0.5C7.68,5.2,7.85,5.16,8.01,5.06z M20.77,16.82 c1.67-3.04,1.64-6.8-0.1-9.81c-0.28-0.48-0.89-0.64-1.37-0.37c-0.48,0.28-0.64,0.89-0.37,1.37c1.39,2.41,1.42,5.41,0.08,7.84 c-0.27,0.48-0.09,1.09,0.39,1.36c0.15,0.08,0.32,0.12,0.48,0.12C20.24,17.33,20.58,17.15,20.77,16.82z M16.99,20.67 c0.48-0.28,0.64-0.89,0.37-1.37c-0.28-0.48-0.89-0.64-1.37-0.37c-2.41,1.39-5.41,1.42-7.84,0.08c-0.48-0.27-1.09-0.09-1.36,0.39 c-0.27,0.48-0.09,1.09,0.39,1.36C8.67,21.59,10.34,22,12,22C13.73,22,15.46,21.55,16.99,20.67z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/Android.mk b/packages/overlays/IconPackKaiAndroidOverlay/Android.mk
new file mode 100644
index 000000000000..11bd8b8a3f2c
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/Android.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2020, 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.
+#
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackKaiAndroid
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackKaiAndroidOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackKaiAndroidOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..f722d21af515
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.icon_pack.kai.android"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.icon_pack.android" android:priority="1"/>
+ <application android:label="Kai" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm.xml
new file mode 100644
index 000000000000..683e2b60a52c
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_audio_alarm.xml
@@ -0,0 +1,34 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?android:attr/colorControlNormal"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,4.01c-6.86,0 -9,4.44 -9,8.99c0,4.59 2.12,8.99 9,8.99c6.86,0 9,-4.44 9,-8.99C21,8.41 18.88,4.01 12,4.01zM12,20.49C11.44,20.5 4.5,21.06 4.5,13c0,-2.3 0.59,-7.49 7.5,-7.49c0.56,-0.01 7.5,-0.56 7.5,7.49C19.5,21.02 12.53,20.49 12,20.49z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M2.0575,5.6559l4.6068,-3.8442l0.961,1.1517l-4.6068,3.8442z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16.3786,2.9637l0.961,-1.1517l4.6068,3.8442l-0.961,1.1517z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12.5,8H11v4.88c0,0.4 0.16,0.78 0.44,1.06l3.1,3.1l1.06,-1.06l-3.1,-3.1V8z"/>
+</vector>
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml
new file mode 100644
index 000000000000..3fd9f795d04e
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml
@@ -0,0 +1,225 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <group android:name="_R_G">
+ <group android:name="_R_G_L_0_G">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#000000"
+ android:fillType="nonZero"
+ android:pathData=" M5 13.5 C4.93,13.5 3.5,13.59 3.5,12 C3.5,10.41 4.95,10.5 5,10.5 C5.07,10.5 6.5,10.41 6.5,12 C6.5,13.59 5.05,13.5 5,13.5c " />
+ <path
+ android:name="_R_G_L_0_G_D_1_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#000000"
+ android:fillType="nonZero"
+ android:pathData=" M19 13.5 C18.93,13.5 17.5,13.59 17.5,12 C17.5,10.41 18.95,10.5 19,10.5 C19.07,10.5 20.5,10.41 20.5,12 C20.5,13.59 19.05,13.5 19,13.5c " />
+ <path
+ android:name="_R_G_L_0_G_D_2_P_0"
+ android:pathData=" M6.06 17.94 C6.06,17.94 16.32,7.68 16.32,7.68 C16.42,7.58 16.42,7.42 16.32,7.32 C16.32,7.32 12.18,3.18 12.18,3.18 C12.02,3.02 11.75,3.13 11.75,3.35 C11.75,3.35 11.75,12.25 11.75,12.25 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ <path
+ android:name="_R_G_L_0_G_D_3_P_0"
+ android:pathData=" M11.75 11.69 C11.75,11.69 11.75,20.59 11.75,20.59 C11.75,20.81 12.02,20.92 12.18,20.77 C12.18,20.77 16.32,16.62 16.32,16.62 C16.42,16.52 16.42,16.36 16.32,16.27 C16.32,16.27 6.06,6 6.06,6 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="233"
+ android:propertyName="fillAlpha"
+ android:startOffset="17"
+ android:valueFrom="0.5"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="250"
+ android:valueFrom="0.5"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="233"
+ android:propertyName="fillAlpha"
+ android:startOffset="267"
+ android:valueFrom="1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="500"
+ android:valueFrom="1"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="233"
+ android:propertyName="fillAlpha"
+ android:startOffset="517"
+ android:valueFrom="0.5"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="750"
+ android:valueFrom="0.5"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_1_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="250"
+ android:propertyName="fillAlpha"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="250"
+ android:valueFrom="1"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="233"
+ android:propertyName="fillAlpha"
+ android:startOffset="267"
+ android:valueFrom="0.5"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="500"
+ android:valueFrom="0.5"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="233"
+ android:propertyName="fillAlpha"
+ android:startOffset="517"
+ android:valueFrom="1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="750"
+ android:valueFrom="1"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="1017"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml
new file mode 100644
index 000000000000..1978993d7875
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml
@@ -0,0 +1,203 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <group android:name="_R_G">
+ <group android:name="_R_G_L_0_G">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#000000"
+ android:fillType="nonZero"
+ android:pathData=" M12.01 11.09 C9.98,11.09 10.1,12.92 10.1,13 C10.1,13.07 9.98,14.91 12.01,14.91 C14.03,14.91 13.92,13.08 13.92,13 C13.92,12.93 14.03,11.09 12.01,11.09c " />
+ <path
+ android:name="_R_G_L_0_G_D_1_P_0"
+ android:pathData=" M8.46 16.55 C8.31,16.39 4.7,13.21 8.46,9.45 C12.22,5.69 15.43,9.33 15.55,9.45 C15.71,9.61 19.31,12.79 15.55,16.55 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ <path
+ android:name="_R_G_L_0_G_D_2_P_0"
+ android:pathData=" M5.76 19.25 C5.48,18.97 -0.86,13.37 5.76,6.75 C12.39,0.11 18.04,6.54 18.25,6.75 C18.53,7.03 24.87,12.63 18.25,19.26 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="583"
+ android:propertyName="fillAlpha"
+ android:startOffset="17"
+ android:valueFrom="0.5"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="fillAlpha"
+ android:startOffset="600"
+ android:valueFrom="0.5"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_1_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="200"
+ android:propertyName="strokeAlpha"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="200"
+ android:valueFrom="1"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="583"
+ android:propertyName="strokeAlpha"
+ android:startOffset="217"
+ android:valueFrom="0.5"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="800"
+ android:valueFrom="0.5"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_2_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="400"
+ android:propertyName="strokeAlpha"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="400"
+ android:valueFrom="1"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="600"
+ android:propertyName="strokeAlpha"
+ android:startOffset="417"
+ android:valueFrom="0.5"
+ android:valueTo="0.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="1017"
+ android:valueFrom="0.5"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="1250"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..4184a1ec06fb
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M16.75,1h-9.5C6.01,1 5,2.01 5,3.25v17.5C5,21.99 6.01,23 7.25,23h9.5c1.24,0 2.25,-1.01 2.25,-2.25V3.25C19,2.01 17.99,1 16.75,1zM7.25,2.5h9.5c0.41,0 0.75,0.34 0.75,0.75v1h-11v-1C6.5,2.84 6.84,2.5 7.25,2.5zM17.5,5.75v12.5h-11V5.75H17.5zM16.75,21.5h-9.5c-0.41,0 -0.75,-0.34 -0.75,-0.75v-1h11v1C17.5,21.16 17.16,21.5 16.75,21.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9.5,11V8.5H12V7H8.75C8.34,7 8,7.34 8,7.75V11H9.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,17h3.25c0.41,0 0.75,-0.34 0.75,-0.75V13h-1.5v2.5H12V17z"/>
+</vector>
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000000..4a06d8392c18
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,182 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <group android:name="_R_G">
+ <group android:name="_R_G_L_0_G">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:pathData=" M13.82 18.52 C13.29,18.05 11.85,17.07 10.19,18.53 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="0.3"
+ android:strokeColor="#000000" />
+ <path
+ android:name="_R_G_L_0_G_D_1_P_0"
+ android:pathData=" M16.84 14.8 C15.45,13.55 11.6,10.89 7.17,14.81 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="0.3"
+ android:strokeColor="#000000" />
+ <path
+ android:name="_R_G_L_0_G_D_2_P_0"
+ android:pathData=" M19.87 11.08 C17.6,9.05 11.36,4.73 4.15,11.09 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="0.3"
+ android:strokeColor="#000000" />
+ <path
+ android:name="_R_G_L_0_G_D_3_P_0"
+ android:pathData=" M22.89 7.36 C19.75,4.55 11.11,-1.44 1.12,7.38 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="0.3"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="150"
+ android:propertyName="strokeAlpha"
+ android:startOffset="0"
+ android:valueFrom="0.3"
+ android:valueTo="0.3"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="150"
+ android:valueFrom="0.3"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_1_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="317"
+ android:propertyName="strokeAlpha"
+ android:startOffset="0"
+ android:valueFrom="0.3"
+ android:valueTo="0.3"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="317"
+ android:valueFrom="0.3"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_2_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="483"
+ android:propertyName="strokeAlpha"
+ android:startOffset="0"
+ android:valueFrom="0.3"
+ android:valueTo="0.3"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="483"
+ android:valueFrom="0.3"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_3_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="650"
+ android:propertyName="strokeAlpha"
+ android:startOffset="0"
+ android:valueFrom="0.3"
+ android:valueTo="0.3"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="17"
+ android:propertyName="strokeAlpha"
+ android:startOffset="650"
+ android:valueFrom="0.3"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="850"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_work_apps_off.xml b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_work_apps_off.xml
new file mode 100644
index 000000000000..845545d78a1b
--- /dev/null
+++ b/packages/overlays/IconPackKaiAndroidOverlay/res/drawable/ic_work_apps_off.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M19.5,19.5l-6-6L12,12L7.5,7.5L6,6L2.81,2.81L1.75,3.87l2.17,2.17C2.83,6.2,2,7.12,2,8.25v10.5C2,19.99,3.01,21,4.25,21 h14.63l1.25,1.25l1.06-1.06l-0.44-0.44L19.5,19.5z M4.25,19.5c-0.41,0-0.75-0.34-0.75-0.75V8.25c0-0.41,0.34-0.75,0.75-0.75h1.13 l5.27,5.27c-0.09,0.19-0.15,0.42-0.15,0.73c0,1.59,1.43,1.5,1.5,1.5c0.02,0,0.38,0.02,0.74-0.14l4.64,4.64H4.25z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M9.62,7.5h10.13c0.41,0,0.75,0.34,0.75,0.75v10.13l1.28,1.28c0.13-0.28,0.22-0.58,0.22-0.91V8.25C22,7.01,20.99,6,19.75,6 H16c0,0,0,0,0,0c0-2.05-0.95-4-4-4C9.01,2,8.04,3.9,8.01,5.89L9.62,7.5z M12,3.5c0.54-0.01,2.5-0.11,2.5,2.5c0,0,0,0,0,0h-5 c0,0,0,0,0,0C9.5,3.39,11.45,3.48,12,3.5z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..4184a1ec06fb
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M16.75,1h-9.5C6.01,1 5,2.01 5,3.25v17.5C5,21.99 6.01,23 7.25,23h9.5c1.24,0 2.25,-1.01 2.25,-2.25V3.25C19,2.01 17.99,1 16.75,1zM7.25,2.5h9.5c0.41,0 0.75,0.34 0.75,0.75v1h-11v-1C6.5,2.84 6.84,2.5 7.25,2.5zM17.5,5.75v12.5h-11V5.75H17.5zM16.75,21.5h-9.5c-0.41,0 -0.75,-0.34 -0.75,-0.75v-1h11v1C17.5,21.16 17.16,21.5 16.75,21.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9.5,11V8.5H12V7H8.75C8.34,7 8,7.34 8,7.75V11H9.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,17h3.25c0.41,0 0.75,-0.34 0.75,-0.75V13h-1.5v2.5H12V17z"/>
+</vector>
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_select.xml
new file mode 100644
index 000000000000..f949a0cbd859
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_select.xml
@@ -0,0 +1,24 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M15.38,12.5h-1.25V8.12C14.13,6.95 13.18,6 12,6S9.88,6.95 9.88,8.12v7.9L7.91,15.5c-0.39,-0.1 -1.23,-0.36 -2.56,0.97c-0.29,0.29 -0.29,0.75 -0.01,1.05l3.79,3.98c0,0 0,0 0,0.01c1.37,1.41 3.28,1.51 4.04,1.49h2.2c2.12,0.06 5.25,-1.01 5.25,-5.25C20.63,13.19 17.11,12.46 15.38,12.5zM15.38,21.5h-2.25c-0.44,0.01 -1.93,-0.02 -2.92,-1.03l-3.27,-3.43c0.17,-0.1 0.38,-0.13 0.58,-0.08l2.91,0.78c0.47,0.12 0.94,-0.23 0.94,-0.72v-8.9c0,-0.34 0.28,-0.62 0.62,-0.62s0.62,0.28 0.62,0.62v5.12c0,0.41 0.33,0.75 0.75,0.75h2.05c1.26,-0.03 3.7,0.37 3.7,3.75C19.13,21.14 16.66,21.53 15.38,21.5zM3,8.25c0.41,0 0.75,0.34 0.75,0.75S3.41,9.75 3,9.75S2.25,9.41 2.25,9S2.59,8.25 3,8.25zM6,8.25c0.41,0 0.75,0.34 0.75,0.75S6.41,9.75 6,9.75C5.59,9.75 5.25,9.41 5.25,9S5.59,8.25 6,8.25zM18,8.25c0.41,0 0.75,0.34 0.75,0.75S18.41,9.75 18,9.75S17.25,9.41 17.25,9S17.59,8.25 18,8.25zM21,8.25c0.41,0 0.75,0.34 0.75,0.75S21.41,9.75 21,9.75S20.25,9.41 20.25,9S20.59,8.25 21,8.25zM12,2.25c0.41,0 0.75,0.34 0.75,0.75S12.41,3.75 12,3.75S11.25,3.41 11.25,3S11.59,2.25 12,2.25zM15,2.25c0.41,0 0.75,0.34 0.75,0.75S15.41,3.75 15,3.75S14.25,3.41 14.25,3S14.59,2.25 15,2.25zM3,2.25c0.41,0 0.75,0.34 0.75,0.75S3.41,3.75 3,3.75S2.25,3.41 2.25,3S2.59,2.25 3,2.25zM6,2.25c0.41,0 0.75,0.34 0.75,0.75S6.41,3.75 6,3.75C5.59,3.75 5.25,3.41 5.25,3S5.59,2.25 6,2.25zM9,2.25c0.41,0 0.75,0.34 0.75,0.75S9.41,3.75 9,3.75S8.25,3.41 8.25,3S8.59,2.25 9,2.25zM18,2.25c0.41,0 0.75,0.34 0.75,0.75S18.41,3.75 18,3.75S17.25,3.41 17.25,3S17.59,2.25 18,2.25zM21,2.25c0.41,0 0.75,0.34 0.75,0.75S21.41,3.75 21,3.75S20.25,3.41 20.25,3S20.59,2.25 21,2.25zM3,5.25c0.41,0 0.75,0.34 0.75,0.75c0,0.41 -0.34,0.75 -0.75,0.75S2.25,6.41 2.25,6C2.25,5.59 2.59,5.25 3,5.25zM21,5.25c0.41,0 0.75,0.34 0.75,0.75c0,0.41 -0.34,0.75 -0.75,0.75S20.25,6.41 20.25,6C20.25,5.59 20.59,5.25 21,5.25z"/>
+</vector>
diff --git a/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_share.xml
new file mode 100644
index 000000000000..af0e60c24cba
--- /dev/null
+++ b/packages/overlays/IconPackKaiLauncherOverlay/res/drawable/ic_share.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillAlpha="0.24" android:fillColor="#3C00FF" android:pathData="M0,0v24h24V0H0z M22,22H2V2h20V22z" android:strokeAlpha="0.24" android:strokeWidth="1"/>
+ <path android:fillColor="#0081FF" android:pathData="M18,2.1c1.05,0,1.9,0.85,1.9,1.9v16c0,1.05-0.85,1.9-1.9,1.9H6c-1.05,0-1.9-0.85-1.9-1.9V4 c0-1.05,0.85-1.9,1.9-1.9H18 M18,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2L18,2z"/>
+ <path android:fillColor="#0081FF" android:pathData="M20,4.1c1.05,0,1.9,0.85,1.9,1.9v12c0,1.05-0.85,1.9-1.9,1.9H4c-1.05,0-1.9-0.85-1.9-1.9V6 c0-1.05,0.85-1.9,1.9-1.9H20 M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4L20,4z"/>
+ <path android:fillColor="#0081FF" android:pathData="M19,3.1c1.05,0,1.9,0.85,1.9,1.9v14c0,1.05-0.85,1.9-1.9,1.9H5c-1.05,0-1.9-0.85-1.9-1.9V5 c0-1.05,0.85-1.9,1.9-1.9H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/>
+ <path android:fillColor="#0081FF" android:pathData="M12,6.1c3.25,0,5.9,2.65,5.9,5.9s-2.65,5.9-5.9,5.9S6.1,15.25,6.1,12S8.75,6.1,12,6.1 M12,6 c-3.31,0-6,2.69-6,6s2.69,6,6,6c3.31,0,6-2.69,6-6S15.31,6,12,6L12,6z"/>
+ <path android:fillColor="#0081FF" android:pathData="M21.9,2.1v19.8H2.1V2.1H21.9 M22,2H2v20h20V2L22,2z"/>
+ <path android:fillColor="#0081FF" android:pathData="M12,2.1c5.46,0,9.9,4.44,9.9,9.9s-4.44,9.9-9.9,9.9S2.1,17.46,2.1,12S6.54,2.1,12,2.1 M12,2 C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2L12,2z"/>
+ <path android:pathData="M 2 2 L 22 22" android:strokeColor="#0081FF" android:strokeMiterLimit="10" android:strokeWidth="0.1"/>
+ <path android:pathData="M 22 2 L 2 22" android:strokeColor="#0081FF" android:strokeMiterLimit="10" android:strokeWidth="0.1"/>
+ <path android:fillColor="@android:color/white" android:pathData="M17.88,3.5l0.06,0l0.04,0H18l0.04,0l0.02,0l0.06,0c1.38,0,1.38,1.01,1.38,1.5s0,1.5-1.38,1.5l-0.06,0l-0.04,0H18l-0.04,0 l-0.02,0l-0.06,0C16.5,6.5,16.5,5.49,16.5,5S16.5,3.5,17.88,3.5 M17.88,2C17.33,2,15,2.15,15,5c0,2.85,2.31,3,2.88,3 c0.06,0,0.11,0,0.12,0c0.01,0,0.05,0,0.12,0C18.67,8,21,7.85,21,5c0-2.85-2.31-3-2.88-3C18.06,2,18.01,2,18,2 C17.99,2,17.95,2,17.88,2L17.88,2z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M17.88,17.5l0.06,0l0.04,0H18l0.04,0l0.02,0l0.06,0c1.38,0,1.38,1.01,1.38,1.5s0,1.5-1.38,1.5l-0.06,0l-0.04,0H18l-0.04,0 l-0.02,0l-0.06,0c-1.38,0-1.38-1.01-1.38-1.5S16.5,17.5,17.88,17.5 M17.88,16C17.33,16,15,16.15,15,19c0,2.85,2.31,3,2.88,3 c0.06,0,0.11,0,0.12,0c0.01,0,0.05,0,0.12,0c0.56,0,2.88-0.15,2.88-3c0-2.85-2.31-3-2.88-3c-0.06,0-0.11,0-0.12,0 C17.99,16,17.95,16,17.88,16L17.88,16z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M5.88,10.5l0.06,0l0.04,0H6l0.04,0l0.02,0l0.06,0c1.38,0,1.38,1.01,1.38,1.5s0,1.5-1.38,1.5l-0.06,0l-0.04,0H6l-0.04,0 l-0.02,0l-0.06,0C4.5,13.5,4.5,12.49,4.5,12S4.5,10.5,5.88,10.5 M5.88,9C5.33,9,3,9.15,3,12c0,2.85,2.31,3,2.88,3 c0.06,0,0.11,0,0.12,0c0.01,0,0.05,0,0.12,0C6.67,15,9,14.85,9,12c0-2.85-2.31-3-2.88-3C6.06,9,6.01,9,6,9C5.99,9,5.95,9,5.88,9 L5.88,9z"/>
+ <path android:pathData="M 16.01 6.16 L 8 10.83" android:strokeColor="#000000" android:strokeMiterLimit="10" android:strokeWidth="1.5"/>
+ <path android:pathData="M 16.06 17.87 L 8.19 13.28" android:strokeColor="#000000" android:strokeMiterLimit="10" android:strokeWidth="1.5"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_accessibility_generic.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_accessibility_generic.xml
new file mode 100644
index 000000000000..900a3a6cb082
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_accessibility_generic.xml
@@ -0,0 +1,22 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M 8 22 C 8.55228474983 22 9 22.4477152502 9 23 C 9 23.5522847498 8.55228474983 24 8 24 C 7.44771525017 24 7 23.5522847498 7 23 C 7 22.4477152502 7.44771525017 22 8 22 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 12 22 C 12.5522847498 22 13 22.4477152502 13 23 C 13 23.5522847498 12.5522847498 24 12 24 C 11.4477152502 24 11 23.5522847498 11 23 C 11 22.4477152502 11.4477152502 22 12 22 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 16 22 C 16.5522847498 22 17 22.4477152502 17 23 C 17 23.5522847498 16.5522847498 24 16 24 C 15.4477152502 24 15 23.5522847498 15 23 C 15 22.4477152502 15.4477152502 22 16 22 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 12 0 C 13.1045694997 0 14 0.895430500338 14 2 C 14 3.10456949966 13.1045694997 4 12 4 C 10.8954305003 4 10 3.10456949966 10 2 C 10 0.895430500338 10.8954305003 0 12 0 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M15,20V7c2-0.17,4.14-0.5,6-1l-0.5-2c-2.61,0.7-5.67,1-8.5,1S6.11,4.7,3.5,4L3,6c1.86,0.5,4,0.83,6,1v13h2v-6h2v6H15z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_restore.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_restore.xml
new file mode 100644
index 000000000000..c3ab52f4ce59
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_restore.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M12.98,3C10.03,2.93,4,4.16,4,12v0.19L1.78,9.97l-1.06,1.06l3.5,3.5c0.29,0.29,0.77,0.29,1.06,0l3.5-3.5L7.72,9.97 L5.5,12.19V12c0-6.75,4.97-7.5,7.5-7.5c6.79,0,7.5,4.95,7.5,7.5c0,7.92-6.98,7.5-7.5,7.5c-2.13,0-4.19-0.46-5.67-2.01l-1.08,1.04 c2.24,2.34,5.41,2.5,6.76,2.48c3.65,0.1,9-1.66,9-9C22,4.09,15.94,2.93,12.98,3z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M12.25,7v5c0,0.2,0.08,0.39,0.22,0.53l3.5,3.5l1.06-1.06l-3.28-3.28V7H12.25z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_force_stop.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_force_stop.xml
new file mode 100644
index 000000000000..e663f5065bca
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_force_stop.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M22.4,19.87L12.65,3.12c-0.27-0.46-1.03-0.46-1.3,0L1.6,19.87C1.31,20.37,1.67,21,2.25,21h19.5 C22.33,21,22.69,20.37,22.4,19.87z M3.55,19.5L12,4.99l8.45,14.51H3.55z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 15 H 11.25 V 10 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 12 16.5 C 12.4142135624 16.5 12.75 16.8357864376 12.75 17.25 C 12.75 17.6642135624 12.4142135624 18 12 18 C 11.5857864376 18 11.25 17.6642135624 11.25 17.25 C 11.25 16.8357864376 11.5857864376 16.5 12 16.5 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_gestures.xml b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_gestures.xml
new file mode 100644
index 000000000000..45bbcb180ecb
--- /dev/null
+++ b/packages/overlays/IconPackKaiSettingsOverlay/res/drawable/ic_settings_gestures.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M17.5,18.25h-11V5.75h11V7H19V3.25C19,2.01,17.99,1,16.75,1h-9.5C6.01,1,5,2.01,5,3.25v17.5C5,21.99,6.01,23,7.25,23h9.5 c1.24,0,2.25-1.01,2.25-2.25V17h-1.5V18.25z M7.25,2.5h9.5c0.41,0,0.75,0.34,0.75,0.75v1h-11v-1C6.5,2.84,6.84,2.5,7.25,2.5z M16.75,21.5h-9.5c-0.41,0-0.75-0.34-0.75-0.75v-1h11v1C17.5,21.16,17.16,21.5,16.75,21.5z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M21.33,11.33l-1.78-0.89l-0.89-1.78c-0.25-0.51-1.09-0.51-1.34,0l-0.89,1.78l-1.78,0.89c-0.25,0.13-0.42,0.39-0.42,0.67 s0.16,0.54,0.42,0.67l1.78,0.89l0.89,1.78c0.13,0.25,0.39,0.41,0.67,0.41s0.54-0.16,0.67-0.41l0.89-1.78l1.78-0.89 c0.25-0.13,0.42-0.39,0.42-0.67S21.59,11.46,21.33,11.33z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/Android.mk b/packages/overlays/IconPackKaiSystemUIOverlay/Android.mk
new file mode 100644
index 000000000000..5e55f7d8d3af
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2020, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackKaiSystemUI
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackKaiSystemUIOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_lock.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_lock.xml
new file mode 100644
index 000000000000..fbe5f098c395
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_lock.xml
@@ -0,0 +1,318 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="24dp"
+ android:height="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="32">
+ <group android:name="_R_G">
+ <group
+ android:name="_R_G_L_2_G_T_1"
+ android:translateX="12"
+ android:translateY="19.001">
+ <group
+ android:name="_R_G_L_2_G"
+ android:translateX="-12"
+ android:translateY="-15.001">
+ <path
+ android:name="_R_G_L_2_G_D_0_P_0"
+ android:pathData=" M17.75 21.25 C17.75,21.25 6.25,21.25 6.25,21.25 C5.42,21.25 4.75,20.58 4.75,19.75 C4.75,19.75 4.75,10.25 4.75,10.25 C4.75,9.42 5.42,8.75 6.25,8.75 C6.25,8.75 17.75,8.75 17.75,8.75 C18.58,8.75 19.25,9.42 19.25,10.25 C19.25,10.25 19.25,19.75 19.25,19.75 C19.25,20.58 18.58,21.25 17.75,21.25c "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ <group
+ android:name="_R_G_L_1_G_N_4_T_1"
+ android:translateX="12"
+ android:translateY="19.001">
+ <group
+ android:name="_R_G_L_1_G_N_4_T_0"
+ android:translateX="-12"
+ android:translateY="-15.001">
+ <group
+ android:name="_R_G_L_1_G"
+ android:pivotX="11.903"
+ android:pivotY="14.897"
+ android:scaleX="1"
+ android:scaleY="1">
+ <path
+ android:name="_R_G_L_1_G_D_0_P_0"
+ android:pathData=" M12 17 C11.91,17 10,17.12 10,15 C10,12.88 11.93,13 12,13 C12.09,13 14,12.88 14,15 C14,17.12 12.07,17 12,17c "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ </group>
+ <group
+ android:name="_R_G_L_0_G_N_4_T_1"
+ android:translateX="12"
+ android:translateY="19.001">
+ <group
+ android:name="_R_G_L_0_G_N_4_T_0"
+ android:translateX="-12"
+ android:translateY="-15.001">
+ <group android:name="_R_G_L_0_G">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:pathData=" M22.13 5.86 C22.13,5.86 22.13,5.62 22.13,5.62 C22.13,1.31 18.12,1.83 18.25,1.83 C18.42,1.83 14.75,1.64 14.75,5.62 C14.75,5.62 14.75,8.99 14.75,8.99 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ </group>
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_2_G_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="400"
+ android:propertyName="translateY"
+ android:startOffset="0"
+ android:valueFrom="19.001"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="67"
+ android:propertyName="translateY"
+ android:startOffset="400"
+ android:valueFrom="19.001"
+ android:valueTo="20.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="83"
+ android:propertyName="translateY"
+ android:startOffset="467"
+ android:valueFrom="20.5"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_1_G">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="450"
+ android:propertyName="scaleX"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="450"
+ android:propertyName="scaleY"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="67"
+ android:propertyName="scaleX"
+ android:startOffset="450"
+ android:valueFrom="1"
+ android:valueTo="1.1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="67"
+ android:propertyName="scaleY"
+ android:startOffset="450"
+ android:valueFrom="1"
+ android:valueTo="1.1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="183"
+ android:propertyName="scaleX"
+ android:startOffset="517"
+ android:valueFrom="1.1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="183"
+ android:propertyName="scaleY"
+ android:startOffset="517"
+ android:valueFrom="1.1"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_1_G_N_4_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="400"
+ android:propertyName="translateY"
+ android:startOffset="0"
+ android:valueFrom="19.001"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="67"
+ android:propertyName="translateY"
+ android:startOffset="400"
+ android:valueFrom="19.001"
+ android:valueTo="20.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="83"
+ android:propertyName="translateY"
+ android:startOffset="467"
+ android:valueFrom="20.5"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="317"
+ android:propertyName="pathData"
+ android:startOffset="0"
+ android:valueFrom="M22.13 5.86 C22.13,5.86 22.13,5.62 22.13,5.62 C22.13,1.31 18.12,1.83 18.25,1.83 C18.42,1.83 14.75,1.64 14.75,5.62 C14.75,5.62 14.75,8.99 14.75,8.99 "
+ android:valueTo="M8.25 3.59 C8.25,3.59 8.25,2.75 8.25,2.75 C8.25,-1.23 11.87,-1 12,-1 C12.17,-1 15.75,-1.23 15.75,2.75 C15.75,2.75 15.75,9 15.75,9 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="133"
+ android:propertyName="pathData"
+ android:startOffset="317"
+ android:valueFrom="M8.25 3.59 C8.25,3.59 8.25,2.75 8.25,2.75 C8.25,-1.23 11.87,-1 12,-1 C12.17,-1 15.75,-1.23 15.75,2.75 C15.75,2.75 15.75,9 15.75,9 "
+ android:valueTo="M8.25 8.75 C8.25,8.75 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.75,9 15.75,9 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_N_4_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="400"
+ android:propertyName="translateY"
+ android:startOffset="0"
+ android:valueFrom="19.001"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="67"
+ android:propertyName="translateY"
+ android:startOffset="400"
+ android:valueFrom="19.001"
+ android:valueTo="20.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="83"
+ android:propertyName="translateY"
+ android:startOffset="467"
+ android:valueFrom="20.5"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="733"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_scanning.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_scanning.xml
new file mode 100644
index 000000000000..e27284d108fb
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_scanning.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="32dp" android:width="24dp" android:viewportHeight="32" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_2_G" android:translateY="4" android:pivotX="12" android:pivotY="12" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_2_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5" android:strokeAlpha="1" android:pathData=" M17.75 21.25 C17.75,21.25 6.25,21.25 6.25,21.25 C5.42,21.25 4.75,20.58 4.75,19.75 C4.75,19.75 4.75,10.25 4.75,10.25 C4.75,9.42 5.42,8.75 6.25,8.75 C6.25,8.75 17.75,8.75 17.75,8.75 C18.58,8.75 19.25,9.42 19.25,10.25 C19.25,10.25 19.25,19.75 19.25,19.75 C19.25,20.58 18.58,21.25 17.75,21.25c "/></group><group android:name="_R_G_L_1_G_N_3_T_0" android:translateY="4" android:pivotX="12" android:pivotY="12" android:scaleX="1" android:scaleY="1"><group android:name="_R_G_L_1_G" android:pivotX="11.903" android:pivotY="14.897" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_1_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5" android:strokeAlpha="1" android:pathData=" M12 17 C11.91,17 10,17.12 10,15 C10,12.88 11.93,13 12,13 C12.09,13 14,12.88 14,15 C14,17.12 12.07,17 12,17c "/></group></group><group android:name="_R_G_L_0_G_N_3_T_0" android:translateY="4" android:pivotX="12" android:pivotY="12" android:scaleX="1" android:scaleY="1"><group android:name="_R_G_L_0_G_T_1" android:translateX="12" android:translateY="12"><group android:name="_R_G_L_0_G" android:translateX="-12" android:translateY="-12"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5" android:strokeAlpha="1" android:pathData=" M8.25 8.75 C8.25,8.75 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.75,9 15.75,9 "/></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_2_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="67" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="67" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="117" android:startOffset="67" android:valueFrom="1" android:valueTo="0.6" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="117" android:startOffset="67" android:valueFrom="1" android:valueTo="0.6" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="333" android:startOffset="183" android:valueFrom="0.6" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="333" android:startOffset="183" android:valueFrom="0.6" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="150" android:startOffset="0" android:valueFrom="M8.25 8.75 C8.25,8.75 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.75,9 15.75,9 " android:valueTo="M8.25 5.82 C8.25,5.82 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.76,6.07 15.76,6.07 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="117" android:startOffset="150" android:valueFrom="M8.25 5.82 C8.25,5.82 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.76,6.07 15.76,6.07 " android:valueTo="M8.25 8.75 C8.25,8.75 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.75,9 15.75,9 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateXY" android:duration="150" android:startOffset="0" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,12C 12,12.42409592866898 12,14.545 12,14.545"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="117" android:startOffset="150" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,14.545C 12,14.545 12,12.42409592866898 12,12"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="717" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_to_error.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_to_error.xml
new file mode 100644
index 000000000000..ad9daba1b5a1
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_to_error.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_2_G" android:pivotX="12" android:pivotY="15.001" android:rotation="0"><path android:name="_R_G_L_2_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5" android:strokeAlpha="1" android:pathData=" M17.75 21.25 C17.75,21.25 6.25,21.25 6.25,21.25 C5.42,21.25 4.75,20.58 4.75,19.75 C4.75,19.75 4.75,10.25 4.75,10.25 C4.75,9.42 5.42,8.75 6.25,8.75 C6.25,8.75 17.75,8.75 17.75,8.75 C18.58,8.75 19.25,9.42 19.25,10.25 C19.25,10.25 19.25,19.75 19.25,19.75 C19.25,20.58 18.58,21.25 17.75,21.25c "/></group><group android:name="_R_G_L_1_G_N_3_T_0" android:pivotX="12" android:pivotY="15.001" android:rotation="0"><group android:name="_R_G_L_1_G"><path android:name="_R_G_L_1_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5" android:strokeAlpha="1" android:pathData=" M12 17 C11.91,17 10,17.12 10,15 C10,12.88 11.93,13 12,13 C12.09,13 14,12.88 14,15 C14,17.12 12.07,17 12,17c "/></group></group><group android:name="_R_G_L_0_G_N_3_T_0" android:pivotX="12" android:pivotY="15.001" android:rotation="0"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5" android:strokeAlpha="1" android:pathData=" M8.25 8.75 C8.25,8.75 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.75,9 15.75,9 "/></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_2_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="717" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_unlock.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_unlock.xml
new file mode 100644
index 000000000000..abca59b3b67a
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/anim/lock_unlock.xml
@@ -0,0 +1,296 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="24dp"
+ android:height="32dp"
+ android:viewportWidth="24"
+ android:viewportHeight="32">
+ <group android:name="_R_G">
+ <group
+ android:name="_R_G_L_2_G_T_1"
+ android:translateX="12"
+ android:translateY="19.001">
+ <group
+ android:name="_R_G_L_2_G"
+ android:translateX="-12"
+ android:translateY="-15.001">
+ <path
+ android:name="_R_G_L_2_G_D_0_P_0"
+ android:pathData=" M17.75 21.25 C17.75,21.25 6.25,21.25 6.25,21.25 C5.42,21.25 4.75,20.58 4.75,19.75 C4.75,19.75 4.75,10.25 4.75,10.25 C4.75,9.42 5.42,8.75 6.25,8.75 C6.25,8.75 17.75,8.75 17.75,8.75 C18.58,8.75 19.25,9.42 19.25,10.25 C19.25,10.25 19.25,19.75 19.25,19.75 C19.25,20.58 18.58,21.25 17.75,21.25c "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ <group
+ android:name="_R_G_L_1_G_N_4_T_1"
+ android:translateX="12"
+ android:translateY="19.001">
+ <group
+ android:name="_R_G_L_1_G_N_4_T_0"
+ android:translateX="-12"
+ android:translateY="-15.001">
+ <group
+ android:name="_R_G_L_1_G"
+ android:pivotX="11.903"
+ android:pivotY="14.897"
+ android:scaleX="1"
+ android:scaleY="1">
+ <path
+ android:name="_R_G_L_1_G_D_0_P_0"
+ android:pathData=" M12 17 C11.91,17 10,17.12 10,15 C10,12.88 11.93,13 12,13 C12.09,13 14,12.88 14,15 C14,17.12 12.07,17 12,17c "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ </group>
+ <group
+ android:name="_R_G_L_0_G_N_4_T_1"
+ android:translateX="12"
+ android:translateY="19.001">
+ <group
+ android:name="_R_G_L_0_G_N_4_T_0"
+ android:translateX="-12"
+ android:translateY="-15.001">
+ <group android:name="_R_G_L_0_G">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:pathData=" M8.25 8.75 C8.25,8.75 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.75,9 15.75,9 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ </group>
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_2_G_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="133"
+ android:propertyName="translateY"
+ android:startOffset="0"
+ android:valueFrom="19.001"
+ android:valueTo="17.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="133"
+ android:propertyName="translateY"
+ android:startOffset="133"
+ android:valueFrom="17.5"
+ android:valueTo="20"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="100"
+ android:propertyName="translateY"
+ android:startOffset="267"
+ android:valueFrom="20"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_1_G">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="100"
+ android:propertyName="scaleX"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="0.8200000000000001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.418,0 0.565,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="100"
+ android:propertyName="scaleY"
+ android:startOffset="0"
+ android:valueFrom="1"
+ android:valueTo="0.8200000000000001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.418,0 0.565,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="283"
+ android:propertyName="scaleX"
+ android:startOffset="100"
+ android:valueFrom="0.8200000000000001"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.535,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="283"
+ android:propertyName="scaleY"
+ android:startOffset="100"
+ android:valueFrom="0.8200000000000001"
+ android:valueTo="1"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.535,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_1_G_N_4_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="133"
+ android:propertyName="translateY"
+ android:startOffset="0"
+ android:valueFrom="19.001"
+ android:valueTo="17.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="133"
+ android:propertyName="translateY"
+ android:startOffset="133"
+ android:valueFrom="17.5"
+ android:valueTo="20"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="100"
+ android:propertyName="translateY"
+ android:startOffset="267"
+ android:valueFrom="20"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="67"
+ android:propertyName="pathData"
+ android:startOffset="0"
+ android:valueFrom="M8.25 8.75 C8.25,8.75 8.25,5.62 8.25,5.62 C8.25,1.64 11.87,1.88 12,1.88 C12.17,1.88 15.75,1.65 15.75,5.62 C15.75,5.62 15.75,9 15.75,9 "
+ android:valueTo="M8.25 3.59 C8.25,3.59 8.25,2.75 8.25,2.75 C8.25,-1.23 11.87,-1 12,-1 C12.17,-1 15.75,-1.23 15.75,2.75 C15.75,2.75 15.75,9 15.75,9 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="333"
+ android:propertyName="pathData"
+ android:startOffset="67"
+ android:valueFrom="M8.25 3.59 C8.25,3.59 8.25,2.75 8.25,2.75 C8.25,-1.23 11.87,-1 12,-1 C12.17,-1 15.75,-1.23 15.75,2.75 C15.75,2.75 15.75,9 15.75,9 "
+ android:valueTo="M22.13 5.86 C22.13,5.86 22.13,5.62 22.13,5.62 C22.13,1.31 18.12,1.83 18.25,1.83 C18.42,1.83 14.75,1.64 14.75,5.62 C14.75,5.62 14.75,8.99 14.75,8.99 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="_R_G_L_0_G_N_4_T_1">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="133"
+ android:propertyName="translateY"
+ android:startOffset="0"
+ android:valueFrom="19.001"
+ android:valueTo="17.5"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="133"
+ android:propertyName="translateY"
+ android:startOffset="133"
+ android:valueFrom="17.5"
+ android:valueTo="20"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ <objectAnimator
+ android:duration="100"
+ android:propertyName="translateY"
+ android:startOffset="267"
+ android:valueFrom="20"
+ android:valueTo="19.001"
+ android:valueType="floatType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="733"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_brightness_thumb.xml
new file mode 100644
index 000000000000..372059eab1da
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_brightness_thumb.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="?android:attr/colorBackgroundFloating" android:pathData="M18.72,9.53C18.58,9.39,18.5,9.2,18.5,9V5.5H15c-0.2,0-0.39-0.08-0.53-0.22L12,2.81L9.53,5.28 C9.39,5.42,9.2,5.5,9,5.5H5.5V9c0,0.2-0.08,0.39-0.22,0.53L2.81,12l2.47,2.47C5.42,14.61,5.5,14.8,5.5,15v3.5H9 c0.2,0,0.39,0.08,0.53,0.22L12,21.19l2.47-2.47c0.14-0.14,0.33-0.22,0.53-0.22h3.5V15c0-0.2,0.08-0.39,0.22-0.53L21.19,12 L18.72,9.53z M12,17c-2.76,0-5-2.24-5-5s2.24-5,5-5s5,2.24,5,5S14.76,17,12,17z"/>
+ <path android:fillColor="?android:attr/colorControlActivated" android:pathData="M22.78,11.47L20,8.69V4.75C20,4.34,19.66,4,19.25,4h-3.94l-2.78-2.78c-0.29-0.29-0.77-0.29-1.06,0L8.69,4H4.75 C4.34,4,4,4.34,4,4.75v3.94l-2.78,2.78c-0.29,0.29-0.29,0.77,0,1.06L4,15.31v3.94C4,19.66,4.34,20,4.75,20h3.94l2.78,2.78 C11.62,22.93,11.81,23,12,23s0.38-0.07,0.53-0.22L15.31,20h3.94c0.41,0,0.75-0.34,0.75-0.75v-3.94l2.78-2.78 C23.07,12.24,23.07,11.76,22.78,11.47z M18.72,14.47C18.58,14.61,18.5,14.8,18.5,15v3.5H15c-0.2,0-0.39,0.08-0.53,0.22L12,21.19 l-2.47-2.47C9.39,18.58,9.2,18.5,9,18.5H5.5V15c0-0.2-0.08-0.39-0.22-0.53L2.81,12l2.47-2.47C5.42,9.39,5.5,9.2,5.5,9V5.5H9 c0.2,0,0.39-0.08,0.53-0.22L12,2.81l2.47,2.47C14.61,5.42,14.8,5.5,15,5.5h3.5V9c0,0.2,0.08,0.39,0.22,0.53L21.19,12L18.72,14.47z"/>
+ <path android:fillColor="?android:attr/colorControlActivated" android:pathData="M 12 7 C 14.7614237492 7 17 9.23857625085 17 12 C 17 14.7614237492 14.7614237492 17 12 17 C 9.23857625085 17 7 14.7614237492 7 12 C 7 9.23857625085 9.23857625085 7 12 7 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenrecord.xml
new file mode 100644
index 000000000000..a379f9a2cfb9
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenrecord.xml
@@ -0,0 +1,18 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M12,16c-2.21,0-4-1.79-4-4c0-2.21,1.79-4,4-4c2.21,0,4,1.79,4,4C16,14.21,14.21,16,12,16z M6.64,4.87 C8.47,3.65,10.66,3.47,12,3.5c1.35-0.03,3.54,0.15,5.36,1.37l1.08-1.08C16.92,2.68,14.83,2,12,2C9.18,2,7.1,2.69,5.57,3.8 L6.64,4.87z M3.5,12c0-2.4,0.55-4.11,1.38-5.36L3.8,5.57C2.52,7.37,2,9.66,2,12c0,2.34,0.51,4.64,1.79,6.44l1.08-1.08 C4.05,16.11,3.5,14.4,3.5,12z M20.5,12c0,2.4-0.55,4.11-1.38,5.36l1.07,1.07c1.28-1.8,1.8-4.09,1.8-6.43 c0-2.34-0.51-4.64-1.79-6.44l-1.08,1.08C19.95,7.88,20.5,9.6,20.5,12z M17.36,19.13c-1.82,1.22-4.02,1.4-5.36,1.37 c-1.35,0.03-3.54-0.15-5.36-1.37l-1.08,1.08C7.08,21.32,9.17,22,12,22c2.82,0,4.9-0.69,6.43-1.8L17.36,19.13z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..4184a1ec06fb
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M16.75,1h-9.5C6.01,1 5,2.01 5,3.25v17.5C5,21.99 6.01,23 7.25,23h9.5c1.24,0 2.25,-1.01 2.25,-2.25V3.25C19,2.01 17.99,1 16.75,1zM7.25,2.5h9.5c0.41,0 0.75,0.34 0.75,0.75v1h-11v-1C6.5,2.84 6.84,2.5 7.25,2.5zM17.5,5.75v12.5h-11V5.75H17.5zM16.75,21.5h-9.5c-0.41,0 -0.75,-0.34 -0.75,-0.75v-1h11v1C17.5,21.16 17.16,21.5 16.75,21.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9.5,11V8.5H12V7H8.75C8.34,7 8,7.34 8,7.75V11H9.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,17h3.25c0.41,0 0.75,-0.34 0.75,-0.75V13h-1.5v2.5H12V17z"/>
+</vector>
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml
new file mode 100644
index 000000000000..e5486dd98055
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml
@@ -0,0 +1,69 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <group android:name="_R_G">
+ <group android:name="_R_G_L_0_G">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:pathData=" M4.54 15.47 C4.54,15.47 12.01,8 12.01,8 C12.01,8 19.48,15.47 19.48,15.47 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="250"
+ android:propertyName="pathData"
+ android:startOffset="0"
+ android:valueFrom="M4.54 15.47 C4.54,15.47 12.01,8 12.01,8 C12.01,8 19.48,15.47 19.48,15.47 "
+ android:valueTo="M4.53 8.44 C4.53,8.44 11.98,16 11.98,16 C11.98,16 19.48,8.44 19.48,8.44 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="267"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml
new file mode 100644
index 000000000000..e9dc04f68219
--- /dev/null
+++ b/packages/overlays/IconPackKaiSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml
@@ -0,0 +1,69 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:aapt="http://schemas.android.com/aapt">
+ <aapt:attr name="android:drawable">
+ <vector
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <group android:name="_R_G">
+ <group android:name="_R_G_L_0_G">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:pathData=" M4.53 8.44 C4.53,8.44 11.98,16 11.98,16 C11.98,16 19.48,8.44 19.48,8.44 "
+ android:strokeWidth="1.5"
+ android:strokeAlpha="1"
+ android:strokeColor="#000000" />
+ </group>
+ </group>
+ <group android:name="time_group" />
+ </vector>
+ </aapt:attr>
+ <target android:name="_R_G_L_0_G_D_0_P_0">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="250"
+ android:propertyName="pathData"
+ android:startOffset="0"
+ android:valueFrom="M4.53 8.44 C4.53,8.44 11.98,16 11.98,16 C11.98,16 19.48,8.44 19.48,8.44 "
+ android:valueTo="M4.54 15.47 C4.54,15.47 12.01,8 12.01,8 C12.01,8 19.48,15.47 19.48,15.47 "
+ android:valueType="pathType">
+ <aapt:attr name="android:interpolator">
+ <pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0" />
+ </aapt:attr>
+ </objectAnimator>
+ </set>
+ </aapt:attr>
+ </target>
+ <target android:name="time_group">
+ <aapt:attr name="android:animation">
+ <set android:ordering="together">
+ <objectAnimator
+ android:duration="267"
+ android:propertyName="translateX"
+ android:startOffset="0"
+ android:valueFrom="0"
+ android:valueTo="1"
+ android:valueType="floatType" />
+ </set>
+ </aapt:attr>
+ </target>
+</animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenrecord.xml
new file mode 100644
index 000000000000..a875a23c3a17
--- /dev/null
+++ b/packages/overlays/IconPackRoundedSystemUIOverlay/res/drawable/ic_screenrecord.xml
@@ -0,0 +1,18 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M4.13,17.62c-0.25,0-0.5-0.13-0.64-0.35c-1.98-3.2-1.98-7.33,0-10.53c0.22-0.35,0.68-0.46,1.03-0.24 c0.35,0.22,0.46,0.68,0.24,1.03c-1.68,2.72-1.68,6.23,0,8.95c0.22,0.35,0.11,0.81-0.24,1.03C4.4,17.58,4.27,17.62,4.13,17.62z M17.51,4.53c0.22-0.35,0.11-0.81-0.24-1.03c-3.2-1.98-7.33-1.98-10.53,0C6.39,3.71,6.28,4.17,6.49,4.53 c0.22,0.35,0.68,0.46,1.03,0.24c2.72-1.68,6.23-1.68,8.95,0c0.12,0.08,0.26,0.11,0.39,0.11C17.12,4.88,17.36,4.76,17.51,4.53z M17.26,20.51c0.35-0.22,0.46-0.68,0.24-1.03c-0.22-0.35-0.68-0.46-1.03-0.24c-2.72,1.68-6.23,1.68-8.95,0 c-0.35-0.22-0.81-0.11-1.03,0.24c-0.22,0.35-0.11,0.81,0.24,1.03c1.6,0.99,3.43,1.49,5.26,1.49S15.66,21.5,17.26,20.51z M20.51,17.26c1.98-3.2,1.98-7.33,0-10.53c-0.22-0.35-0.68-0.46-1.03-0.24c-0.35,0.22-0.46,0.68-0.24,1.03 c1.68,2.72,1.68,6.23,0,8.95c-0.22,0.35-0.11,0.81,0.24,1.03c0.12,0.08,0.26,0.11,0.39,0.11C20.12,17.62,20.36,17.49,20.51,17.26z M16,12c0-2.21-1.79-4-4-4c-2.21,0-4,1.79-4,4c0,2.21,1.79,4,4,4C14.21,16,16,14.21,16,12z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/Android.mk b/packages/overlays/IconPackSamAndroidOverlay/Android.mk
new file mode 100644
index 000000000000..3a65af10af09
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/Android.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2020, 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.
+#
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackSamAndroid
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackSamAndroidOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamAndroidOverlay/AndroidManifest.xml b/packages/overlays/IconPackSamAndroidOverlay/AndroidManifest.xml
new file mode 100644
index 000000000000..7c5a8a256448
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/AndroidManifest.xml
@@ -0,0 +1,22 @@
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.theme.icon_pack.sam.android"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <overlay android:targetPackage="android" android:category="android.theme.customization.icon_pack.android" android:priority="1"/>
+ <application android:label="Sam" android:hasCode="false"/>
+</manifest>
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm.xml
new file mode 100644
index 000000000000..bc271b806c42
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_audio_alarm.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?android:attr/colorControlNormal"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M21.18,5.01l-3.07,-2.56c-0.42,-0.35 -1.05,-0.3 -1.41,0.13v0C16.34,3 16.4,3.63 16.82,3.99l3.07,2.56c0.42,0.35 1.05,0.3 1.41,-0.13C21.66,6 21.6,5.37 21.18,5.01z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M4.1,6.55l3.07,-2.56C7.6,3.63 7.66,3 7.3,2.58l0,0C6.95,2.15 6.32,2.1 5.9,2.45L2.82,5.01C2.4,5.37 2.34,6 2.7,6.42l0,0C3.05,6.85 3.68,6.9 4.1,6.55z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,4c-4.97,0 -9,4.03 -9,9c0,4.97 4.03,9 9,9s9,-4.03 9,-9C21,8.03 16.97,4 12,4zM15.5,16.5L15.5,16.5c-0.39,0.39 -1.03,0.39 -1.42,0L11.58,14C11.21,13.62 11,13.11 11,12.58V9c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v3.59l2.5,2.49C15.89,15.47 15.89,16.11 15.5,16.5z"/>
+</vector>
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml
new file mode 100644
index 000000000000..c2e4fdfac881
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_bluetooth_transient_animation.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M6.51 12 C6.51,11.17 5.83,10.5 5.01,10.5 C4.18,10.5 3.51,11.17 3.51,12 C3.51,12.83 4.18,13.5 5.01,13.5 C5.83,13.5 6.51,12.83 6.51,12c "/><path android:name="_R_G_L_0_G_D_1_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M19.01 10.5 C18.18,10.5 17.51,11.17 17.51,12 C17.51,12.83 18.18,13.5 19.01,13.5 C19.83,13.5 20.51,12.83 20.51,12 C20.51,11.17 19.83,10.5 19.01,10.5c "/><path android:name="_R_G_L_0_G_D_2_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M17.01 7.5 C17.01,5.02 14.99,3 12.51,3 C12.51,3 12.01,3 12.01,3 C11.45,3 11.01,3.45 11.01,4 C11.01,4 11.01,12 11.01,12 C11.01,12 12.51,12 12.51,12 C14.99,12 17.01,9.99 17.01,7.5c "/><path android:name="_R_G_L_0_G_D_3_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M17.01 16.5 C17.01,14.02 14.99,12 12.51,12 C12.51,12 11.01,12 11.01,12 C11.01,12 11.01,20 11.01,20 C11.01,20.55 11.45,21 12.01,21 C12.01,21 12.51,21 12.51,21 C14.99,21 17.01,18.99 17.01,16.5c "/><path android:name="_R_G_L_0_G_D_4_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M5.44 6 C5.44,6 11.44,12 11.44,12 "/><path android:name="_R_G_L_0_G_D_5_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M5.44 18 C5.44,18 11.44,12 11.44,12 "/></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="0" android:valueFrom="1" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="233" android:startOffset="17" android:valueFrom="0.5" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="250" android:valueFrom="0.5" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="233" android:startOffset="267" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="500" android:valueFrom="1" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="233" android:startOffset="517" android:valueFrom="0.5" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="750" android:valueFrom="0.5" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_1_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="250" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="250" android:valueFrom="1" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="233" android:startOffset="267" android:valueFrom="0.5" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="500" android:valueFrom="0.5" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="233" android:startOffset="517" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="750" android:valueFrom="1" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="1017" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml
new file mode 100644
index 000000000000..59b519cb7ca8
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_hotspot_transient_animation.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M12 11 C10.9,11 10,11.9 10,13 C10,13.55 10.23,14.05 10.59,14.41 C10.95,14.77 11.45,15 12,15 C12.55,15 13.05,14.77 13.41,14.41 C13.77,14.05 14,13.55 14,13 C14,11.9 13.1,11 12,11c "/><path android:name="_R_G_L_0_G_D_1_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M7.82 15.74 C7.3,14.96 7,14.01 7,13 C7,10.24 9.24,8 12,8 C14.76,8 17,10.24 17,13 C17,14.02 16.7,14.96 16.18,15.75 "/><path android:name="_R_G_L_0_G_D_2_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M4.88 18.5 C3.7,16.98 3,15.07 3,13 C3,8.03 7.03,4 12,4 C16.97,4 21,8.03 21,13 C21,15.07 20.3,16.98 19.12,18.5 "/></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="0" android:valueFrom="1" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="583" android:startOffset="17" android:valueFrom="0.5" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="600" android:valueFrom="0.5" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_1_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="strokeAlpha" android:duration="200" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="strokeAlpha" android:duration="17" android:startOffset="200" android:valueFrom="1" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="strokeAlpha" android:duration="583" android:startOffset="217" android:valueFrom="0.5" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="strokeAlpha" android:duration="17" android:startOffset="800" android:valueFrom="0.5" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_2_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="strokeAlpha" android:duration="400" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="strokeAlpha" android:duration="17" android:startOffset="400" android:valueFrom="1" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="strokeAlpha" android:duration="583" android:startOffset="417" android:valueFrom="0.5" android:valueTo="0.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="strokeAlpha" android:duration="17" android:startOffset="1000" android:valueFrom="0.5" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="1250" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..b5d4555a22f9
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M8.75,11c0.41,0 0.75,-0.34 0.75,-0.75V8.5h1.75C11.66,8.5 12,8.16 12,7.75C12,7.34 11.66,7 11.25,7H9C8.45,7 8,7.45 8,8v2.25C8,10.66 8.34,11 8.75,11z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12.75,17H15c0.55,0 1,-0.45 1,-1v-2.25c0,-0.41 -0.34,-0.75 -0.75,-0.75s-0.75,0.34 -0.75,0.75v1.75h-1.75c-0.41,0 -0.75,0.34 -0.75,0.75C12,16.66 12.34,17 12.75,17z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M16,1H8C6.34,1 5,2.34 5,4v16c0,1.65 1.35,3 3,3h8c1.65,0 3,-1.35 3,-3V4C19,2.34 17.66,1 16,1zM17,18H7V6h10V18z"/>
+</vector>
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml
new file mode 100644
index 000000000000..b3b0f5177f6a
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_signal_wifi_transient_animation.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_4_G"><path android:name="_R_G_L_4_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M12 4 C8.62,4 5.2,5.18 2.77,7.16 C1.89,7.87 1.73,9.16 2.47,10.03 C2.47,10.03 10.47,19.29 10.47,19.29 C11.27,20.24 12.73,20.24 13.53,19.29 C13.53,19.29 21.54,10.03 21.54,10.03 C22.27,9.16 22.11,7.87 21.23,7.16 C18.8,5.18 15.38,4 12,4c "/></group><group android:name="_R_G_L_3_G"><path android:name="_R_G_L_3_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="0" android:fillType="nonZero" android:pathData=" M12.01 13 C9.91,13 7.91,13.9 6.61,15.4 C6.61,15.4 9.69,19.16 9.69,19.16 C10.89,20.63 13.13,20.63 14.33,19.16 C14.33,19.16 17.41,15.4 17.41,15.4 C16.11,13.9 14.11,13 12.01,13c "/></group><group android:name="_R_G_L_2_G"><path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="0" android:fillType="nonZero" android:pathData=" M12.01 10 C9.21,10 6.51,11.2 4.81,13.2 C4.81,13.2 9.69,19.16 9.69,19.16 C10.89,20.63 13.13,20.63 14.33,19.16 C14.33,19.16 19.21,13.2 19.21,13.2 C17.51,11.2 14.81,10 12.01,10c "/></group><group android:name="_R_G_L_1_G"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="0" android:fillType="nonZero" android:pathData=" M12 7 C8.5,7 5.2,8.5 3,11 C3,11 9.68,19.16 9.68,19.16 C10.88,20.63 13.12,20.63 14.32,19.16 C14.32,19.16 21,11 21,11 C18.8,8.5 15.5,7 12,7c "/></group><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="0" android:fillType="nonZero" android:pathData=" M12.01 4 C8.63,4 5.21,5.18 2.78,7.16 C1.89,7.87 1.74,9.16 2.47,10.03 C2.47,10.03 10.48,19.29 10.48,19.29 C11.28,20.24 12.74,20.24 13.54,19.29 C13.54,19.29 21.54,10.03 21.54,10.03 C22.27,9.16 22.12,7.87 21.24,7.16 C18.81,5.18 15.39,4 12.01,4c "/></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_3_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="150" android:startOffset="0" android:valueFrom="0" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="150" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_2_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="317" android:startOffset="0" android:valueFrom="0" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="317" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="483" android:startOffset="0" android:valueFrom="0" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="483" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="fillAlpha" android:duration="650" android:startOffset="0" android:valueFrom="0" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="fillAlpha" android:duration="17" android:startOffset="650" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="850" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_work_apps_off.xml b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_work_apps_off.xml
new file mode 100644
index 000000000000..0e534e00f89f
--- /dev/null
+++ b/packages/overlays/IconPackSamAndroidOverlay/res/drawable/ic_work_apps_off.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="32dp" android:viewportHeight="24" android:viewportWidth="24" android:width="32dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M21.81,18.98C21.92,18.67,22,18.35,22,18V9c0-1.66-1.34-3-3-3h-3c0-2.21-1.79-4-4-4c-1.95,0-3.57,1.4-3.92,3.24 L21.81,18.98z M12,4c1.1,0,2,0.9,2,2h-4C10,4.9,10.9,4,12,4z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M20.56,20.55l-17-17c0,0,0,0,0,0L3.45,3.44c-0.39-0.39-1.02-0.39-1.41,0s-0.39,1.02,0,1.41l1.53,1.53 C2.64,6.89,2,7.87,2,9v9c0,1.66,1.34,3,3,3h13.18l0.96,0.96c0.2,0.2,0.45,0.29,0.71,0.29s0.51-0.1,0.71-0.29 C20.94,21.57,20.94,20.94,20.56,20.55C20.56,20.55,20.56,20.55,20.56,20.55z M12,15c-0.83,0-1.5-0.67-1.5-1.5 c0-0.06,0.01-0.11,0.02-0.16l1.65,1.65C12.11,14.99,12.06,15,12,15z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..b5d4555a22f9
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M8.75,11c0.41,0 0.75,-0.34 0.75,-0.75V8.5h1.75C11.66,8.5 12,8.16 12,7.75C12,7.34 11.66,7 11.25,7H9C8.45,7 8,7.45 8,8v2.25C8,10.66 8.34,11 8.75,11z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12.75,17H15c0.55,0 1,-0.45 1,-1v-2.25c0,-0.41 -0.34,-0.75 -0.75,-0.75s-0.75,0.34 -0.75,0.75v1.75h-1.75c-0.41,0 -0.75,0.34 -0.75,0.75C12,16.66 12.34,17 12.75,17z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M16,1H8C6.34,1 5,2.34 5,4v16c0,1.65 1.35,3 3,3h8c1.65,0 3,-1.35 3,-3V4C19,2.34 17.66,1 16,1zM17,18H7V6h10V18z"/>
+</vector>
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_select.xml
new file mode 100644
index 000000000000..86a15e6958f4
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_select.xml
@@ -0,0 +1,24 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M18.45,14.43l-3.23,-1.61c-0.42,-0.21 -0.88,-0.32 -1.34,-0.32H13.5v-5C13.5,6.67 12.83,6 12,6s-1.5,0.67 -1.5,1.5v9.12c0,0.32 -0.29,0.55 -0.6,0.49l-2.84,-0.6c-0.37,-0.08 -0.76,0.04 -1.03,0.31C5.6,17.26 5.6,17.96 6.04,18.4l3.71,3.71c0.56,0.57 1.33,0.89 2.12,0.89h4.82c1.49,0 2.76,-1.1 2.97,-2.58l0.41,-2.89C20.26,16.26 19.6,15.01 18.45,14.43zM3,8.25c0.41,0 0.75,0.34 0.75,0.75S3.41,9.75 3,9.75S2.25,9.41 2.25,9S2.59,8.25 3,8.25zM6,8.25c0.41,0 0.75,0.34 0.75,0.75S6.41,9.75 6,9.75C5.59,9.75 5.25,9.41 5.25,9S5.59,8.25 6,8.25zM18,8.25c0.41,0 0.75,0.34 0.75,0.75S18.41,9.75 18,9.75S17.25,9.41 17.25,9S17.59,8.25 18,8.25zM21,8.25c0.41,0 0.75,0.34 0.75,0.75S21.41,9.75 21,9.75S20.25,9.41 20.25,9S20.59,8.25 21,8.25zM12,2.25c0.41,0 0.75,0.34 0.75,0.75S12.41,3.75 12,3.75S11.25,3.41 11.25,3S11.59,2.25 12,2.25zM15,2.25c0.41,0 0.75,0.34 0.75,0.75S15.41,3.75 15,3.75S14.25,3.41 14.25,3S14.59,2.25 15,2.25zM3,2.25c0.41,0 0.75,0.34 0.75,0.75S3.41,3.75 3,3.75S2.25,3.41 2.25,3S2.59,2.25 3,2.25zM6,2.25c0.41,0 0.75,0.34 0.75,0.75S6.41,3.75 6,3.75C5.59,3.75 5.25,3.41 5.25,3S5.59,2.25 6,2.25zM9,2.25c0.41,0 0.75,0.34 0.75,0.75S9.41,3.75 9,3.75S8.25,3.41 8.25,3S8.59,2.25 9,2.25zM18,2.25c0.41,0 0.75,0.34 0.75,0.75S18.41,3.75 18,3.75S17.25,3.41 17.25,3S17.59,2.25 18,2.25zM21,2.25c0.41,0 0.75,0.34 0.75,0.75S21.41,3.75 21,3.75S20.25,3.41 20.25,3S20.59,2.25 21,2.25zM3,5.25c0.41,0 0.75,0.34 0.75,0.75c0,0.41 -0.34,0.75 -0.75,0.75S2.25,6.41 2.25,6C2.25,5.59 2.59,5.25 3,5.25zM21,5.25c0.41,0 0.75,0.34 0.75,0.75c0,0.41 -0.34,0.75 -0.75,0.75S20.25,6.41 20.25,6C20.25,5.59 20.59,5.25 21,5.25z"/>
+</vector>
diff --git a/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_share.xml
new file mode 100644
index 000000000000..4aaa6593ecf2
--- /dev/null
+++ b/packages/overlays/IconPackSamLauncherOverlay/res/drawable/ic_share.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillAlpha="0.24" android:fillColor="#3C00FF" android:pathData="M0,0v24h24V0H0z M22,22H2V2h20V22z" android:strokeAlpha="0.24" android:strokeWidth="1"/>
+ <path android:fillColor="#0081FF" android:pathData="M18,2.1c1.05,0,1.9,0.85,1.9,1.9v16c0,1.05-0.85,1.9-1.9,1.9H6c-1.05,0-1.9-0.85-1.9-1.9V4 c0-1.05,0.85-1.9,1.9-1.9H18 M18,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2L18,2z"/>
+ <path android:fillColor="#0081FF" android:pathData="M20,4.1c1.05,0,1.9,0.85,1.9,1.9v12c0,1.05-0.85,1.9-1.9,1.9H4c-1.05,0-1.9-0.85-1.9-1.9V6 c0-1.05,0.85-1.9,1.9-1.9H20 M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4L20,4z"/>
+ <path android:fillColor="#0081FF" android:pathData="M19,3.1c1.05,0,1.9,0.85,1.9,1.9v14c0,1.05-0.85,1.9-1.9,1.9H5c-1.05,0-1.9-0.85-1.9-1.9V5 c0-1.05,0.85-1.9,1.9-1.9H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/>
+ <path android:fillColor="#0081FF" android:pathData="M12,6.1c3.25,0,5.9,2.65,5.9,5.9s-2.65,5.9-5.9,5.9S6.1,15.25,6.1,12S8.75,6.1,12,6.1 M12,6 c-3.31,0-6,2.69-6,6s2.69,6,6,6c3.31,0,6-2.69,6-6S15.31,6,12,6L12,6z"/>
+ <path android:fillColor="#0081FF" android:pathData="M21.9,2.1v19.8H2.1V2.1H21.9 M22,2H2v20h20V2L22,2z"/>
+ <path android:fillColor="#0081FF" android:pathData="M12,2.1c5.46,0,9.9,4.44,9.9,9.9s-4.44,9.9-9.9,9.9S2.1,17.46,2.1,12S6.54,2.1,12,2.1 M12,2 C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2L12,2z"/>
+ <path android:pathData="M 2 2 L 22 22" android:strokeColor="#0081FF" android:strokeMiterLimit="10" android:strokeWidth="0.1"/>
+ <path android:pathData="M 22 2 L 2 22" android:strokeColor="#0081FF" android:strokeMiterLimit="10" android:strokeWidth="0.1"/>
+ <path android:pathData="M 18 5 L 6 12" android:strokeColor="#000000" android:strokeMiterLimit="10" android:strokeWidth="2"/>
+ <path android:pathData="M 18 19 L 6 12" android:strokeColor="#000000" android:strokeMiterLimit="10" android:strokeWidth="2"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 18 2 C 19.6568542495 2 21 3.34314575051 21 5 C 21 6.65685424949 19.6568542495 8 18 8 C 16.3431457505 8 15 6.65685424949 15 5 C 15 3.34314575051 16.3431457505 2 18 2 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 18 16 C 19.6568542495 16 21 17.3431457505 21 19 C 21 20.6568542495 19.6568542495 22 18 22 C 16.3431457505 22 15 20.6568542495 15 19 C 15 17.3431457505 16.3431457505 16 18 16 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 6 9 C 7.65685424949 9 9 10.3431457505 9 12 C 9 13.6568542495 7.65685424949 15 6 15 C 4.34314575051 15 3 13.6568542495 3 12 C 3 10.3431457505 4.34314575051 9 6 9 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_accessibility_generic.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_accessibility_generic.xml
new file mode 100644
index 000000000000..3be42b3c88ab
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_accessibility_generic.xml
@@ -0,0 +1,22 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M20.75,4.99c-0.14-0.55-0.69-0.87-1.24-0.75C17.13,4.77,14.48,5,12,5S6.87,4.77,4.49,4.24c-0.55-0.12-1.1,0.2-1.24,0.75 c-0.14,0.56,0.2,1.13,0.75,1.26C5.61,6.61,7.35,6.86,9,7v12c0,0.55,0.45,1,1,1s1-0.45,1-1v-4c0-0.55,0.45-1,1-1s1,0.45,1,1v4 c0,0.55,0.45,1,1,1s1-0.45,1-1V7c1.65-0.14,3.39-0.39,4.99-0.75C20.55,6.12,20.89,5.55,20.75,4.99z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 12 0 C 13.1045694997 0 14 0.895430500338 14 2 C 14 3.10456949966 13.1045694997 4 12 4 C 10.8954305003 4 10 3.10456949966 10 2 C 10 0.895430500338 10.8954305003 0 12 0 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 8 22 C 8.55228474983 22 9 22.4477152502 9 23 C 9 23.5522847498 8.55228474983 24 8 24 C 7.44771525017 24 7 23.5522847498 7 23 C 7 22.4477152502 7.44771525017 22 8 22 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 12 22 C 12.5522847498 22 13 22.4477152502 13 23 C 13 23.5522847498 12.5522847498 24 12 24 C 11.4477152502 24 11 23.5522847498 11 23 C 11 22.4477152502 11.4477152502 22 12 22 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 16 22 C 16.5522847498 22 17 22.4477152502 17 23 C 17 23.5522847498 16.5522847498 24 16 24 C 15.4477152502 24 15 23.5522847498 15 23 C 15 22.4477152502 15.4477152502 22 16 22 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_restore.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_restore.xml
new file mode 100644
index 000000000000..c41ec1854c98
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_restore.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M13,3c-4.76,0-8.64,3.69-8.97,8.37l-1.12-1.12c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l2.08,2.09 c0.78,0.78,2.05,0.78,2.83,0l2.09-2.09c0.39-0.39,0.39-1.02,0-1.41l0,0c-0.39-0.39-1.02-0.39-1.41,0L6.04,11.3 c0.36-3.64,3.5-6.46,7.28-6.29c3.63,0.16,6.63,3.25,6.68,6.88c0.06,3.92-3.09,7.11-7,7.11c-1.61,0-3.1-0.55-4.28-1.47 c-0.4-0.31-0.96-0.28-1.32,0.08c-0.42,0.42-0.39,1.13,0.08,1.5c1.71,1.33,3.91,2.06,6.29,1.87c4.2-0.35,7.67-3.7,8.16-7.88 C22.58,7.63,18.33,3,13,3z M4.69,12.03L4.66,12h0.05C4.7,12.01,4.7,12.02,4.69,12.03z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M13,7c-0.55,0-1,0.45-1,1v3.58c0,0.53,0.21,1.04,0.58,1.41l2.5,2.51c0.39,0.39,1.02,0.39,1.42,0l0,0 c0.39-0.39,0.39-1.02,0-1.42L14,11.59V8C14,7.45,13.55,7,13,7z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_force_stop.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_force_stop.xml
new file mode 100644
index 000000000000..f3dd2a1046d8
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_force_stop.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M21.26,18L13.73,4.99c-0.77-1.33-2.69-1.33-3.46,0L2.74,18c-0.77,1.33,0.19,3,1.73,3h15.06C21.07,21,22.03,19.33,21.26,18 z M4.47,19L12,5.99L19.53,19H4.47z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M11,11v3c0,0.55,0.45,1,1,1c0.55,0,1-0.45,1-1v-3c0-0.55-0.45-1-1-1C11.45,10,11,10.45,11,11z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 12 16 C 12.5522847498 16 13 16.4477152502 13 17 C 13 17.5522847498 12.5522847498 18 12 18 C 11.4477152502 18 11 17.5522847498 11 17 C 11 16.4477152502 11.4477152502 16 12 16 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_gestures.xml b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_gestures.xml
new file mode 100644
index 000000000000..f992127b8b05
--- /dev/null
+++ b/packages/overlays/IconPackSamSettingsOverlay/res/drawable/ic_settings_gestures.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M18,17c-0.55,0-1,0.45-1,1H7V6h10c0,0.55,0.45,1,1,1s1-0.45,1-1V4c0-1.66-1.34-3-3-3H8C6.34,1,5,2.34,5,4v16 c0,1.65,1.35,3,3,3h8c1.65,0,3-1.35,3-3v-2C19,17.45,18.55,17,18,17z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M21.8,8.68l-0.49-0.23c-0.34-0.16-0.61-0.43-0.77-0.77L20.32,7.2c-0.13-0.27-0.51-0.27-0.63,0l-0.23,0.49 c-0.16,0.34-0.43,0.61-0.77,0.77L18.2,8.68c-0.27,0.13-0.27,0.51,0,0.63l0.49,0.23c0.34,0.16,0.61,0.43,0.77,0.77l0.23,0.49 c0.13,0.27,0.51,0.27,0.63,0l0.23-0.49c0.16-0.34,0.43-0.61,0.77-0.77l0.49-0.23C22.07,9.19,22.07,8.81,21.8,8.68z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M19.7,12.53l-0.95-0.45c-0.36-0.17-0.65-0.46-0.82-0.82l-0.45-0.95c-0.19-0.4-0.76-0.4-0.95,0l-0.45,0.95 c-0.17,0.36-0.46,0.65-0.82,0.82l-0.95,0.45c-0.4,0.19-0.4,0.76,0,0.95l0.95,0.45c0.36,0.17,0.65,0.46,0.82,0.82l0.45,0.95 c0.19,0.4,0.76,0.4,0.95,0l0.45-0.95c0.17-0.36,0.46-0.65,0.82-0.82l0.95-0.45C20.1,13.29,20.1,12.71,19.7,12.53z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/Android.mk b/packages/overlays/IconPackSamSystemUIOverlay/Android.mk
new file mode 100644
index 000000000000..9f65a4c1c275
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2020, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackSamSystemUI
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackSamSystemUIOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_lock.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_lock.xml
new file mode 100644
index 000000000000..8d9d015262ed
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_lock.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="32dp" android:width="24dp" android:viewportHeight="32" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_1_G_T_1" android:translateX="12.006" android:translateY="19.001"><group android:name="_R_G_L_1_G" android:translateX="-12.006" android:translateY="-15"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c "/></group></group><group android:name="_R_G_L_0_G_N_3_T_1" android:translateX="12.006" android:translateY="19.001"><group android:name="_R_G_L_0_G_N_3_T_0" android:translateX="-12.006" android:translateY="-15"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M14.95 10 C14.95,10 14.95,5.28 14.95,5.28 C14.95,3.35 16.47,1.94 18.39,1.97 C20.41,2.01 21.85,3.13 21.85,5.06 C21.85,5.06 21.85,5.06 21.85,5.06 "/></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_1_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="450" android:startOffset="0" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="67" android:startOffset="450" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17.37 C10.7,17.37 9.64,16.31 9.64,15 C9.64,13.69 10.7,12.63 12.01,12.63 C13.31,12.63 14.38,13.69 14.38,15 C14.38,16.31 13.31,17.37 12.01,17.37c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="183" android:startOffset="517" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17.37 C10.7,17.37 9.64,16.31 9.64,15 C9.64,13.69 10.7,12.63 12.01,12.63 C13.31,12.63 14.38,13.69 14.38,15 C14.38,16.31 13.31,17.37 12.01,17.37c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="400" android:startOffset="0" android:valueFrom="19.001" android:valueTo="19.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="67" android:startOffset="400" android:valueFrom="19.001" android:valueTo="20.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="83" android:startOffset="467" android:valueFrom="20.5" android:valueTo="19.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="317" android:startOffset="0" android:valueFrom="M14.95 10 C14.95,10 14.95,5.28 14.95,5.28 C14.95,3.35 16.47,1.94 18.39,1.97 C20.41,2.01 21.85,3.13 21.85,5.06 C21.85,5.06 21.85,5.06 21.85,5.06 " android:valueTo="M15.54 10 C15.54,10 15.54,2.5 15.54,2.5 C15.54,0.57 13.97,-1 12.04,-1 C10.11,-1 8.54,0.57 8.54,2.5 C8.54,2.5 8.54,3.38 8.54,3.38 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="133" android:startOffset="317" android:valueFrom="M15.54 10 C15.54,10 15.54,2.5 15.54,2.5 C15.54,0.57 13.97,-1 12.04,-1 C10.11,-1 8.54,0.57 8.54,2.5 C8.54,2.5 8.54,3.38 8.54,3.38 " android:valueTo="M15.54 10 C15.54,10 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.54,10 8.54,10 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="400" android:startOffset="0" android:valueFrom="19.001" android:valueTo="19.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="67" android:startOffset="400" android:valueFrom="19.001" android:valueTo="20.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="83" android:startOffset="467" android:valueFrom="20.5" android:valueTo="19.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_scanning.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_scanning.xml
new file mode 100644
index 000000000000..27564a084ded
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_scanning.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="32dp" android:width="24dp" android:viewportHeight="32" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_1_G" android:translateY="4.001000000000001" android:pivotX="12.006" android:pivotY="15" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c "/></group><group android:name="_R_G_L_0_G_N_3_T_0" android:translateY="4.001000000000001" android:pivotX="12.006" android:pivotY="15" android:scaleX="1" android:scaleY="1"><group android:name="_R_G_L_0_G_T_1" android:translateX="12" android:translateY="12"><group android:name="_R_G_L_0_G" android:translateX="-12" android:translateY="-12"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M15.54 10 C15.54,10 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.54,10 8.54,10 "/></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_1_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="67" android:startOffset="0" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="117" android:startOffset="67" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 16.32 C11.28,16.32 10.69,15.73 10.69,15 C10.69,14.27 11.28,13.69 12.01,13.69 C12.73,13.69 13.32,14.27 13.32,15 C13.32,15.73 12.73,16.32 12.01,16.32c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="333" android:startOffset="183" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 16.32 C11.28,16.32 10.69,15.73 10.69,15 C10.69,14.27 11.28,13.69 12.01,13.69 C12.73,13.69 13.32,14.27 13.32,15 C13.32,15.73 12.73,16.32 12.01,16.32c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="150" android:startOffset="0" android:valueFrom="M15.54 10 C15.54,10 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.54,10 8.54,10 " android:valueTo="M15.55 7.75 C15.55,7.75 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.55,7.75 8.55,7.75 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="117" android:startOffset="150" android:valueFrom="M15.55 7.75 C15.55,7.75 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.55,7.75 8.55,7.75 " android:valueTo="M15.54 10 C15.54,10 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.54,10 8.54,10 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateXY" android:duration="150" android:startOffset="0" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,12C 12,12.41666665673256 12,14.5 12,14.5"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="117" android:startOffset="150" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,14.5C 12,14.5 12,12.41666665673256 12,12"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_to_error.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_to_error.xml
new file mode 100644
index 000000000000..e3c48aa40150
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_to_error.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_1_G" android:translateY="0.0009999999999994458" android:pivotX="12.006" android:pivotY="15" android:rotation="0"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c "/></group><group android:name="_R_G_L_0_G_N_3_T_0" android:translateY="0.0009999999999994458" android:pivotX="12.006" android:pivotY="15" android:rotation="0"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M15.54 10 C15.54,10 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.54,10 8.54,10 "/></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_1_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_unlock.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_unlock.xml
new file mode 100644
index 000000000000..9b97c0497b21
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/anim/lock_unlock.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="32dp" android:width="24dp" android:viewportHeight="32" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_1_G_T_1" android:translateX="12.006" android:translateY="19.001"><group android:name="_R_G_L_1_G" android:translateX="-12.006" android:translateY="-15"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c "/></group></group><group android:name="_R_G_L_0_G_N_3_T_1" android:translateX="12.006" android:translateY="19.001"><group android:name="_R_G_L_0_G_N_3_T_0" android:translateX="-12.006" android:translateY="-15"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M15.54 10 C15.54,10 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.54,10 8.54,10 "/></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_1_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="100" android:startOffset="0" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 16.83 C11,16.83 10.18,16.01 10.18,15 C10.18,13.99 11,13.17 12.01,13.17 C13.02,13.17 13.83,13.99 13.83,15 C13.83,16.01 13.02,16.83 12.01,16.83c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="283" android:startOffset="100" android:valueFrom=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 16.83 C11,16.83 10.18,16.01 10.18,15 C10.18,13.99 11,13.17 12.01,13.17 C13.02,13.17 13.83,13.99 13.83,15 C13.83,16.01 13.02,16.83 12.01,16.83c " android:valueTo=" M17.01 8 C17.01,8 7.01,8 7.01,8 C5.36,8 4.01,9.35 4.01,11 C4.01,11 4.01,19 4.01,19 C4.01,20.65 5.36,22 7.01,22 C7.01,22 17.01,22 17.01,22 C18.66,22 20.01,20.65 20.01,19 C20.01,19 20.01,11 20.01,11 C20.01,9.35 18.66,8 17.01,8c M12.01 17 C10.9,17 10.01,16.1 10.01,15 C10.01,13.9 10.9,13 12.01,13 C13.11,13 14.01,13.9 14.01,15 C14.01,16.1 13.11,17 12.01,17c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="0" android:valueFrom="19.001" android:valueTo="17.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="133" android:valueFrom="17.5" android:valueTo="20" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="100" android:startOffset="267" android:valueFrom="20" android:valueTo="19.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="67" android:startOffset="0" android:valueFrom="M15.54 10 C15.54,10 15.54,5.5 15.54,5.5 C15.54,3.57 13.97,2 12.04,2 C10.11,2 8.54,3.57 8.54,5.5 C8.54,5.5 8.54,10 8.54,10 " android:valueTo="M15.54 10 C15.54,10 15.54,2.5 15.54,2.5 C15.54,0.57 13.97,-1 12.04,-1 C10.11,-1 8.54,0.57 8.54,2.5 C8.54,2.5 8.54,3.38 8.54,3.38 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="333" android:startOffset="67" android:valueFrom="M15.54 10 C15.54,10 15.54,2.5 15.54,2.5 C15.54,0.57 13.97,-1 12.04,-1 C10.11,-1 8.54,0.57 8.54,2.5 C8.54,2.5 8.54,3.38 8.54,3.38 " android:valueTo="M14.95 10 C14.95,10 14.95,5.28 14.95,5.28 C14.95,3.35 16.47,1.94 18.39,1.97 C20.41,2.01 21.85,3.13 21.85,5.06 C21.85,5.06 21.85,5.06 21.85,5.06 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="0" android:valueFrom="19.001" android:valueTo="17.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="133" android:valueFrom="17.5" android:valueTo="20" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="100" android:startOffset="267" android:valueFrom="20" android:valueTo="19.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_brightness_thumb.xml
new file mode 100644
index 000000000000..681fd3aeb110
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_brightness_thumb.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="?android:attr/colorBackgroundFloating" android:pathData="M19.77,11.3l-1.48-1.48C18.11,9.63,18,9.38,18,9.11V7c0-0.55-0.45-1-1-1h-2.11c-0.26,0-0.51-0.11-0.7-0.29 l-1.48-1.48c-0.39-0.39-1.02-0.39-1.41,0L9.82,5.71C9.63,5.89,9.38,6,9.11,6H7C6.45,6,6,6.45,6,7v2.11c0,0.26-0.1,0.52-0.29,0.71 L4.23,11.3c-0.39,0.39-0.39,1.02,0,1.41l1.48,1.48C5.89,14.38,6,14.63,6,14.9V17c0,0.55,0.45,1,1,1h2.11c0.26,0,0.52,0.1,0.7,0.29 l1.48,1.48c0.39,0.39,1.02,0.39,1.41,0l1.48-1.48c0.19-0.18,0.44-0.29,0.71-0.29H17c0.55,0,1-0.45,1-1v-2.11 c0-0.26,0.11-0.52,0.29-0.7l1.48-1.48C20.16,12.32,20.16,11.68,19.77,11.3z M12,17c-2.76,0-5-2.24-5-5s2.24-5,5-5s5,2.24,5,5 S14.76,17,12,17z"/>
+ <path android:fillColor="?android:attr/colorControlActivated" android:pathData="M 12 7 C 14.7614237492 7 17 9.23857625085 17 12 C 17 14.7614237492 14.7614237492 17 12 17 C 9.23857625085 17 7 14.7614237492 7 12 C 7 9.23857625085 9.23857625085 7 12 7 Z"/>
+ <path android:fillColor="?android:attr/colorControlActivated" android:pathData="M21.19,9.88l-0.9-0.9C20.1,8.8,20,8.54,20,8.28V7c0-1.66-1.34-3-3-3h-1.28c-0.27,0-0.52-0.11-0.71-0.29l-0.9-0.9 c-1.17-1.17-3.07-1.17-4.24,0l-0.9,0.9C8.79,3.89,8.54,4,8.28,4H7C5.34,4,4,5.34,4,7v1.28c0,0.26-0.11,0.52-0.29,0.7l-0.9,0.9 c-1.17,1.17-1.17,3.07,0,4.24l0.9,0.9C3.89,15.2,4,15.46,4,15.72V17c0,1.66,1.34,3,3,3h1.28c0.27,0,0.52,0.11,0.71,0.29l0.9,0.9 c1.17,1.17,3.07,1.17,4.24,0l0.9-0.9C15.2,20.11,15.46,20,15.72,20H17c1.66,0,3-1.34,3-3v-1.28c0-0.27,0.11-0.52,0.29-0.71 l0.9-0.9C22.36,12.95,22.36,11.05,21.19,9.88z M19.77,12.71l-1.48,1.48c-0.18,0.18-0.29,0.44-0.29,0.7V17c0,0.55-0.45,1-1,1h-2.11 c-0.27,0-0.52,0.11-0.71,0.29l-1.48,1.48c-0.39,0.39-1.02,0.39-1.41,0l-1.48-1.48C9.63,18.1,9.37,18,9.11,18H7c-0.55,0-1-0.45-1-1 v-2.1c0-0.27-0.11-0.52-0.29-0.71l-1.48-1.48c-0.39-0.39-0.39-1.02,0-1.41l1.48-1.48C5.9,9.63,6,9.37,6,9.11V7c0-0.55,0.45-1,1-1 h2.11c0.27,0,0.52-0.11,0.71-0.29l1.48-1.48c0.39-0.39,1.02-0.39,1.41,0l1.48,1.48C14.38,5.89,14.63,6,14.89,6H17 c0.55,0,1,0.45,1,1v2.11c0,0.27,0.11,0.52,0.29,0.71l1.48,1.48C20.16,11.68,20.16,12.32,19.77,12.71z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenrecord.xml
new file mode 100644
index 000000000000..1a7c63c08894
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenrecord.xml
@@ -0,0 +1,18 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M12,16c-2.21,0-4-1.79-4-4c0-2.21,1.79-4,4-4c2.21,0,4,1.79,4,4C16,14.21,14.21,16,12,16z M4.7,17.36 c0.48-0.28,0.64-0.89,0.37-1.37c-1.39-2.41-1.42-5.41-0.08-7.84c0.27-0.48,0.09-1.09-0.39-1.36C4.11,6.52,3.5,6.7,3.23,7.18 c-1.67,3.04-1.64,6.8,0.1,9.81c0.19,0.32,0.52,0.5,0.87,0.5C4.37,17.49,4.54,17.45,4.7,17.36z M8.01,5.06 c2.4-1.39,5.41-1.42,7.84-0.08c0.48,0.27,1.09,0.09,1.36-0.39c0.27-0.48,0.09-1.09-0.39-1.36c-3.04-1.67-6.8-1.64-9.81,0.1 C6.53,3.61,6.37,4.22,6.64,4.7c0.19,0.32,0.52,0.5,0.87,0.5C7.68,5.2,7.85,5.16,8.01,5.06z M20.77,16.82 c1.67-3.04,1.64-6.8-0.1-9.81c-0.28-0.48-0.89-0.64-1.37-0.37c-0.48,0.28-0.64,0.89-0.37,1.37c1.39,2.41,1.42,5.41,0.08,7.84 c-0.27,0.48-0.09,1.09,0.39,1.36c0.15,0.08,0.32,0.12,0.48,0.12C20.24,17.33,20.58,17.15,20.77,16.82z M16.99,20.67 c0.48-0.28,0.64-0.89,0.37-1.37c-0.28-0.48-0.89-0.64-1.37-0.37c-2.41,1.39-5.41,1.42-7.84,0.08c-0.48-0.27-1.09-0.09-1.36,0.39 c-0.27,0.48-0.09,1.09,0.39,1.36C8.67,21.59,10.34,22,12,22C13.73,22,15.46,21.55,16.99,20.67z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..b5d4555a22f9
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M8.75,11c0.41,0 0.75,-0.34 0.75,-0.75V8.5h1.75C11.66,8.5 12,8.16 12,7.75C12,7.34 11.66,7 11.25,7H9C8.45,7 8,7.45 8,8v2.25C8,10.66 8.34,11 8.75,11z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12.75,17H15c0.55,0 1,-0.45 1,-1v-2.25c0,-0.41 -0.34,-0.75 -0.75,-0.75s-0.75,0.34 -0.75,0.75v1.75h-1.75c-0.41,0 -0.75,0.34 -0.75,0.75C12,16.66 12.34,17 12.75,17z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M16,1H8C6.34,1 5,2.34 5,4v16c0,1.65 1.35,3 3,3h8c1.65,0 3,-1.35 3,-3V4C19,2.34 17.66,1 16,1zM17,18H7V6h10V18z"/>
+</vector>
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml
new file mode 100644
index 000000000000..86ddf7a475c6
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_0_G_T_1" android:translateX="12" android:translateY="11.1"><group android:name="_R_G_L_0_G" android:translateX="-12" android:translateY="-12"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M5.27 9.97 C5.27,9.97 10.59,15.27 10.59,15.27 C11.31,16.03 12.66,16.03 13.42,15.27 C13.42,15.27 18.7,9.97 18.7,9.97 "/></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="250" android:startOffset="0" android:valueFrom="M5.27 9.97 C5.27,9.97 10.59,15.27 10.59,15.27 C11.31,16.03 12.66,16.03 13.42,15.27 C13.42,15.27 18.7,9.97 18.7,9.97 " android:valueTo="M5.28 14.94 C5.28,14.94 10.59,9.64 10.59,9.64 C11.37,8.86 12.63,8.86 13.41,9.64 C13.41,9.64 18.72,14.94 18.72,14.94 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="250" android:startOffset="0" android:valueFrom="11.1" android:valueTo="12" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="267" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml
new file mode 100644
index 000000000000..8a7766a9211d
--- /dev/null
+++ b/packages/overlays/IconPackSamSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_0_G_T_1" android:translateX="12" android:translateY="12"><group android:name="_R_G_L_0_G" android:translateX="-12" android:translateY="-12"><path android:name="_R_G_L_0_G_D_0_P_0" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="2" android:strokeAlpha="1" android:pathData=" M5.28 14.94 C5.28,14.94 10.59,9.64 10.59,9.64 C11.37,8.86 12.63,8.86 13.41,9.64 C13.41,9.64 18.72,14.94 18.72,14.94 "/></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="250" android:startOffset="0" android:valueFrom="M5.28 14.94 C5.28,14.94 10.59,9.64 10.59,9.64 C11.37,8.86 12.63,8.86 13.41,9.64 C13.41,9.64 18.72,14.94 18.72,14.94 " android:valueTo="M5.27 9.97 C5.27,9.97 10.59,15.27 10.59,15.27 C11.31,16.03 12.66,16.03 13.42,15.27 C13.42,15.27 18.7,9.97 18.7,9.97 " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="250" android:startOffset="0" android:valueFrom="12" android:valueTo="11.1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="267" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/Android.mk b/packages/overlays/IconPackVictorAndroidOverlay/Android.mk
new file mode 100644
index 000000000000..9c900dacc78b
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/Android.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2020, 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.
+#
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackVictorAndroid
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackVictorAndroidOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm.xml
new file mode 100644
index 000000000000..46be78160af7
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_audio_alarm.xml
@@ -0,0 +1,34 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?android:attr/colorControlNormal"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12.5,8l-1.5,0l0,5.5l3.54,3.54l1.06,-1.07l-3.1,-3.09z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M2.0575,5.6557l4.6068,-3.8442l0.961,1.1517l-4.6068,3.8442z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M16.3786,2.9637l0.961,-1.1517l4.6068,3.8442l-0.961,1.1517z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,4c-4.97,0 -9,4.03 -9,9s4.03,9 9,9s9,-4.03 9,-9S16.97,4 12,4zM12,20.5c-4.14,0 -7.5,-3.36 -7.5,-7.5S7.86,5.5 12,5.5s7.5,3.36 7.5,7.5S16.14,20.5 12,20.5z"/>
+</vector>
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_dnd.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_dnd.xml
new file mode 100644
index 000000000000..ef71006b7502
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_qs_dnd.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="17dp" android:viewportHeight="24" android:viewportWidth="24" android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M 7 11.25 H 17 V 12.75 H 7 V 11.25 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 c4.69,0,8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..cbd22c6bfeed
--- /dev/null
+++ b/packages/overlays/IconPackVictorAndroidOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M17.59,1H6.41L5,2.41v19.17L6.41,23h11.17L19,21.59V2.41L17.59,1zM17.5,2.5v1.75h-11V2.5H17.5zM17.5,5.75v12.5h-11V5.75H17.5zM6.5,21.5v-1.75h11v1.75H6.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9.5,11l0,-2.5l2.5,0l0,-1.5l-4,0l0,4z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,17l4,0l0,-4l-1.5,0l0,2.5l-2.5,0z"/>
+</vector>
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..cbd22c6bfeed
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M17.59,1H6.41L5,2.41v19.17L6.41,23h11.17L19,21.59V2.41L17.59,1zM17.5,2.5v1.75h-11V2.5H17.5zM17.5,5.75v12.5h-11V5.75H17.5zM6.5,21.5v-1.75h11v1.75H6.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9.5,11l0,-2.5l2.5,0l0,-1.5l-4,0l0,4z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,17l4,0l0,-4l-1.5,0l0,2.5l-2.5,0z"/>
+</vector>
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_select.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_select.xml
new file mode 100644
index 000000000000..05597dd66107
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_select.xml
@@ -0,0 +1,24 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M20.25,2.25h1.5v1.5h-1.5V2.25zM18.75,3.75h-1.5v-1.5h1.5V3.75zM15.75,3.75h-1.5v-1.5h1.5V3.75zM12.75,3.75h-1.5v-1.5h1.5V3.75zM9.75,3.75h-1.5v-1.5h1.5V3.75zM6.75,3.75h-1.5v-1.5h1.5V3.75zM2.25,2.25h1.5v1.5h-1.5V2.25zM2.25,5.25h1.5v1.5h-1.5V5.25zM2.25,8.25h1.5v1.5h-1.5V8.25zM18.75,9.75h-1.5v-1.5h1.5V9.75zM6.75,9.75h-1.5v-1.5h1.5V9.75zM20.25,8.25h1.5v1.5h-1.5V8.25zM20.25,5.25h1.5v1.5h-1.5V5.25zM16.07,12.5h-1.94V8.12C14.13,6.95 13.18,6 12,6S9.88,6.95 9.88,8.12v7.9l-3.22,-0.86l-1.82,1.82L10.56,23h8.6l1.57,-7.96L16.07,12.5zM17.92,21.5H11.2l-4.27,-4.49l0.18,-0.18l4.28,1.14V8.12c0,-0.34 0.28,-0.62 0.62,-0.62s0.62,0.28 0.62,0.62V14h3.06l3.35,1.83L17.92,21.5z"/>
+</vector>
diff --git a/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_share.xml b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_share.xml
new file mode 100644
index 000000000000..2ddb128f5499
--- /dev/null
+++ b/packages/overlays/IconPackVictorLauncherOverlay/res/drawable/ic_share.xml
@@ -0,0 +1,31 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillAlpha="0.24" android:fillColor="#3C00FF" android:pathData="M0,0v24h24V0H0z M22,22H2V2h20V22z" android:strokeAlpha="0.24" android:strokeWidth="1"/>
+ <path android:fillColor="#0081FF" android:pathData="M18,2.1c1.05,0,1.9,0.85,1.9,1.9v16c0,1.05-0.85,1.9-1.9,1.9H6c-1.05,0-1.9-0.85-1.9-1.9V4 c0-1.05,0.85-1.9,1.9-1.9H18 M18,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2L18,2z"/>
+ <path android:fillColor="#0081FF" android:pathData="M20,4.1c1.05,0,1.9,0.85,1.9,1.9v12c0,1.05-0.85,1.9-1.9,1.9H4c-1.05,0-1.9-0.85-1.9-1.9V6 c0-1.05,0.85-1.9,1.9-1.9H20 M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4L20,4z"/>
+ <path android:fillColor="#0081FF" android:pathData="M19,3.1c1.05,0,1.9,0.85,1.9,1.9v14c0,1.05-0.85,1.9-1.9,1.9H5c-1.05,0-1.9-0.85-1.9-1.9V5 c0-1.05,0.85-1.9,1.9-1.9H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/>
+ <path android:fillColor="#0081FF" android:pathData="M12,6.1c3.25,0,5.9,2.65,5.9,5.9s-2.65,5.9-5.9,5.9S6.1,15.25,6.1,12S8.75,6.1,12,6.1 M12,6 c-3.31,0-6,2.69-6,6s2.69,6,6,6c3.31,0,6-2.69,6-6S15.31,6,12,6L12,6z"/>
+ <path android:fillColor="#0081FF" android:pathData="M21.9,2.1v19.8H2.1V2.1H21.9 M22,2H2v20h20V2L22,2z"/>
+ <path android:fillColor="#0081FF" android:pathData="M12,2.1c5.46,0,9.9,4.44,9.9,9.9s-4.44,9.9-9.9,9.9S2.1,17.46,2.1,12S6.54,2.1,12,2.1 M12,2 C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2L12,2z"/>
+ <path android:pathData="M 2 2 L 22 22" android:strokeColor="#0081FF" android:strokeMiterLimit="10" android:strokeWidth="0.1"/>
+ <path android:pathData="M 22 2 L 2 22" android:strokeColor="#0081FF" android:strokeMiterLimit="10" android:strokeWidth="0.1"/>
+ <path android:fillColor="@android:color/white" android:pathData="M18,3.5c0.83,0,1.5,0.67,1.5,1.5S18.83,6.5,18,6.5S16.5,5.83,16.5,5S17.17,3.5,18,3.5 M18,2c-1.66,0-3,1.34-3,3 s1.34,3,3,3s3-1.34,3-3S19.66,2,18,2L18,2z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M18,17.5c0.83,0,1.5,0.67,1.5,1.5s-0.67,1.5-1.5,1.5s-1.5-0.67-1.5-1.5S17.17,17.5,18,17.5 M18,16c-1.66,0-3,1.34-3,3 s1.34,3,3,3s3-1.34,3-3S19.66,16,18,16L18,16z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M6,10.5c0.83,0,1.5,0.67,1.5,1.5S6.83,13.5,6,13.5S4.5,12.83,4.5,12S5.17,10.5,6,10.5 M6,9c-1.66,0-3,1.34-3,3s1.34,3,3,3 s3-1.34,3-3S7.66,9,6,9L6,9z"/>
+ <path android:pathData="M 16.01 6.16 L 8 10.83" android:strokeColor="#000000" android:strokeMiterLimit="10" android:strokeWidth="1.5"/>
+ <path android:pathData="M 16.06 17.87 L 8.19 13.28" android:strokeColor="#000000" android:strokeMiterLimit="10" android:strokeWidth="1.5"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_accessibility_generic.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_accessibility_generic.xml
new file mode 100644
index 000000000000..7f80c7d18df8
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_accessibility_generic.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M20.5,4c-2.61,0.7-5.67,1-8.5,1S6.11,4.7,3.5,4L3,6c1.86,0.5,4,0.83,6,1v13h2v-6h2v6h2V7c2-0.17,4.14-0.5,6-1L20.5,4z M12,4c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C10,3.1,10.9,4,12,4"/>
+ <path android:fillColor="@android:color/white" android:pathData="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml
new file mode 100644
index 000000000000..3a6836b2c03c
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_do_not_disturb_on_24dp.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M 7 11.25 H 17 V 12.75 H 7 V 11.25 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-4.48,10-10S17.52,2,12,2z M12,20.5c-4.69,0-8.5-3.81-8.5-8.5S7.31,3.5,12,3.5 c4.69,0,8.5,3.81,8.5,8.5S16.69,20.5,12,20.5z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_restore.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_restore.xml
new file mode 100644
index 000000000000..c41ec1854c98
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_restore.xml
@@ -0,0 +1,19 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M13,3c-4.76,0-8.64,3.69-8.97,8.37l-1.12-1.12c-0.39-0.39-1.02-0.39-1.41,0c-0.39,0.39-0.39,1.02,0,1.41l2.08,2.09 c0.78,0.78,2.05,0.78,2.83,0l2.09-2.09c0.39-0.39,0.39-1.02,0-1.41l0,0c-0.39-0.39-1.02-0.39-1.41,0L6.04,11.3 c0.36-3.64,3.5-6.46,7.28-6.29c3.63,0.16,6.63,3.25,6.68,6.88c0.06,3.92-3.09,7.11-7,7.11c-1.61,0-3.1-0.55-4.28-1.47 c-0.4-0.31-0.96-0.28-1.32,0.08c-0.42,0.42-0.39,1.13,0.08,1.5c1.71,1.33,3.91,2.06,6.29,1.87c4.2-0.35,7.67-3.7,8.16-7.88 C22.58,7.63,18.33,3,13,3z M4.69,12.03L4.66,12h0.05C4.7,12.01,4.7,12.02,4.69,12.03z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M13,7c-0.55,0-1,0.45-1,1v3.58c0,0.53,0.21,1.04,0.58,1.41l2.5,2.51c0.39,0.39,1.02,0.39,1.42,0l0,0 c0.39-0.39,0.39-1.02,0-1.42L14,11.59V8C14,7.45,13.55,7,13,7z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_force_stop.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_force_stop.xml
new file mode 100644
index 000000000000..ad873c2b8be1
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_force_stop.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M12.65,3.12h-1.3L1.6,19.87L2.25,21h19.5l0.65-1.13L12.65,3.12z M3.55,19.5L12,4.99l8.45,14.51H3.55z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 11.25 10 H 12.75 V 15 H 11.25 V 10 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 11.25 16.5 H 12.75 V 18 H 11.25 V 16.5 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_gestures.xml b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_gestures.xml
new file mode 100644
index 000000000000..45a3b24f729d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSettingsOverlay/res/drawable/ic_settings_gestures.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M17.5,18.25h-11V5.75h11V7H19V2.41L17.59,1H6.41L5,2.41v19.17L6.41,23h11.17L19,21.59V17h-1.5V18.25z M17.5,2.5v1.75h-11 V2.5H17.5z M6.5,21.5v-1.75h11v1.75H6.5z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 17.41 10 L 16.59 10 L 15.99 11.99 L 14 12.59 L 14 13.41 L 15.99 14.01 L 16.59 16 L 17.41 16 L 18.01 14.01 L 20 13.41 L 20 12.59 L 18.01 11.99 Z"/>
+ <path android:fillColor="@android:color/white" android:pathData="M 20.78 8.22 L 20.23 7 L 19.77 7 L 19.22 8.22 L 18 8.77 L 18 9.23 L 19.22 9.78 L 19.77 11 L 20.23 11 L 20.78 9.78 L 22 9.23 L 22 8.77 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/Android.mk b/packages/overlays/IconPackVictorSystemUIOverlay/Android.mk
new file mode 100644
index 000000000000..bd16eedd2990
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/Android.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2020, 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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := IconPackVictorSystemUI
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := IconPackVictorSystemUIOverlay
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_lock.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_lock.xml
new file mode 100644
index 000000000000..2c2239fbeff0
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_lock.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="32dp" android:width="24dp" android:viewportHeight="32" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_2_G_N_1_T_0" android:translateX="12" android:translateY="16"><group android:name="_R_G_L_2_G_T_1" android:translateY="3.001"><group android:name="_R_G_L_2_G" android:translateX="-12" android:translateY="-15"><path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M5.5 8 C5.5,8 4,9.5 4,9.5 C4,9.5 4,20.5 4,20.5 C4,20.5 5.5,22 5.5,22 C5.5,22 18.5,22 18.5,22 C18.5,22 20,20.5 20,20.5 C20,20.5 20,9.5 20,9.5 C20,9.5 18.5,8 18.5,8 C18.5,8 5.5,8 5.5,8c M18.5 20.5 C18.5,20.5 5.5,20.5 5.5,20.5 C5.5,20.5 5.5,9.5 5.5,9.5 C5.5,9.5 18.5,9.5 18.5,9.5 C18.5,9.5 18.5,20.5 18.5,20.5c "/></group></group></group><group android:name="_R_G_L_1_G_N_5_N_1_T_0" android:translateX="12" android:translateY="16"><group android:name="_R_G_L_1_G_N_5_T_1" android:translateY="3.001"><group android:name="_R_G_L_1_G_N_5_T_0" android:translateX="-12" android:translateY="-15"><group android:name="_R_G_L_1_G" android:pivotX="12" android:pivotY="15" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M12 17 C13.1,17 14,16.1 14,15 C14,13.9 13.1,13 12,13 C10.9,13 10,13.9 10,15 C10,16.1 10.9,17 12,17c "/></group></group></group></group><group android:name="_R_G_L_0_G_N_5_N_1_T_0" android:translateX="12" android:translateY="16"><group android:name="_R_G_L_0_G_N_5_T_1" android:translateY="3.001"><group android:name="_R_G_L_0_G_N_5_T_0" android:translateX="-12" android:translateY="-15"><group android:name="_R_G_L_0_G" android:translateY="-0.0009999999999994458"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M21.06 3.52 C21.06,3.52 15.99,3.53 15.99,3.53 C15.99,3.53 16,8 16,8 C16,8 14.5,8 14.5,8 C14.5,8 14.5,3.53 14.5,3.53 C14.5,3.53 15.98,2.02 15.98,2.02 C15.98,2.02 20.94,2.01 20.94,2.01 C20.94,2.01 22.44,3.54 22.44,3.54 C22.44,3.54 22.44,6.15 22.44,6.15 C22.44,6.15 21.04,6.16 21.04,6.16 C21.04,6.16 21.06,3.52 21.06,3.52c "/></group></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_2_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="400" android:startOffset="0" android:valueFrom="3.001" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="67" android:startOffset="400" android:valueFrom="3.001" android:valueTo="4.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="83" android:startOffset="467" android:valueFrom="4.5" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="450" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="450" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="67" android:startOffset="450" android:valueFrom="1" android:valueTo="1.1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="67" android:startOffset="450" android:valueFrom="1" android:valueTo="1.1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="517" android:valueFrom="1.1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="517" android:valueFrom="1.1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_N_5_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="400" android:startOffset="0" android:valueFrom="3.001" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="67" android:startOffset="400" android:valueFrom="3.001" android:valueTo="4.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="83" android:startOffset="467" android:valueFrom="4.5" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="100" android:startOffset="0" android:valueFrom="M21.06 3.52 C21.06,3.52 15.99,3.53 15.99,3.53 C15.99,3.53 16,8 16,8 C16,8 14.5,8 14.5,8 C14.5,8 14.5,3.53 14.5,3.53 C14.5,3.53 15.98,2.02 15.98,2.02 C15.98,2.02 20.94,2.01 20.94,2.01 C20.94,2.01 22.44,3.54 22.44,3.54 C22.44,3.54 22.44,6.15 22.44,6.15 C22.44,6.15 21.04,6.16 21.04,6.16 C21.04,6.16 21.06,3.52 21.06,3.52c " android:valueTo="M16.25 3.52 C16.25,3.52 15.99,3.53 15.99,3.53 C15.99,3.53 16,8 16,8 C16,8 14.5,8 14.5,8 C14.5,8 14.5,3.53 14.5,3.53 C14.5,3.53 15.68,2 15.68,2 C15.68,2 16.51,2 16.51,2 C16.51,2 17.58,3.53 17.58,3.53 C17.58,3.53 17.62,6.15 17.62,6.15 C17.62,6.15 16.26,6.16 16.26,6.16 C16.26,6.16 16.25,3.52 16.25,3.52c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.833,0.833 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="17" android:startOffset="100" android:valueFrom="M16.25 3.52 C16.25,3.52 15.99,3.53 15.99,3.53 C15.99,3.53 16,8 16,8 C16,8 14.5,8 14.5,8 C14.5,8 14.5,3.53 14.5,3.53 C14.5,3.53 15.68,2 15.68,2 C15.68,2 16.51,2 16.51,2 C16.51,2 17.58,3.53 17.58,3.53 C17.58,3.53 17.62,6.15 17.62,6.15 C17.62,6.15 16.26,6.16 16.26,6.16 C16.26,6.16 16.25,3.52 16.25,3.52c " android:valueTo="M15.98 3.51 C15.98,3.51 14.5,3.53 14.5,3.53 C14.5,3.53 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.53 16,3.53 C16,3.53 15.98,2.02 15.98,2.02 C15.98,2.02 14.5,2.01 14.5,2.01 C14.5,2.01 14.48,3.51 14.48,3.51 C14.48,3.51 14.48,6.17 14.48,6.17 C14.48,6.17 15.98,6.17 15.98,6.17 C15.98,6.17 15.98,3.51 15.98,3.51c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="233" android:startOffset="117" android:valueFrom="M15.98 3.51 C15.98,3.51 14.5,3.53 14.5,3.53 C14.5,3.53 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.53 16,3.53 C16,3.53 15.98,2.02 15.98,2.02 C15.98,2.02 14.5,2.01 14.5,2.01 C14.5,2.01 14.48,3.51 14.48,3.51 C14.48,3.51 14.48,6.17 14.48,6.17 C14.48,6.17 15.98,6.17 15.98,6.17 C15.98,6.17 15.98,3.51 15.98,3.51c " android:valueTo="M9.5 0.95 C9.5,0.95 14.5,0.95 14.5,0.95 C14.5,0.95 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,0.95 16,0.95 C16,0.95 14.5,-0.55 14.5,-0.55 C14.5,-0.55 9.5,-0.55 9.5,-0.55 C9.5,-0.55 8,0.95 8,0.95 C8,0.95 8,5.05 8,5.05 C8,5.05 9.5,5.05 9.5,5.05 C9.5,5.05 9.5,0.95 9.5,0.95c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="67" android:startOffset="350" android:valueFrom="M9.5 0.95 C9.5,0.95 14.5,0.95 14.5,0.95 C14.5,0.95 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,0.95 16,0.95 C16,0.95 14.5,-0.55 14.5,-0.55 C14.5,-0.55 9.5,-0.55 9.5,-0.55 C9.5,-0.55 8,0.95 8,0.95 C8,0.95 8,5.05 8,5.05 C8,5.05 9.5,5.05 9.5,5.05 C9.5,5.05 9.5,0.95 9.5,0.95c " android:valueTo="M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8,8 8,8 C8,8 9.5,8 9.5,8 C9.5,8 9.5,3.5 9.5,3.5c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_5_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="400" android:startOffset="0" android:valueFrom="3.001" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="67" android:startOffset="400" android:valueFrom="3.001" android:valueTo="4.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="83" android:startOffset="467" android:valueFrom="4.5" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_scanning.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_scanning.xml
new file mode 100644
index 000000000000..64a9f8c57845
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_scanning.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="32dp" android:width="24dp" android:viewportHeight="32" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_2_G" android:translateY="4.001000000000001" android:pivotX="12" android:pivotY="15" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M5.5 8 C5.5,8 4,9.5 4,9.5 C4,9.5 4,20.5 4,20.5 C4,20.5 5.5,22 5.5,22 C5.5,22 18.5,22 18.5,22 C18.5,22 20,20.5 20,20.5 C20,20.5 20,9.5 20,9.5 C20,9.5 18.5,8 18.5,8 C18.5,8 5.5,8 5.5,8c M18.5 20.5 C18.5,20.5 5.5,20.5 5.5,20.5 C5.5,20.5 5.5,9.5 5.5,9.5 C5.5,9.5 18.5,9.5 18.5,9.5 C18.5,9.5 18.5,20.5 18.5,20.5c "/></group><group android:name="_R_G_L_1_G_N_3_T_0" android:translateY="4.001000000000001" android:pivotX="12" android:pivotY="15" android:scaleX="1" android:scaleY="1"><group android:name="_R_G_L_1_G" android:pivotX="12" android:pivotY="15" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M12 17 C13.1,17 14,16.1 14,15 C14,13.9 13.1,13 12,13 C10.9,13 10,13.9 10,15 C10,16.1 10.9,17 12,17c "/></group></group><group android:name="_R_G_L_0_G_N_3_T_0" android:translateY="4.001000000000001" android:pivotX="12" android:pivotY="15" android:scaleX="1" android:scaleY="1"><group android:name="_R_G_L_0_G_T_1" android:translateX="12" android:translateY="12"><group android:name="_R_G_L_0_G" android:translateX="-12" android:translateY="-12"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8,8 8,8 C8,8 9.5,8 9.5,8 C9.5,8 9.5,3.5 9.5,3.5c "/></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_2_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="67" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="67" android:startOffset="0" android:valueFrom="1" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="117" android:startOffset="67" android:valueFrom="1" android:valueTo="0.6" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="117" android:startOffset="67" android:valueFrom="1" android:valueTo="0.6" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="333" android:startOffset="183" android:valueFrom="0.6" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="333" android:startOffset="183" android:valueFrom="0.6" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="150" android:startOffset="0" android:valueFrom="M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8,8 8,8 C8,8 9.5,8 9.5,8 C9.5,8 9.5,3.5 9.5,3.5c " android:valueTo="M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.51,6.34 14.51,6.34 C14.51,6.34 16.01,6.34 16.01,6.34 C16.01,6.34 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8.01,6.34 8.01,6.34 C8.01,6.34 9.51,6.34 9.51,6.34 C9.51,6.34 9.5,3.5 9.5,3.5c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="117" android:startOffset="150" android:valueFrom="M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.51,6.34 14.51,6.34 C14.51,6.34 16.01,6.34 16.01,6.34 C16.01,6.34 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8.01,6.34 8.01,6.34 C8.01,6.34 9.51,6.34 9.51,6.34 C9.51,6.34 9.5,3.5 9.5,3.5c " android:valueTo="M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8,8 8,8 C8,8 9.5,8 9.5,8 C9.5,8 9.5,3.5 9.5,3.5c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateXY" android:duration="150" android:startOffset="0" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,12C 12,12.42409592866898 12,14.545 12,14.545"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateXY" android:duration="117" android:startOffset="150" android:propertyXName="translateX" android:propertyYName="translateY" android:pathData="M 12,14.545C 12,14.545 12,12.42409592866898 12,12"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="83" android:startOffset="0" android:valueFrom="1" android:valueTo="0.96" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="183" android:startOffset="83" android:valueFrom="0.96" android:valueTo="1.28" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="250" android:startOffset="267" android:valueFrom="1.28" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_to_error.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_to_error.xml
new file mode 100644
index 000000000000..76b1e2d26112
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_to_error.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_2_G" android:translateY="0.0009999999999994458" android:pivotX="12" android:pivotY="15" android:rotation="0"><path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M5.5 8 C5.5,8 4,9.5 4,9.5 C4,9.5 4,20.5 4,20.5 C4,20.5 5.5,22 5.5,22 C5.5,22 18.5,22 18.5,22 C18.5,22 20,20.5 20,20.5 C20,20.5 20,9.5 20,9.5 C20,9.5 18.5,8 18.5,8 C18.5,8 5.5,8 5.5,8c M18.5 20.5 C18.5,20.5 5.5,20.5 5.5,20.5 C5.5,20.5 5.5,9.5 5.5,9.5 C5.5,9.5 18.5,9.5 18.5,9.5 C18.5,9.5 18.5,20.5 18.5,20.5c "/></group><group android:name="_R_G_L_1_G_N_3_T_0" android:translateY="0.0009999999999994458" android:pivotX="12" android:pivotY="15" android:rotation="0"><group android:name="_R_G_L_1_G"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M12 17 C13.1,17 14,16.1 14,15 C14,13.9 13.1,13 12,13 C10.9,13 10,13.9 10,15 C10,16.1 10.9,17 12,17c "/></group></group><group android:name="_R_G_L_0_G_N_3_T_0" android:translateY="0.0009999999999994458" android:pivotX="12" android:pivotY="15" android:rotation="0"><group android:name="_R_G_L_0_G" android:translateY="-0.0009999999999994458"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8,8 8,8 C8,8 9.5,8 9.5,8 C9.5,8 9.5,3.5 9.5,3.5c "/></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_2_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_3_T_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="rotation" android:duration="117" android:startOffset="0" android:valueFrom="0" android:valueTo="-10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.465,0 0.558,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="117" android:valueFrom="-10" android:valueTo="10" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.51,0 0.531,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="100" android:startOffset="217" android:valueFrom="10" android:valueTo="-5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.469,0 0.599,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="rotation" android:duration="167" android:startOffset="317" android:valueFrom="-5" android:valueTo="0" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.384,0 0.565,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_unlock.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_unlock.xml
new file mode 100644
index 000000000000..2d0e4bdaa017
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/anim/lock_unlock.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="32dp" android:width="24dp" android:viewportHeight="32" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_2_G_N_1_T_0" android:translateX="12" android:translateY="16"><group android:name="_R_G_L_2_G_T_1" android:translateY="3.001"><group android:name="_R_G_L_2_G" android:translateX="-12" android:translateY="-15"><path android:name="_R_G_L_2_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M5.5 8 C5.5,8 4,9.5 4,9.5 C4,9.5 4,20.5 4,20.5 C4,20.5 5.5,22 5.5,22 C5.5,22 18.5,22 18.5,22 C18.5,22 20,20.5 20,20.5 C20,20.5 20,9.5 20,9.5 C20,9.5 18.5,8 18.5,8 C18.5,8 5.5,8 5.5,8c M18.5 20.5 C18.5,20.5 5.5,20.5 5.5,20.5 C5.5,20.5 5.5,9.5 5.5,9.5 C5.5,9.5 18.5,9.5 18.5,9.5 C18.5,9.5 18.5,20.5 18.5,20.5c "/></group></group></group><group android:name="_R_G_L_1_G_N_8_N_1_T_0" android:translateX="12" android:translateY="16"><group android:name="_R_G_L_1_G_N_8_T_1" android:translateY="3.001"><group android:name="_R_G_L_1_G_N_8_T_0" android:translateX="-12" android:translateY="-15"><group android:name="_R_G_L_1_G" android:pivotX="12" android:pivotY="15" android:scaleX="1" android:scaleY="1"><path android:name="_R_G_L_1_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M12 17 C13.1,17 14,16.1 14,15 C14,13.9 13.1,13 12,13 C10.9,13 10,13.9 10,15 C10,16.1 10.9,17 12,17c "/></group></group></group></group><group android:name="_R_G_L_0_G_N_8_N_1_T_0" android:translateX="12" android:translateY="16"><group android:name="_R_G_L_0_G_N_8_T_1" android:translateY="3.001"><group android:name="_R_G_L_0_G_N_8_T_0" android:translateX="-12" android:translateY="-15"><group android:name="_R_G_L_0_G" android:translateY="-0.0009999999999994458"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8,8 8,8 C8,8 9.5,8 9.5,8 C9.5,8 9.5,3.5 9.5,3.5c "/></group></group></group></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_2_G_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="0" android:valueFrom="3.001" android:valueTo="1.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="133" android:valueFrom="1.5" android:valueTo="4" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="100" android:startOffset="267" android:valueFrom="4" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="scaleX" android:duration="100" android:startOffset="0" android:valueFrom="1" android:valueTo="0.8200000000000001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="100" android:startOffset="0" android:valueFrom="1" android:valueTo="0.8200000000000001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleX" android:duration="283" android:startOffset="100" android:valueFrom="0.8200000000000001" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="scaleY" android:duration="283" android:startOffset="100" android:valueFrom="0.8200000000000001" android:valueTo="1" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_1_G_N_8_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="0" android:valueFrom="3.001" android:valueTo="1.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="133" android:valueFrom="1.5" android:valueTo="4" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="100" android:startOffset="267" android:valueFrom="4" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="67" android:startOffset="0" android:valueFrom="M9.5 3.5 C9.5,3.5 14.5,3.5 14.5,3.5 C14.5,3.5 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.5 16,3.5 C16,3.5 14.5,2 14.5,2 C14.5,2 9.5,2 9.5,2 C9.5,2 8,3.5 8,3.5 C8,3.5 8,8 8,8 C8,8 9.5,8 9.5,8 C9.5,8 9.5,3.5 9.5,3.5c " android:valueTo="M9.5 0.95 C9.5,0.95 14.5,0.95 14.5,0.95 C14.5,0.95 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,0.95 16,0.95 C16,0.95 14.5,-0.55 14.5,-0.55 C14.5,-0.55 9.5,-0.55 9.5,-0.55 C9.5,-0.55 8,0.95 8,0.95 C8,0.95 8,5.05 8,5.05 C8,5.05 9.5,5.05 9.5,5.05 C9.5,5.05 9.5,0.95 9.5,0.95c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="117" android:startOffset="67" android:valueFrom="M9.5 0.95 C9.5,0.95 14.5,0.95 14.5,0.95 C14.5,0.95 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,0.95 16,0.95 C16,0.95 14.5,-0.55 14.5,-0.55 C14.5,-0.55 9.5,-0.55 9.5,-0.55 C9.5,-0.55 8,0.95 8,0.95 C8,0.95 8,5.05 8,5.05 C8,5.05 9.5,5.05 9.5,5.05 C9.5,5.05 9.5,0.95 9.5,0.95c " android:valueTo="M15.98 3.51 C15.98,3.51 14.5,3.53 14.5,3.53 C14.5,3.53 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.53 16,3.53 C16,3.53 15.98,2.02 15.98,2.02 C15.98,2.02 14.5,2.01 14.5,2.01 C14.5,2.01 14.48,3.51 14.48,3.51 C14.48,3.51 14.48,6.17 14.48,6.17 C14.48,6.17 15.98,6.17 15.98,6.17 C15.98,6.17 15.98,3.51 15.98,3.51c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="17" android:startOffset="183" android:valueFrom="M15.98 3.51 C15.98,3.51 14.5,3.53 14.5,3.53 C14.5,3.53 14.5,8 14.5,8 C14.5,8 16,8 16,8 C16,8 16,3.53 16,3.53 C16,3.53 15.98,2.02 15.98,2.02 C15.98,2.02 14.5,2.01 14.5,2.01 C14.5,2.01 14.48,3.51 14.48,3.51 C14.48,3.51 14.48,6.17 14.48,6.17 C14.48,6.17 15.98,6.17 15.98,6.17 C15.98,6.17 15.98,3.51 15.98,3.51c " android:valueTo="M16.25 3.52 C16.25,3.52 15.99,3.53 15.99,3.53 C15.99,3.53 16,8 16,8 C16,8 14.5,8 14.5,8 C14.5,8 14.5,3.53 14.5,3.53 C14.5,3.53 15.68,2 15.68,2 C15.68,2 16.51,2 16.51,2 C16.51,2 17.58,3.53 17.58,3.53 C17.58,3.53 17.62,6.15 17.62,6.15 C17.62,6.15 16.26,6.16 16.26,6.16 C16.26,6.16 16.25,3.52 16.25,3.52c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="pathData" android:duration="183" android:startOffset="200" android:valueFrom="M16.25 3.52 C16.25,3.52 15.99,3.53 15.99,3.53 C15.99,3.53 16,8 16,8 C16,8 14.5,8 14.5,8 C14.5,8 14.5,3.53 14.5,3.53 C14.5,3.53 15.68,2 15.68,2 C15.68,2 16.51,2 16.51,2 C16.51,2 17.58,3.53 17.58,3.53 C17.58,3.53 17.62,6.15 17.62,6.15 C17.62,6.15 16.26,6.16 16.26,6.16 C16.26,6.16 16.25,3.52 16.25,3.52c " android:valueTo="M21.06 3.52 C21.06,3.52 15.99,3.53 15.99,3.53 C15.99,3.53 16,8 16,8 C16,8 14.5,8 14.5,8 C14.5,8 14.5,3.53 14.5,3.53 C14.5,3.53 15.98,2.02 15.98,2.02 C15.98,2.02 20.94,2.01 20.94,2.01 C20.94,2.01 22.44,3.54 22.44,3.54 C22.44,3.54 22.44,6.15 22.44,6.15 C22.44,6.15 21.04,6.16 21.04,6.16 C21.04,6.16 21.06,3.52 21.06,3.52c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="_R_G_L_0_G_N_8_T_1"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="0" android:valueFrom="3.001" android:valueTo="1.5" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="133" android:startOffset="133" android:valueFrom="1.5" android:valueTo="4" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator><objectAnimator android:propertyName="translateY" android:duration="100" android:startOffset="267" android:valueFrom="4" android:valueTo="3.001" android:valueType="floatType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.333,0 0.667,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="767" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_brightness_thumb.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_brightness_thumb.xml
new file mode 100644
index 000000000000..4121433c4e95
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_brightness_thumb.xml
@@ -0,0 +1,20 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="?android:attr/colorBackgroundFloating" android:pathData="M18.5,9.31V5.5h-3.81L12,2.81L9.31,5.5H5.5v3.81L2.81,12l2.69,2.69v3.81h3.81L12,21.19l2.69-2.69h3.81 v-3.81L21.19,12L18.5,9.31z M12,17c-2.76,0-5-2.24-5-5s2.24-5,5-5s5,2.24,5,5S14.76,17,12,17z"/>
+ <path android:fillColor="?android:attr/colorControlActivated" android:pathData="M20,8.69V4.71L19.29,4h-3.98L12.5,1.19h-1L8.69,4H4.71L4,4.71v3.98L1.19,11.5v1L4,15.31v3.98L4.71,20h3.98l2.81,2.81h1 L15.31,20h3.98L20,19.29v-3.98l2.81-2.81v-1L20,8.69z M18.5,14.69v3.81h-3.81L12,21.19L9.31,18.5H5.5v-3.81L2.81,12L5.5,9.31V5.5 h3.81L12,2.81l2.69,2.69h3.81v3.81L21.19,12L18.5,14.69z"/>
+ <path android:fillColor="?android:attr/colorControlActivated" android:pathData="M 12 7 C 14.7614237492 7 17 9.23857625085 17 12 C 17 14.7614237492 14.7614237492 17 12 17 C 9.23857625085 17 7 14.7614237492 7 12 C 7 9.23857625085 9.23857625085 7 12 7 Z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenrecord.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenrecord.xml
new file mode 100644
index 000000000000..653dfe51f474
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenrecord.xml
@@ -0,0 +1,18 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector android:height="24dp" android:tint="?android:attr/colorControlNormal" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="@android:color/white" android:pathData="M12,16c-2.21,0-4-1.79-4-4c0-2.21,1.79-4,4-4c2.21,0,4,1.79,4,4C16,14.21,14.21,16,12,16z M6.94,5.18 C8.36,4.13,10.1,3.5,11.99,3.5c1.9,0,3.64,0.63,5.06,1.69l1.07-1.07C16.42,2.8,14.3,2,11.99,2C9.68,2,7.57,2.79,5.88,4.11 L6.94,5.18z M20.48,11.99c0,1.89-0.63,3.63-1.68,5.05l1.07,1.07c1.31-1.69,2.11-3.81,2.11-6.11c0-2.3-0.79-4.41-2.1-6.1l-1.07,1.07 C19.86,8.37,20.48,10.1,20.48,11.99z M3.5,11.99c0-1.89,0.63-3.63,1.68-5.05L4.11,5.88C2.79,7.57,2,9.68,2,11.99 c0,2.31,0.8,4.43,2.12,6.12l1.07-1.07C4.13,15.63,3.5,13.89,3.5,11.99z M17.04,18.8c-1.41,1.05-3.15,1.68-5.05,1.68 c-1.89,0-3.62-0.62-5.03-1.67l-1.07,1.07c1.69,1.31,3.8,2.1,6.1,2.1c2.31,0,4.42-0.79,6.11-2.11L17.04,18.8z"/>
+</vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot.xml
new file mode 100644
index 000000000000..cbd22c6bfeed
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_screenshot.xml
@@ -0,0 +1,30 @@
+<!--
+ Copyright (C) 2020 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M17.59,1H6.41L5,2.41v19.17L6.41,23h11.17L19,21.59V2.41L17.59,1zM17.5,2.5v1.75h-11V2.5H17.5zM17.5,5.75v12.5h-11V5.75H17.5zM6.5,21.5v-1.75h11v1.75H6.5z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9.5,11l0,-2.5l2.5,0l0,-1.5l-4,0l0,4z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,17l4,0l0,-4l-1.5,0l0,2.5l-2.5,0z"/>
+</vector>
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml
new file mode 100644
index 000000000000..e7f7a25c074d
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_collapse_animation.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M12.01 14.87 C12.01,14.87 12,14.85 12,14.85 C12,14.85 5.05,7.94 5.05,7.94 C5.05,7.94 3.98,9.03 3.98,9.03 C3.98,9.03 10.98,15.99 10.98,15.99 C10.98,15.99 12.03,16 12.03,16 C12.03,16 13.05,16 13.05,16 C13.05,16 19.98,9.01 19.98,9.01 C19.98,9.01 18.94,7.97 18.94,7.97 C18.94,7.97 12.01,14.87 12.01,14.87c "/></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="250" android:startOffset="0" android:valueFrom="M12.01 14.87 C12.01,14.87 12,14.85 12,14.85 C12,14.85 5.05,7.94 5.05,7.94 C5.05,7.94 3.98,9.03 3.98,9.03 C3.98,9.03 10.98,15.99 10.98,15.99 C10.98,15.99 12.03,16 12.03,16 C12.03,16 13.05,16 13.05,16 C13.05,16 19.98,9.01 19.98,9.01 C19.98,9.01 18.94,7.97 18.94,7.97 C18.94,7.97 12.01,14.87 12.01,14.87c " android:valueTo="M13 8 C13,8 11,8 11,8 C11,8 4,15 4,15 C4,15 5.06,16.06 5.06,16.06 C5.06,16.06 11.76,9.36 11.76,9.36 C11.76,9.36 12,9.12 12,9.12 C12,9.12 12.25,9.37 12.25,9.37 C12.25,9.37 18.94,16.06 18.94,16.06 C18.94,16.06 20,15 20,15 C20,15 13,8 13,8c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="267" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml
new file mode 100644
index 000000000000..deaaf82556dd
--- /dev/null
+++ b/packages/overlays/IconPackVictorSystemUIOverlay/res/drawable/ic_volume_expand_animation.xml
@@ -0,0 +1,18 @@
+<!--
+/**
+ * Copyright (C) 2020, 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.
+ */
+-->
+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"><aapt:attr name="android:drawable"><vector android:height="24dp" android:width="24dp" android:viewportHeight="24" android:viewportWidth="24"><group android:name="_R_G"><group android:name="_R_G_L_0_G"><path android:name="_R_G_L_0_G_D_0_P_0" android:fillColor="#000000" android:fillAlpha="1" android:fillType="nonZero" android:pathData=" M13 8 C13,8 11,8 11,8 C11,8 4,15 4,15 C4,15 5.06,16.06 5.06,16.06 C5.06,16.06 11.76,9.36 11.76,9.36 C11.76,9.36 12,9.12 12,9.12 C12,9.12 12.25,9.37 12.25,9.37 C12.25,9.37 18.94,16.06 18.94,16.06 C18.94,16.06 20,15 20,15 C20,15 13,8 13,8c "/></group></group><group android:name="time_group"/></vector></aapt:attr><target android:name="_R_G_L_0_G_D_0_P_0"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="pathData" android:duration="250" android:startOffset="0" android:valueFrom="M13 8 C13,8 11,8 11,8 C11,8 4,15 4,15 C4,15 5.06,16.06 5.06,16.06 C5.06,16.06 11.76,9.36 11.76,9.36 C11.76,9.36 12,9.12 12,9.12 C12,9.12 12.25,9.37 12.25,9.37 C12.25,9.37 18.94,16.06 18.94,16.06 C18.94,16.06 20,15 20,15 C20,15 13,8 13,8c " android:valueTo="M12.01 14.87 C12.01,14.87 12,14.85 12,14.85 C12,14.85 5.05,7.94 5.05,7.94 C5.05,7.94 3.98,9.03 3.98,9.03 C3.98,9.03 10.98,15.99 10.98,15.99 C10.98,15.99 12.03,16 12.03,16 C12.03,16 13.05,16 13.05,16 C13.05,16 19.98,9.01 19.98,9.01 C19.98,9.01 18.94,7.97 18.94,7.97 C18.94,7.97 12.01,14.87 12.01,14.87c " android:valueType="pathType"><aapt:attr name="android:interpolator"><pathInterpolator android:pathData="M 0.0,0.0 c0.4,0 0.2,1 1.0,1.0"/></aapt:attr></objectAnimator></set></aapt:attr></target><target android:name="time_group"><aapt:attr name="android:animation"><set android:ordering="together"><objectAnimator android:propertyName="translateX" android:duration="267" android:startOffset="0" android:valueFrom="0" android:valueTo="1" android:valueType="floatType"/></set></aapt:attr></target></animated-vector> \ No newline at end of file
diff --git a/packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml b/packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml
index 82bff7d53d95..8fb19df33178 100644
--- a/packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml
+++ b/packages/overlays/IconShapeHeartOverlay/AndroidManifest.xml
@@ -21,6 +21,7 @@
android:versionName="1.0">
<overlay
android:targetPackage="android"
+ android:targetName="IconShapeCustomization"
android:category="android.theme.customization.adaptive_icon_shape"
android:priority="1"/>
diff --git a/packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml b/packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml
index d719a97e28f2..6842dde36264 100644
--- a/packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml
+++ b/packages/overlays/IconShapePebbleOverlay/AndroidManifest.xml
@@ -21,6 +21,7 @@
android:versionName="1.0">
<overlay
android:targetPackage="android"
+ android:targetName="IconShapeCustomization"
android:category="android.theme.customization.adaptive_icon_shape"
android:priority="1"/>
diff --git a/services/core/java/com/android/server/am/ActivityManagerConstants.java b/services/core/java/com/android/server/am/ActivityManagerConstants.java
index 135ac9a7846e..7be843f17863 100644
--- a/services/core/java/com/android/server/am/ActivityManagerConstants.java
+++ b/services/core/java/com/android/server/am/ActivityManagerConstants.java
@@ -19,6 +19,7 @@ package com.android.server.am;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_POWER_QUICK;
import android.app.ActivityThread;
+import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
@@ -336,6 +337,11 @@ final class ActivityManagerConstants extends ContentObserver {
*/
public int PENDINGINTENT_WARNING_THRESHOLD = DEFAULT_PENDINGINTENT_WARNING_THRESHOLD;
+ /**
+ * Component names of the services which will keep critical code path of the host warm
+ */
+ public final ArraySet<ComponentName> KEEP_WARMING_SERVICES = new ArraySet<ComponentName>();
+
private List<String> mDefaultImperceptibleKillExemptPackages;
private List<Integer> mDefaultImperceptibleKillExemptProcStates;
@@ -442,6 +448,10 @@ final class ActivityManagerConstants extends ContentObserver {
.boxed().collect(Collectors.toList());
IMPERCEPTIBLE_KILL_EXEMPT_PACKAGES.addAll(mDefaultImperceptibleKillExemptPackages);
IMPERCEPTIBLE_KILL_EXEMPT_PROC_STATES.addAll(mDefaultImperceptibleKillExemptProcStates);
+ KEEP_WARMING_SERVICES.addAll(Arrays.stream(
+ context.getResources().getStringArray(
+ com.android.internal.R.array.config_keep_warming_services))
+ .map(ComponentName::unflattenFromString).collect(Collectors.toSet()));
}
public void start(ContentResolver resolver) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 09c0ba37028a..d990c1e9fbe1 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -3318,6 +3318,10 @@ public class ActivityManagerService extends IActivityManager.Stub
@Override
public boolean setProcessMemoryTrimLevel(String process, int userId, int level)
throws RemoteException {
+ if (!isCallerShell()) {
+ EventLog.writeEvent(0x534e4554, 160390416, Binder.getCallingUid(), "");
+ throw new SecurityException("Only shell can call it");
+ }
synchronized (this) {
final ProcessRecord app = findProcessLocked(process, userId, "setProcessMemoryTrimLevel");
if (app == null) {
diff --git a/services/core/java/com/android/server/am/CoreSettingsObserver.java b/services/core/java/com/android/server/am/CoreSettingsObserver.java
index 8527ae971352..2661dd62ce21 100644
--- a/services/core/java/com/android/server/am/CoreSettingsObserver.java
+++ b/services/core/java/com/android/server/am/CoreSettingsObserver.java
@@ -92,7 +92,7 @@ final class CoreSettingsObserver extends ContentObserver {
sGlobalSettingToTypeMap.put(
Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_VALUES, String.class);
sGlobalSettingToTypeMap.put(
- Settings.Global.GLOBAL_SETTINGS_ANGLE_WHITELIST, String.class);
+ Settings.Global.GLOBAL_SETTINGS_ANGLE_ALLOWLIST, String.class);
sGlobalSettingToTypeMap.put(
Settings.Global.GLOBAL_SETTINGS_SHOW_ANGLE_IN_USE_DIALOG_BOX, String.class);
sGlobalSettingToTypeMap.put(Settings.Global.ENABLE_GPU_DEBUG_LAYERS, int.class);
@@ -105,9 +105,9 @@ final class CoreSettingsObserver extends ContentObserver {
sGlobalSettingToTypeMap.put(
Settings.Global.GAME_DRIVER_PRERELEASE_OPT_IN_APPS, String.class);
sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_OPT_OUT_APPS, String.class);
- sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_BLACKLIST, String.class);
- sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_WHITELIST, String.class);
- sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_BLACKLISTS, String.class);
+ sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_DENYLIST, String.class);
+ sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_ALLOWLIST, String.class);
+ sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_DENYLISTS, String.class);
sGlobalSettingToTypeMap.put(Settings.Global.GAME_DRIVER_SPHAL_LIBRARIES, String.class);
// add other global settings here...
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index 14ba4afe497a..a2e8216a011a 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -76,7 +76,11 @@ import android.app.ApplicationExitInfo;
import android.app.usage.UsageEvents;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledAfter;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
import android.content.pm.ServiceInfo;
import android.os.Debug;
import android.os.Handler;
@@ -265,6 +269,43 @@ public final class OomAdjuster {
void initSettings() {
mCachedAppOptimizer.init();
+ if (mService.mConstants.KEEP_WARMING_SERVICES.size() > 0) {
+ final IntentFilter filter = new IntentFilter(Intent.ACTION_USER_SWITCHED);
+ mService.mContext.registerReceiverForAllUsers(new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ synchronized (mService) {
+ handleUserSwitchedLocked();
+ }
+ }
+ }, filter, null, mService.mHandler);
+ }
+ }
+
+ /**
+ * Update the keep-warming service flags upon user switches
+ */
+ @VisibleForTesting
+ @GuardedBy("mService")
+ void handleUserSwitchedLocked() {
+ final ArraySet<ComponentName> warmServices = mService.mConstants.KEEP_WARMING_SERVICES;
+ final ArrayList<ProcessRecord> processes = mProcessList.mLruProcesses;
+ for (int i = processes.size() - 1; i >= 0; i--) {
+ final ProcessRecord app = processes.get(i);
+ boolean includeWarmPkg = false;
+ for (int j = warmServices.size() - 1; j >= 0; j--) {
+ if (app.pkgList.containsKey(warmServices.valueAt(j).getPackageName())) {
+ includeWarmPkg = true;
+ break;
+ }
+ }
+ if (!includeWarmPkg) {
+ continue;
+ }
+ for (int j = app.numberOfRunningServices() - 1; j >= 0; j--) {
+ app.getRunningServiceAt(j).updateKeepWarmLocked();
+ }
+ }
}
/**
@@ -1470,7 +1511,7 @@ public final class OomAdjuster {
"Raise procstate to started service: " + app);
}
}
- if (app.hasShownUi && !app.getCachedIsHomeProcess()) {
+ if (!s.mKeepWarming && app.hasShownUi && !app.getCachedIsHomeProcess()) {
// If this process has shown some UI, let it immediately
// go to the LRU list because it may be pretty heavy with
// UI stuff. We'll tag it with a label just to help
@@ -1479,7 +1520,8 @@ public final class OomAdjuster {
app.adjType = "cch-started-ui-services";
}
} else {
- if (now < (s.lastActivity + mConstants.MAX_SERVICE_INACTIVITY)) {
+ if (s.mKeepWarming
+ || now < (s.lastActivity + mConstants.MAX_SERVICE_INACTIVITY)) {
// This service has seen some activity within
// recent memory, so we will keep its process ahead
// of the background processes.
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index 5a0ea7586301..88b0c3be5464 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -2940,25 +2940,26 @@ public final class ProcessList {
if ((expecting == null) || (old == expecting)) {
mProcessNames.remove(name, uid);
}
- if (old != null && old.uidRecord != null) {
- old.uidRecord.numProcs--;
- old.uidRecord.procRecords.remove(old);
- if (old.uidRecord.numProcs == 0) {
+ final ProcessRecord record = expecting != null ? expecting : old;
+ if (record != null && record.uidRecord != null) {
+ final UidRecord uidRecord = record.uidRecord;
+ uidRecord.numProcs--;
+ uidRecord.procRecords.remove(record);
+ if (uidRecord.numProcs == 0) {
// No more processes using this uid, tell clients it is gone.
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
- "No more processes in " + old.uidRecord);
- mService.enqueueUidChangeLocked(old.uidRecord, -1, UidRecord.CHANGE_GONE);
+ "No more processes in " + uidRecord);
+ mService.enqueueUidChangeLocked(uidRecord, -1, UidRecord.CHANGE_GONE);
EventLogTags.writeAmUidStopped(uid);
mActiveUids.remove(uid);
mService.noteUidProcessState(uid, ActivityManager.PROCESS_STATE_NONEXISTENT,
ActivityManager.PROCESS_CAPABILITY_NONE);
}
- old.uidRecord = null;
+ record.uidRecord = null;
}
mIsolatedProcesses.remove(uid);
mGlobalIsolatedUids.freeIsolatedUidLocked(uid);
// Remove the (expected) ProcessRecord from the app zygote
- final ProcessRecord record = expecting != null ? expecting : old;
if (record != null && record.appZygote) {
removeProcessFromAppZygoteLocked(record);
}
diff --git a/services/core/java/com/android/server/am/ServiceRecord.java b/services/core/java/com/android/server/am/ServiceRecord.java
index 9c96e6e02566..fc17ddedb39f 100644
--- a/services/core/java/com/android/server/am/ServiceRecord.java
+++ b/services/core/java/com/android/server/am/ServiceRecord.java
@@ -40,6 +40,7 @@ import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
import android.util.proto.ProtoUtils;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.procstats.ServiceState;
import com.android.internal.os.BatteryStatsImpl;
import com.android.server.LocalServices;
@@ -146,6 +147,8 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
private int lastStartId; // identifier of most recent start request.
+ boolean mKeepWarming; // Whether or not it'll keep critical code path of the host warm
+
static class StartItem {
final ServiceRecord sr;
final boolean taskRemoved;
@@ -514,6 +517,7 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
lastActivity = SystemClock.uptimeMillis();
userId = UserHandle.getUserId(appInfo.uid);
createdFromFg = callerIsFg;
+ updateKeepWarmLocked();
}
public ServiceState getTracker() {
@@ -732,6 +736,14 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
}
}
+ @GuardedBy("ams")
+ void updateKeepWarmLocked() {
+ mKeepWarming = ams.mConstants.KEEP_WARMING_SERVICES.contains(name)
+ && (ams.mUserController.getCurrentUserId() == userId
+ || ams.isSingleton(processName, appInfo, instanceName.getClassName(),
+ serviceInfo.flags));
+ }
+
public AppBindRecord retrieveAppBindingLocked(Intent intent,
ProcessRecord app) {
Intent.FilterComparison filter = new Intent.FilterComparison(intent);
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 1058000e0b68..24661d69a78e 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -2548,8 +2548,7 @@ public final class DisplayManagerService extends SystemService {
public boolean requestPowerState(DisplayPowerRequest request,
boolean waitForNegativeProximity) {
synchronized (mSyncRoot) {
- return mDisplayPowerController.requestPowerState(request,
- waitForNegativeProximity);
+ return mDisplayPowerController.requestPowerState(request, waitForNegativeProximity);
}
}
@@ -2677,6 +2676,10 @@ public final class DisplayManagerService extends SystemService {
return getDisplayedContentSampleInternal(displayId, maxFrames, timestamp);
}
+ @Override
+ public void ignoreProximitySensorUntilChanged() {
+ mDisplayPowerController.ignoreProximitySensorUntilChanged();
+ }
}
class DesiredDisplayModeSpecsObserver
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 9411c5629457..7c0f4197363b 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -117,6 +117,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
private static final int MSG_CONFIGURE_BRIGHTNESS = 5;
private static final int MSG_SET_TEMPORARY_BRIGHTNESS = 6;
private static final int MSG_SET_TEMPORARY_AUTO_BRIGHTNESS_ADJUSTMENT = 7;
+ private static final int MSG_IGNORE_PROXIMITY = 8;
private static final int PROXIMITY_UNKNOWN = -1;
private static final int PROXIMITY_NEGATIVE = 0;
@@ -263,6 +264,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// go to sleep by the user. While true, the screen remains off.
private boolean mWaitingForNegativeProximity;
+ // True if the device should not take into account the proximity sensor
+ // until either the proximity sensor state changes, or there is no longer a
+ // request to listen to proximity sensor.
+ private boolean mIgnoreProximityUntilChanged;
+
// The actual proximity sensor threshold value.
private float mProximityThreshold;
@@ -760,8 +766,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
if (mPowerRequest == null) {
mPowerRequest = new DisplayPowerRequest(mPendingRequestLocked);
- mWaitingForNegativeProximity = mPendingWaitForNegativeProximityLocked;
- mPendingWaitForNegativeProximityLocked = false;
+ updatePendingProximityRequestsLocked();
mPendingRequestChangedLocked = false;
mustInitialize = true;
// Assume we're on and bright until told otherwise, since that's the state we turn
@@ -770,8 +775,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
} else if (mPendingRequestChangedLocked) {
previousPolicy = mPowerRequest.policy;
mPowerRequest.copyFrom(mPendingRequestLocked);
- mWaitingForNegativeProximity |= mPendingWaitForNegativeProximityLocked;
- mPendingWaitForNegativeProximityLocked = false;
+ updatePendingProximityRequestsLocked();
mPendingRequestChangedLocked = false;
mDisplayReadyLocked = false;
} else {
@@ -822,9 +826,16 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// Apply the proximity sensor.
if (mProximitySensor != null) {
if (mPowerRequest.useProximitySensor && state != Display.STATE_OFF) {
+ // At this point the policy says that the screen should be on, but we've been
+ // asked to listen to the prox sensor to adjust the display state, so lets make
+ // sure the sensor is on.
setProximitySensorEnabled(true);
if (!mScreenOffBecauseOfProximity
- && mProximity == PROXIMITY_POSITIVE) {
+ && mProximity == PROXIMITY_POSITIVE
+ && !mIgnoreProximityUntilChanged) {
+ // Prox sensor already reporting "near" so we should turn off the screen.
+ // Also checked that we aren't currently set to ignore the proximity sensor
+ // temporarily.
mScreenOffBecauseOfProximity = true;
sendOnProximityPositiveWithWakelock();
}
@@ -832,18 +843,28 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
&& mScreenOffBecauseOfProximity
&& mProximity == PROXIMITY_POSITIVE
&& state != Display.STATE_OFF) {
+ // The policy says that we should have the screen on, but it's off due to the prox
+ // and we've been asked to wait until the screen is far from the user to turn it
+ // back on. Let keep the prox sensor on so we can tell when it's far again.
setProximitySensorEnabled(true);
} else {
+ // We haven't been asked to use the prox sensor and we're not waiting on the screen
+ // to turn back on...so lets shut down the prox sensor.
setProximitySensorEnabled(false);
mWaitingForNegativeProximity = false;
}
+
if (mScreenOffBecauseOfProximity
- && mProximity != PROXIMITY_POSITIVE) {
+ && (mProximity != PROXIMITY_POSITIVE || mIgnoreProximityUntilChanged)) {
+ // The screen *was* off due to prox being near, but now it's "far" so lets turn
+ // the screen back on. Also turn it back on if we've been asked to ignore the
+ // prox sensor temporarily.
mScreenOffBecauseOfProximity = false;
sendOnProximityNegativeWithWakelock();
}
} else {
mWaitingForNegativeProximity = false;
+ mIgnoreProximityUntilChanged = false;
}
if (mScreenOffBecauseOfProximity) {
state = Display.STATE_OFF;
@@ -1181,6 +1202,14 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
sendUpdatePowerState();
}
+ /**
+ * Ignores the proximity sensor until the sensor state changes, but only if the sensor is
+ * currently enabled and forcing the screen to be dark.
+ */
+ public void ignoreProximitySensorUntilChanged() {
+ mHandler.sendEmptyMessage(MSG_IGNORE_PROXIMITY);
+ }
+
public void setBrightnessConfiguration(BrightnessConfiguration c) {
Message msg = mHandler.obtainMessage(MSG_CONFIGURE_BRIGHTNESS, c);
msg.sendToTarget();
@@ -1529,6 +1558,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// Register the listener.
// Proximity sensor state already cleared initially.
mProximitySensorEnabled = true;
+ mIgnoreProximityUntilChanged = false;
mSensorManager.registerListener(mProximitySensorListener, mProximitySensor,
SensorManager.SENSOR_DELAY_NORMAL, mHandler);
}
@@ -1538,6 +1568,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// Clear the proximity sensor state for next time.
mProximitySensorEnabled = false;
mProximity = PROXIMITY_UNKNOWN;
+ mIgnoreProximityUntilChanged = false;
mPendingProximity = PROXIMITY_UNKNOWN;
mHandler.removeMessages(MSG_PROXIMITY_SENSOR_DEBOUNCED);
mSensorManager.unregisterListener(mProximitySensorListener);
@@ -1580,6 +1611,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
&& mPendingProximityDebounceTime >= 0) {
final long now = SystemClock.uptimeMillis();
if (mPendingProximityDebounceTime <= now) {
+ if (mProximity != mPendingProximity) {
+ // if the status of the sensor changed, stop ignoring.
+ mIgnoreProximityUntilChanged = false;
+ Slog.i(TAG, "No longer ignoring proximity [" + mPendingProximity + "]");
+ }
// Sensor reading accepted. Apply the change then release the wake lock.
mProximity = mPendingProximity;
updatePowerState();
@@ -1723,6 +1759,27 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
}
}
+ private void updatePendingProximityRequestsLocked() {
+ mWaitingForNegativeProximity |= mPendingWaitForNegativeProximityLocked;
+ mPendingWaitForNegativeProximityLocked = false;
+
+ if (mIgnoreProximityUntilChanged) {
+ // Also, lets stop waiting for negative proximity if we're ignoring it.
+ mWaitingForNegativeProximity = false;
+ }
+ }
+
+ private void ignoreProximitySensorUntilChangedInternal() {
+ if (!mIgnoreProximityUntilChanged
+ && mPowerRequest.useProximitySensor
+ && mProximity == PROXIMITY_POSITIVE) {
+ // Only ignore if it is still reporting positive (near)
+ mIgnoreProximityUntilChanged = true;
+ Slog.i(TAG, "Ignoring proximity");
+ updatePowerState();
+ }
+ }
+
private final Runnable mOnStateChangedRunnable = new Runnable() {
@Override
public void run() {
@@ -1961,6 +2018,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mTemporaryAutoBrightnessAdjustment = Float.intBitsToFloat(msg.arg1);
updatePowerState();
break;
+
+ case MSG_IGNORE_PROXIMITY:
+ ignoreProximitySensorUntilChangedInternal();
+ break;
}
}
}
diff --git a/services/core/java/com/android/server/gpu/GpuService.java b/services/core/java/com/android/server/gpu/GpuService.java
index 8a3c963f4805..c0617ca95f9f 100644
--- a/services/core/java/com/android/server/gpu/GpuService.java
+++ b/services/core/java/com/android/server/gpu/GpuService.java
@@ -29,8 +29,6 @@ import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.database.ContentObserver;
-import android.gamedriver.GameDriverProto.Blacklist;
-import android.gamedriver.GameDriverProto.Blacklists;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
@@ -40,6 +38,8 @@ import android.provider.DeviceConfig;
import android.provider.DeviceConfig.Properties;
import android.provider.Settings;
import android.text.TextUtils;
+import android.updatabledriver.UpdatableDriverProto.Denylist;
+import android.updatabledriver.UpdatableDriverProto.Denylists;
import android.util.Base64;
import android.util.Slog;
@@ -65,7 +65,7 @@ public class GpuService extends SystemService {
private static final String PROD_DRIVER_PROPERTY = "ro.gfx.driver.0";
private static final String DEV_DRIVER_PROPERTY = "ro.gfx.driver.1";
- private static final String GAME_DRIVER_WHITELIST_FILENAME = "whitelist.txt";
+ private static final String GAME_DRIVER_ALLOWLIST_FILENAME = "allowlist.txt";
private static final int BASE64_FLAGS = Base64.NO_PADDING | Base64.NO_WRAP;
private final Context mContext;
@@ -81,7 +81,7 @@ public class GpuService extends SystemService {
private SettingsObserver mSettingsObserver;
private DeviceConfigListener mDeviceConfigListener;
@GuardedBy("mLock")
- private Blacklists mBlacklists;
+ private Denylists mDenylists;
public GpuService(Context context) {
super(context);
@@ -118,19 +118,19 @@ public class GpuService extends SystemService {
mSettingsObserver = new SettingsObserver();
mDeviceConfigListener = new DeviceConfigListener();
fetchGameDriverPackageProperties();
- processBlacklists();
- setBlacklist();
+ processDenylists();
+ setDenylist();
fetchDeveloperDriverPackageProperties();
}
}
private final class SettingsObserver extends ContentObserver {
- private final Uri mGameDriverBlackUri =
- Settings.Global.getUriFor(Settings.Global.GAME_DRIVER_BLACKLISTS);
+ private final Uri mGameDriverDenylistsUri =
+ Settings.Global.getUriFor(Settings.Global.GAME_DRIVER_DENYLISTS);
SettingsObserver() {
super(new Handler());
- mContentResolver.registerContentObserver(mGameDriverBlackUri, false, this,
+ mContentResolver.registerContentObserver(mGameDriverDenylistsUri, false, this,
UserHandle.USER_ALL);
}
@@ -140,9 +140,9 @@ public class GpuService extends SystemService {
return;
}
- if (mGameDriverBlackUri.equals(uri)) {
- processBlacklists();
- setBlacklist();
+ if (mGameDriverDenylistsUri.equals(uri)) {
+ processDenylists();
+ setDenylist();
}
}
}
@@ -157,10 +157,10 @@ public class GpuService extends SystemService {
@Override
public void onPropertiesChanged(Properties properties) {
synchronized (mDeviceConfigLock) {
- if (properties.getKeyset().contains(Settings.Global.GAME_DRIVER_BLACKLISTS)) {
- parseBlacklists(
- properties.getString(Settings.Global.GAME_DRIVER_BLACKLISTS, ""));
- setBlacklist();
+ if (properties.getKeyset().contains(Settings.Global.GAME_DRIVER_DENYLISTS)) {
+ parseDenylists(
+ properties.getString(Settings.Global.GAME_DRIVER_DENYLISTS, ""));
+ setDenylist();
}
}
}
@@ -187,7 +187,7 @@ public class GpuService extends SystemService {
case ACTION_PACKAGE_REMOVED:
if (isProdDriver) {
fetchGameDriverPackageProperties();
- setBlacklist();
+ setDenylist();
} else if (isDevDriver) {
fetchDeveloperDriverPackageProperties();
}
@@ -239,17 +239,17 @@ public class GpuService extends SystemService {
return;
}
- // Reset the whitelist.
+ // Reset the allowlist.
Settings.Global.putString(mContentResolver,
- Settings.Global.GAME_DRIVER_WHITELIST, "");
+ Settings.Global.GAME_DRIVER_ALLOWLIST, "");
mGameDriverVersionCode = driverInfo.longVersionCode;
try {
final Context driverContext = mContext.createPackageContext(mProdDriverPackageName,
Context.CONTEXT_RESTRICTED);
- assetToSettingsGlobal(mContext, driverContext, GAME_DRIVER_WHITELIST_FILENAME,
- Settings.Global.GAME_DRIVER_WHITELIST, ",");
+ assetToSettingsGlobal(mContext, driverContext, GAME_DRIVER_ALLOWLIST_FILENAME,
+ Settings.Global.GAME_DRIVER_ALLOWLIST, ",");
} catch (PackageManager.NameNotFoundException e) {
if (DEBUG) {
Slog.w(TAG, "driver package '" + mProdDriverPackageName + "' not installed");
@@ -257,48 +257,48 @@ public class GpuService extends SystemService {
}
}
- private void processBlacklists() {
+ private void processDenylists() {
String base64String = DeviceConfig.getProperty(DeviceConfig.NAMESPACE_GAME_DRIVER,
- Settings.Global.GAME_DRIVER_BLACKLISTS);
+ Settings.Global.GAME_DRIVER_DENYLISTS);
if (base64String == null) {
base64String =
Settings.Global.getString(mContentResolver,
- Settings.Global.GAME_DRIVER_BLACKLISTS);
+ Settings.Global.GAME_DRIVER_DENYLISTS);
}
- parseBlacklists(base64String != null ? base64String : "");
+ parseDenylists(base64String != null ? base64String : "");
}
- private void parseBlacklists(String base64String) {
+ private void parseDenylists(String base64String) {
synchronized (mLock) {
- // Reset all blacklists
- mBlacklists = null;
+ // Reset all denylists
+ mDenylists = null;
try {
- mBlacklists = Blacklists.parseFrom(Base64.decode(base64String, BASE64_FLAGS));
+ mDenylists = Denylists.parseFrom(Base64.decode(base64String, BASE64_FLAGS));
} catch (IllegalArgumentException e) {
if (DEBUG) {
- Slog.w(TAG, "Can't parse blacklist, skip and continue...");
+ Slog.w(TAG, "Can't parse denylist, skip and continue...");
}
} catch (InvalidProtocolBufferException e) {
if (DEBUG) {
- Slog.w(TAG, "Can't parse blacklist, skip and continue...");
+ Slog.w(TAG, "Can't parse denylist, skip and continue...");
}
}
}
}
- private void setBlacklist() {
+ private void setDenylist() {
Settings.Global.putString(mContentResolver,
- Settings.Global.GAME_DRIVER_BLACKLIST, "");
+ Settings.Global.GAME_DRIVER_DENYLIST, "");
synchronized (mLock) {
- if (mBlacklists == null) {
+ if (mDenylists == null) {
return;
}
- List<Blacklist> blacklists = mBlacklists.getBlacklistsList();
- for (Blacklist blacklist : blacklists) {
- if (blacklist.getVersionCode() == mGameDriverVersionCode) {
+ List<Denylist> denylists = mDenylists.getDenylistsList();
+ for (Denylist denylist : denylists) {
+ if (denylist.getVersionCode() == mGameDriverVersionCode) {
Settings.Global.putString(mContentResolver,
- Settings.Global.GAME_DRIVER_BLACKLIST,
- String.join(",", blacklist.getPackageNamesList()));
+ Settings.Global.GAME_DRIVER_DENYLIST,
+ String.join(",", denylist.getPackageNamesList()));
return;
}
}
diff --git a/services/core/java/com/android/server/location/gnss/GnssNetworkConnectivityHandler.java b/services/core/java/com/android/server/location/gnss/GnssNetworkConnectivityHandler.java
index 531aef6aeb0f..6f3756cfaea9 100644
--- a/services/core/java/com/android/server/location/gnss/GnssNetworkConnectivityHandler.java
+++ b/services/core/java/com/android/server/location/gnss/GnssNetworkConnectivityHandler.java
@@ -86,7 +86,7 @@ class GnssNetworkConnectivityHandler {
// Default time limit in milliseconds for the ConnectivityManager to find a suitable
// network with SUPL connectivity or report an error.
- private static final int SUPL_NETWORK_REQUEST_TIMEOUT_MILLIS = 10 * 1000;
+ private static final int SUPL_NETWORK_REQUEST_TIMEOUT_MILLIS = 20 * 1000;
private static final int HASH_MAP_INITIAL_CAPACITY_TO_TRACK_CONNECTED_NETWORKS = 5;
diff --git a/services/core/java/com/android/server/pm/BackgroundDexOptService.java b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
index 0dfa081e7695..48ec9b4b502d 100644
--- a/services/core/java/com/android/server/pm/BackgroundDexOptService.java
+++ b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
@@ -337,6 +337,7 @@ public class BackgroundDexOptService extends JobService {
private int idleOptimizePackages(PackageManagerService pm, ArraySet<String> pkgs,
long lowStorageThreshold) {
ArraySet<String> updatedPackages = new ArraySet<>();
+ ArraySet<String> updatedPackagesDueToSecondaryDex = new ArraySet<>();
try {
final boolean supportSecondaryDex = supportSecondaryDex();
@@ -391,11 +392,14 @@ public class BackgroundDexOptService extends JobService {
}
int secondaryResult = optimizePackages(pm, pkgs, lowStorageThreshold,
- /*isForPrimaryDex*/ false, updatedPackages);
+ /*isForPrimaryDex*/ false, updatedPackagesDueToSecondaryDex);
return secondaryResult;
} finally {
// Always let the pinner service know about changes.
notifyPinService(updatedPackages);
+ // Only notify IORap the primary dex opt, because we don't want to
+ // invalidate traces unnecessary due to b/161633001 and that it's
+ // better to have a trace than no trace at all.
notifyPackagesUpdated(updatedPackages);
}
}
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 0890b9212d2c..a4ed4e316ac3 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -934,6 +934,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
}
+ final boolean handledByPowerManager = mPowerManagerInternal.interceptPowerKeyDown(event);
+
GestureLauncherService gestureService = LocalServices.getService(
GestureLauncherService.class);
boolean gesturedServiceIntercepted = false;
@@ -953,7 +955,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// If the power key has still not yet been handled, then detect short
// press, long press, or multi press and decide what to do.
mPowerKeyHandled = hungUp || mScreenshotChordVolumeDownKeyTriggered
- || mA11yShortcutChordVolumeUpKeyTriggered || gesturedServiceIntercepted;
+ || mA11yShortcutChordVolumeUpKeyTriggered || gesturedServiceIntercepted
+ || handledByPowerManager;
if (!mPowerKeyHandled) {
if (interactive) {
// When interactive, we're already awake.
diff --git a/services/core/java/com/android/server/power/AttentionDetector.java b/services/core/java/com/android/server/power/AttentionDetector.java
index b69c45070487..cbdfc56d6aa4 100644
--- a/services/core/java/com/android/server/power/AttentionDetector.java
+++ b/services/core/java/com/android/server/power/AttentionDetector.java
@@ -75,6 +75,12 @@ public class AttentionDetector {
/** Default value in absence of {@link DeviceConfig} override. */
static final long DEFAULT_POST_DIM_CHECK_DURATION_MILLIS = 0;
+ /**
+ * DeviceConfig flag name, describes the limit of how long the device can remain unlocked due to
+ * attention checking.
+ */
+ static final String KEY_MAX_EXTENSION_MILLIS = "max_extension_millis";
+
private Context mContext;
private boolean mIsSettingEnabled;
@@ -85,11 +91,11 @@ public class AttentionDetector {
private final Runnable mOnUserAttention;
/**
- * The maximum time, in millis, that the phone can stay unlocked because of attention events,
- * triggered by any user.
+ * The default value for the maximum time, in millis, that the phone can stay unlocked because
+ * of attention events, triggered by any user.
*/
@VisibleForTesting
- protected long mMaximumExtensionMillis;
+ protected long mDefaultMaximumExtensionMillis;
private final Object mLock;
@@ -162,7 +168,7 @@ public class AttentionDetector {
mContentResolver = context.getContentResolver();
mAttentionManager = LocalServices.getService(AttentionManagerInternal.class);
mWindowManager = LocalServices.getService(WindowManagerInternal.class);
- mMaximumExtensionMillis = context.getResources().getInteger(
+ mDefaultMaximumExtensionMillis = context.getResources().getInteger(
com.android.internal.R.integer.config_attentionMaximumExtension);
try {
@@ -196,7 +202,7 @@ public class AttentionDetector {
final long now = SystemClock.uptimeMillis();
final long whenToCheck = nextScreenDimming - getPreDimCheckDurationMillis();
- final long whenToStopExtending = mLastUserActivityTime + mMaximumExtensionMillis;
+ final long whenToStopExtending = mLastUserActivityTime + getMaxExtensionMillis();
if (now < whenToCheck) {
if (DEBUG) {
Slog.d(TAG, "Do not check for attention yet, wait " + (whenToCheck - now));
@@ -309,7 +315,7 @@ public class AttentionDetector {
public void dump(PrintWriter pw) {
pw.println("AttentionDetector:");
pw.println(" mIsSettingEnabled=" + mIsSettingEnabled);
- pw.println(" mMaximumExtensionMillis=" + mMaximumExtensionMillis);
+ pw.println(" mMaxExtensionMillis=" + getMaxExtensionMillis());
pw.println(" preDimCheckDurationMillis=" + getPreDimCheckDurationMillis());
pw.println(" postDimCheckDurationMillis=" + mLastPostDimTimeout);
pw.println(" mLastUserActivityTime(excludingAttention)=" + mLastUserActivityTime);
@@ -348,6 +354,21 @@ public class AttentionDetector {
return mLastPostDimTimeout;
}
+ /** How long the device can remain unlocked due to attention checking. */
+ @VisibleForTesting
+ protected long getMaxExtensionMillis() {
+ final long millis = DeviceConfig.getLong(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS,
+ mDefaultMaximumExtensionMillis);
+
+ if (millis < 0 || millis > 60 * 60 * 1000) { // 1 hour
+ Slog.w(TAG, "Bad flag value supplied for: " + KEY_MAX_EXTENSION_MILLIS);
+ return mDefaultMaximumExtensionMillis;
+ }
+
+ return millis;
+ }
+
@VisibleForTesting
final class AttentionCallbackInternalImpl extends AttentionCallbackInternal {
private final int mId;
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 691ae233ad22..1d949dc548da 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -85,6 +85,7 @@ import android.util.SparseArray;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
import android.view.Display;
+import android.view.KeyEvent;
import com.android.internal.BrightnessSynchronizer;
import com.android.internal.annotations.VisibleForTesting;
@@ -5425,6 +5426,29 @@ public final class PowerManagerService extends SystemService
}
}
+ /**
+ * If the user presses power while the proximity sensor is enabled and keeping
+ * the screen off, then turn the screen back on by telling display manager to
+ * ignore the proximity sensor. We don't turn off the proximity sensor because
+ * we still want it to be reenabled if it's state changes.
+ *
+ * @return True if the proximity sensor was successfully ignored and we should
+ * consume the key event.
+ */
+ private boolean interceptPowerKeyDownInternal(KeyEvent event) {
+ synchronized (mLock) {
+ // DisplayPowerController only reports proximity positive (near) if it's
+ // positive and the proximity wasn't already being ignored. So it reliably
+ // also tells us that we're not already ignoring the proximity sensor.
+ if (mDisplayPowerRequest.useProximitySensor && mProximityPositive) {
+ mDisplayManagerInternal.ignoreProximitySensorUntilChanged();
+ return true;
+ }
+ }
+
+ return false;
+ }
+
@VisibleForTesting
final class LocalService extends PowerManagerInternal {
@Override
@@ -5561,5 +5585,10 @@ public final class PowerManagerService extends SystemService
public WakeData getLastWakeup() {
return getLastWakeupInternal();
}
+
+ @Override
+ public boolean interceptPowerKeyDown(KeyEvent event) {
+ return interceptPowerKeyDownInternal(event);
+ }
}
}
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 2394bafc09de..fd3c1f97df8b 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -1469,7 +1469,7 @@ public class TrustManagerService extends SystemService {
if (userId > 0) {
return userId;
} else {
- Slog.wtf(TAG, "EXTRA_USER_HANDLE missing or invalid, value=" + userId);
+ Log.w(TAG, "EXTRA_USER_HANDLE missing or invalid, value=" + userId);
return -100;
}
}
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
index fde40aa77a0e..2a267c413c31 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
@@ -84,6 +84,7 @@ import android.os.Build;
import android.os.IBinder;
import android.os.PowerManagerInternal;
import android.os.SystemClock;
+import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -130,6 +131,7 @@ public class MockingOomAdjusterTests {
private static final int MOCKAPP5_UID = MOCKAPP_UID + 4;
private static final String MOCKAPP5_PROCESSNAME = "test #5";
private static final String MOCKAPP5_PACKAGENAME = "com.android.test.test5";
+ private static final int MOCKAPP2_UID_OTHER = MOCKAPP2_UID + UserHandle.PER_USER_RANGE;
private static Context sContext;
private static PackageManagerInternal sPackageManagerInternal;
private static ActivityManagerService sService;
@@ -168,6 +170,8 @@ public class MockingOomAdjusterTests {
mock(SparseArray.class));
setFieldValue(ActivityManagerService.class, sService, "mOomAdjProfiler",
mock(OomAdjProfiler.class));
+ setFieldValue(ActivityManagerService.class, sService, "mUserController",
+ mock(UserController.class));
doReturn(new ActivityManagerService.ProcessChangeItem()).when(sService)
.enqueueProcessChangeItemLocked(anyInt(), anyInt());
sService.mOomAdjuster = new OomAdjuster(sService, sService.mProcessList,
@@ -1621,6 +1625,117 @@ public class MockingOomAdjusterTests {
assertEquals(SERVICE_ADJ, app.setAdj);
}
+ @SuppressWarnings("GuardedBy")
+ @Test
+ public void testUpdateOomAdj_DoAll_Service_KeepWarmingList() {
+ final ProcessRecord app = spy(makeDefaultProcessRecord(MOCKAPP_PID, MOCKAPP_UID,
+ MOCKAPP_PROCESSNAME, MOCKAPP_PACKAGENAME, false));
+ final ProcessRecord app2 = spy(makeDefaultProcessRecord(MOCKAPP2_PID, MOCKAPP2_UID_OTHER,
+ MOCKAPP2_PROCESSNAME, MOCKAPP2_PACKAGENAME, false));
+ final int userOwner = 0;
+ final int userOther = 1;
+ final int cachedAdj1 = CACHED_APP_MIN_ADJ + ProcessList.CACHED_APP_IMPORTANCE_LEVELS;
+ final int cachedAdj2 = cachedAdj1 + ProcessList.CACHED_APP_IMPORTANCE_LEVELS * 2;
+ doReturn(userOwner).when(sService.mUserController).getCurrentUserId();
+
+ final ArrayList<ProcessRecord> lru = sService.mProcessList.mLruProcesses;
+ lru.clear();
+ lru.add(app2);
+ lru.add(app);
+
+ final ComponentName cn = ComponentName.unflattenFromString(
+ MOCKAPP_PACKAGENAME + "/.TestService");
+ final ComponentName cn2 = ComponentName.unflattenFromString(
+ MOCKAPP2_PACKAGENAME + "/.TestService");
+ final long now = SystemClock.uptimeMillis();
+
+ sService.mConstants.KEEP_WARMING_SERVICES.clear();
+ final ServiceInfo si = mock(ServiceInfo.class);
+ si.applicationInfo = mock(ApplicationInfo.class);
+ ServiceRecord s = spy(new ServiceRecord(sService, null, cn, cn, null, 0, null,
+ si, false, null));
+ doReturn(new ArrayMap<IBinder, ArrayList<ConnectionRecord>>()).when(s).getConnections();
+ s.startRequested = true;
+ s.lastActivity = now;
+
+ app.setCached(false);
+ app.startService(s);
+ app.hasShownUi = true;
+
+ final ServiceInfo si2 = mock(ServiceInfo.class);
+ si2.applicationInfo = mock(ApplicationInfo.class);
+ si2.applicationInfo.uid = MOCKAPP2_UID_OTHER;
+ ServiceRecord s2 = spy(new ServiceRecord(sService, null, cn2, cn2, null, 0, null,
+ si2, false, null));
+ doReturn(new ArrayMap<IBinder, ArrayList<ConnectionRecord>>()).when(s2).getConnections();
+ s2.startRequested = true;
+ s2.lastActivity = now - sService.mConstants.MAX_SERVICE_INACTIVITY - 1;
+
+ app2.setCached(false);
+ app2.startService(s2);
+ app2.hasShownUi = false;
+
+ sService.mWakefulness = PowerManagerInternal.WAKEFULNESS_AWAKE;
+ sService.mOomAdjuster.updateOomAdjLocked(OomAdjuster.OOM_ADJ_REASON_NONE);
+
+ assertProcStates(app, true, PROCESS_STATE_SERVICE, cachedAdj1, "cch-started-ui-services");
+ assertProcStates(app2, true, PROCESS_STATE_SERVICE, cachedAdj2, "cch-started-services");
+
+ app.setProcState = PROCESS_STATE_NONEXISTENT;
+ app.adjType = null;
+ app.setAdj = UNKNOWN_ADJ;
+ app.hasShownUi = false;
+ sService.mOomAdjuster.updateOomAdjLocked(OomAdjuster.OOM_ADJ_REASON_NONE);
+
+ assertProcStates(app, false, PROCESS_STATE_SERVICE, SERVICE_ADJ, "started-services");
+
+ app.setCached(false);
+ app.setProcState = PROCESS_STATE_NONEXISTENT;
+ app.adjType = null;
+ app.setAdj = UNKNOWN_ADJ;
+ s.lastActivity = now - sService.mConstants.MAX_SERVICE_INACTIVITY - 1;
+ sService.mOomAdjuster.updateOomAdjLocked(OomAdjuster.OOM_ADJ_REASON_NONE);
+
+ assertProcStates(app, true, PROCESS_STATE_SERVICE, cachedAdj1, "cch-started-services");
+
+ app.stopService(s);
+ app.setProcState = PROCESS_STATE_NONEXISTENT;
+ app.adjType = null;
+ app.setAdj = UNKNOWN_ADJ;
+ app.hasShownUi = true;
+ sService.mConstants.KEEP_WARMING_SERVICES.add(cn);
+ sService.mConstants.KEEP_WARMING_SERVICES.add(cn2);
+ s = spy(new ServiceRecord(sService, null, cn, cn, null, 0, null,
+ si, false, null));
+ doReturn(new ArrayMap<IBinder, ArrayList<ConnectionRecord>>()).when(s).getConnections();
+ s.startRequested = true;
+ s.lastActivity = now;
+
+ app.startService(s);
+ sService.mOomAdjuster.updateOomAdjLocked(OomAdjuster.OOM_ADJ_REASON_NONE);
+
+ assertProcStates(app, false, PROCESS_STATE_SERVICE, SERVICE_ADJ, "started-services");
+ assertProcStates(app2, true, PROCESS_STATE_SERVICE, cachedAdj1, "cch-started-services");
+
+ app.setCached(true);
+ app.setProcState = PROCESS_STATE_NONEXISTENT;
+ app.adjType = null;
+ app.setAdj = UNKNOWN_ADJ;
+ app.hasShownUi = false;
+ s.lastActivity = now - sService.mConstants.MAX_SERVICE_INACTIVITY - 1;
+ sService.mOomAdjuster.updateOomAdjLocked(OomAdjuster.OOM_ADJ_REASON_NONE);
+
+ assertProcStates(app, false, PROCESS_STATE_SERVICE, SERVICE_ADJ, "started-services");
+ assertProcStates(app2, true, PROCESS_STATE_SERVICE, cachedAdj1, "cch-started-services");
+
+ doReturn(userOther).when(sService.mUserController).getCurrentUserId();
+ sService.mOomAdjuster.handleUserSwitchedLocked();
+
+ sService.mOomAdjuster.updateOomAdjLocked(OomAdjuster.OOM_ADJ_REASON_NONE);
+ assertProcStates(app, true, PROCESS_STATE_SERVICE, cachedAdj1, "cch-started-services");
+ assertProcStates(app2, false, PROCESS_STATE_SERVICE, SERVICE_ADJ, "started-services");
+ }
+
private ProcessRecord makeDefaultProcessRecord(int pid, int uid, String processName,
String packageName, boolean hasShownUi) {
long now = SystemClock.uptimeMillis();
@@ -1747,4 +1862,12 @@ public class MockingOomAdjusterTests {
assertEquals(expectedAdj, app.setAdj);
assertEquals(expectedSchedGroup, app.setSchedGroup);
}
+
+ private void assertProcStates(ProcessRecord app, boolean expectedCached,
+ int expectedProcState, int expectedAdj, String expectedAdjType) {
+ assertEquals(expectedCached, app.isCached());
+ assertEquals(expectedProcState, app.setProcState);
+ assertEquals(expectedAdj, app.setAdj);
+ assertEquals(expectedAdjType, app.adjType);
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/power/AttentionDetectorTest.java b/services/tests/servicestests/src/com/android/server/power/AttentionDetectorTest.java
index e7e8aca86364..4381bfdb0b56 100644
--- a/services/tests/servicestests/src/com/android/server/power/AttentionDetectorTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/AttentionDetectorTest.java
@@ -21,6 +21,7 @@ import static android.provider.DeviceConfig.NAMESPACE_ATTENTION_MANAGER_SERVICE;
import static com.android.server.power.AttentionDetector.DEFAULT_POST_DIM_CHECK_DURATION_MILLIS;
import static com.android.server.power.AttentionDetector.DEFAULT_PRE_DIM_CHECK_DURATION_MILLIS;
+import static com.android.server.power.AttentionDetector.KEY_MAX_EXTENSION_MILLIS;
import static com.android.server.power.AttentionDetector.KEY_POST_DIM_CHECK_DURATION_MILLIS;
import static com.android.server.power.AttentionDetector.KEY_PRE_DIM_CHECK_DURATION_MILLIS;
@@ -87,6 +88,7 @@ public class AttentionDetectorTest extends AndroidTestCase {
when(mWindowManagerInternal.isKeyguardShowingAndNotOccluded()).thenReturn(false);
mAttentionDetector = new TestableAttentionDetector();
mRealAttentionDetector = new AttentionDetector(mOnUserAttention, new Object());
+ mRealAttentionDetector.mDefaultMaximumExtensionMillis = 900_000L;
mAttentionDetector.onWakefulnessChangeStarted(PowerManagerInternal.WAKEFULNESS_AWAKE);
mAttentionDetector.setAttentionServiceSupported(true);
mNextDimming = SystemClock.uptimeMillis() + 3000L;
@@ -98,6 +100,10 @@ public class AttentionDetectorTest extends AndroidTestCase {
Settings.Secure.putIntForUser(getContext().getContentResolver(),
Settings.Secure.ADAPTIVE_SLEEP, 1, UserHandle.USER_CURRENT);
mAttentionDetector.updateEnabledFromSettings(getContext());
+
+ DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS,
+ Long.toString(10_000L), false);
}
@After
@@ -111,6 +117,9 @@ public class AttentionDetectorTest extends AndroidTestCase {
DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
KEY_POST_DIM_CHECK_DURATION_MILLIS,
Long.toString(DEFAULT_POST_DIM_CHECK_DURATION_MILLIS), false);
+ DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS,
+ Long.toString(mRealAttentionDetector.mDefaultMaximumExtensionMillis), false);
}
@Test
@@ -393,6 +402,42 @@ public class AttentionDetectorTest extends AndroidTestCase {
DEFAULT_POST_DIM_CHECK_DURATION_MILLIS);
}
+ @Test
+ public void testGetMaxExtensionMillis_handlesGoodFlagValue() {
+ DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS, "123", false);
+ assertThat(mRealAttentionDetector.getMaxExtensionMillis()).isEqualTo(123);
+ }
+
+ @Test
+ public void testGetMaxExtensionMillis_rejectsNegativeValue() {
+ DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS, "-50", false);
+ assertThat(mRealAttentionDetector.getMaxExtensionMillis()).isEqualTo(
+ mRealAttentionDetector.mDefaultMaximumExtensionMillis);
+ }
+
+ @Test
+ public void testGetMaxExtensionMillis_rejectsTooBigValue() {
+ DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS, "9900000", false);
+ assertThat(mRealAttentionDetector.getMaxExtensionMillis()).isEqualTo(
+ mRealAttentionDetector.mDefaultMaximumExtensionMillis);
+ }
+
+ @Test
+ public void testGetMaxExtensionMillis_handlesBadFlagValue() {
+ DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS, "20000k", false);
+ assertThat(mRealAttentionDetector.getMaxExtensionMillis()).isEqualTo(
+ mRealAttentionDetector.mDefaultMaximumExtensionMillis);
+
+ DeviceConfig.setProperty(NAMESPACE_ATTENTION_MANAGER_SERVICE,
+ KEY_MAX_EXTENSION_MILLIS, "0.25", false);
+ assertThat(mRealAttentionDetector.getMaxExtensionMillis()).isEqualTo(
+ mRealAttentionDetector.mDefaultMaximumExtensionMillis);
+ }
+
private long registerAttention() {
mPreDimCheckDuration = 4000L;
mAttentionDetector.onUserActivity(SystemClock.uptimeMillis(),
@@ -409,7 +454,6 @@ public class AttentionDetectorTest extends AndroidTestCase {
mWindowManager = mWindowManagerInternal;
mPackageManager = AttentionDetectorTest.this.mPackageManager;
mContentResolver = getContext().getContentResolver();
- mMaximumExtensionMillis = 10000L;
}
void setAttentionServiceSupported(boolean supported) {
diff --git a/startop/iorap/src/com/google/android/startop/iorap/EventSequenceValidator.java b/startop/iorap/src/com/google/android/startop/iorap/EventSequenceValidator.java
index 67e1b440e28a..9b7a62b3a1df 100644
--- a/startop/iorap/src/com/google/android/startop/iorap/EventSequenceValidator.java
+++ b/startop/iorap/src/com/google/android/startop/iorap/EventSequenceValidator.java
@@ -96,7 +96,8 @@ import java.io.PrintWriter;
*/
public class EventSequenceValidator implements ActivityMetricsLaunchObserver {
static final String TAG = "EventSequenceValidator";
-
+ /** $> adb shell 'setprop log.tag.EventSequenceValidator VERBOSE' */
+ public static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private State state = State.INIT;
private long accIntentStartedEvents = 0;
@@ -255,9 +256,11 @@ public class EventSequenceValidator implements ActivityMetricsLaunchObserver {
}
private void logWarningWithStackTrace(String log) {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw);
- new Throwable("EventSequenceValidator#getStackTrace").printStackTrace(pw);
- Log.d(TAG, String.format("%s\n%s", log, sw));
+ if (DEBUG) {
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw);
+ new Throwable("EventSequenceValidator#getStackTrace").printStackTrace(pw);
+ Log.wtf(TAG, String.format("%s\n%s", log, sw));
+ }
}
}