summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java16
-rw-r--r--apex/jobscheduler/service/java/com/android/server/job/JobSchedulerShellCommand.java27
-rw-r--r--apex/jobscheduler/service/java/com/android/server/job/controllers/BackgroundJobsController.java119
-rw-r--r--apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java6
-rw-r--r--core/api/system-current.txt1
-rw-r--r--core/api/test-current.txt11
-rw-r--r--core/java/android/app/KeyguardManager.java27
-rw-r--r--core/java/android/app/Notification.java6
-rw-r--r--core/java/android/app/WallpaperManager.java5
-rw-r--r--core/java/android/content/Intent.java2
-rw-r--r--core/java/android/content/pm/UserProperties.java67
-rw-r--r--core/java/android/hardware/display/ColorDisplayManager.java4
-rw-r--r--core/java/android/os/OWNERS3
-rw-r--r--core/java/android/security/FileIntegrityManager.java8
-rw-r--r--core/java/android/service/notification/DeviceEffectsApplier.java38
-rw-r--r--core/java/android/service/notification/ZenDeviceEffects.java22
-rw-r--r--core/java/android/service/voice/VoiceInteractionService.java26
-rw-r--r--core/java/android/view/HdrRenderState.java121
-rw-r--r--core/java/android/view/ViewRootImpl.java53
-rw-r--r--core/java/android/view/accessibility/AccessibilityManager.java37
-rw-r--r--core/java/android/view/accessibility/IAccessibilityManager.aidl3
-rw-r--r--core/java/android/view/accessibility/flags/accessibility_flags.aconfig12
-rw-r--r--core/java/android/view/contentcapture/MainContentCaptureSession.java50
-rw-r--r--core/java/android/view/inputmethod/ImeTracker.java2
-rw-r--r--core/java/android/window/flags/wallpaper_manager.aconfig9
-rw-r--r--core/java/com/android/internal/accessibility/dialog/AccessibilityShortcutChooserActivity.java38
-rw-r--r--core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl10
-rw-r--r--core/res/res/values/config.xml10
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--core/tests/coretests/src/com/android/internal/accessibility/AccessibilityShortcutChooserActivityTest.java69
-rw-r--r--core/tests/coretests/src/com/android/internal/accessibility/dialog/AccessibilityServiceWarningTest.java2
-rw-r--r--data/etc/privapp-permissions-platform.xml2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java9
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java1
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationController.java8
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java13
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewDragController.kt40
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java34
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java12
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromTaskbar.kt4
-rw-r--r--libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromAllAppsBenchmark.kt8
-rw-r--r--libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromShortcutBenchmark.kt8
-rw-r--r--libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromTaskbarBenchmark.kt8
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationControllerTest.java2
-rw-r--r--libs/hwui/aconfig/hwui_flags.aconfig14
-rw-r--r--packages/CredentialManager/src/com/android/credentialmanager/common/ui/BottomSheet.kt7
-rw-r--r--packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlow.kt6
-rw-r--r--packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlowTest.kt14
-rw-r--r--packages/Shell/AndroidManifest.xml3
-rw-r--r--packages/SystemUI/Android.bp2
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt115
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt3
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt3
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileDataInteractorTest.kt200
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapperTest.kt481
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileUserActionInteractorTest.kt125
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java6
-rw-r--r--packages/SystemUI/res-keyguard/drawable/bouncer_password_text_view_focused_background.xml24
-rw-r--r--packages/SystemUI/res-keyguard/layout/keyguard_bouncer_message_area.xml2
-rw-r--r--packages/SystemUI/res-keyguard/values/styles.xml1
-rw-r--r--packages/SystemUI/res/layout/connected_display_dialog.xml9
-rw-r--r--packages/SystemUI/res/layout/screen_record_options.xml45
-rw-r--r--packages/SystemUI/res/layout/udfps_touch_overlay.xml3
-rw-r--r--packages/SystemUI/res/values-night/colors.xml3
-rw-r--r--packages/SystemUI/res/values/colors.xml2
-rw-r--r--packages/SystemUI/res/values/strings.xml2
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java56
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/data/repository/DeviceStateRepository.kt88
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractor.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/ui/viewmodel/ConnectingDisplayViewModel.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/Flags.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt15
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultSettingsPopupMenuSection.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapper.kt128
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileDataInteractor.kt113
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileUserActionInteractor.kt59
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/model/UiModeNightTileModel.kt35
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegate.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/model/InternetTileModel.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModel.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt37
-rw-r--r--packages/SystemUI/src/com/android/systemui/unfold/SysUIUnfoldModule.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DeviceStateRepositoryTest.kt164
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractorTest.kt43
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/events/SystemEventCoordinatorTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModelTest.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/android/view/accessibility/AccessibilityManagerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/internal/logging/MetricsLoggerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/internal/statusbar/StatusBarServiceKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/data/repository/AccessibilityRepositoryKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/domain/interactor/AccessibilityInteractorKosmos.kt27
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerFakeKosmos.kt21
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerKosmos.kt22
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/common/domain/interactor/ConfigurationInteractorKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/concurrency/FakeExecutorKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDeviceStateRepository.kt31
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/dump/DumpManagerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/WakefulnessLifecycleKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserverKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileKosmos.kt24
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileModelHelper.kt50
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/scene/data/repository/WindowRootViewVisibilityRepositoryKosmos.kt29
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionControllerKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionControllerKosmos.kt35
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerKosmos.kt65
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/MediaHierarchyManagerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationShadeDepthControllerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SingleShadeLockScreenOverScrollerKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SplitShadeLockScreenOverScrollerKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractorKosmos.kt27
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/footer/ui/viewmodel/FooterViewModelKosmos.kt31
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorKosmos.kt42
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/ShelfNotificationIconViewStoreKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/StatusBarIconViewBindingFailureTrackerKosmos.kt24
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerShelfViewModelKosmos.kt27
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/ActivatableNotificationViewModelKosmos.kt27
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/domain/interactor/NotificationShelfInteractorKosmos.kt33
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelKosmos.kt31
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/AmbientStateKosmos.kt37
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmKosmos.kt29
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/domain/interactor/HideNotificationsInteractorKosmos.kt33
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotifCollectionKosmos.kt24
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationListViewBinderKosmos.kt43
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/HideListViewModelKosmos.kt26
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelKosmos.kt41
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt36
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/KeyguardBypassControllerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/LSShadeTransitionLoggerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/NotificationIconAreaControllerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/ScrimControllerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/HeadsUpManagerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/ZenModeRepositoryKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorKosmos.kt27
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/unfold/UnfoldTransitionProgressProviderKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/unfold/data/repository/UnfoldTransitionRepositoryKosmos.kt28
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/unfold/domain/interactor/UnfoldTransitionInteractorKosmos.kt25
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/util/animation/data/repository/AnimationStatusRepositoryKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeBatteryController.java27
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeLocationController.java6
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java22
-rw-r--r--services/core/Android.bp1
-rw-r--r--services/core/java/com/android/server/BinaryTransparencyService.java20
-rw-r--r--services/core/java/com/android/server/Watchdog.java2
-rw-r--r--services/core/java/com/android/server/am/ActiveServices.java1
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java141
-rw-r--r--services/core/java/com/android/server/am/BroadcastQueueModernImpl.java1
-rw-r--r--services/core/java/com/android/server/am/flags.aconfig8
-rw-r--r--services/core/java/com/android/server/audio/AdiDeviceState.java7
-rw-r--r--services/core/java/com/android/server/audio/AudioDeviceInventory.java5
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java8
-rw-r--r--services/core/java/com/android/server/content/SyncJobService.java16
-rw-r--r--services/core/java/com/android/server/display/color/ColorDisplayService.java4
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java4
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java9
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java2
-rw-r--r--services/core/java/com/android/server/inputmethod/OWNERS2
-rw-r--r--services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java139
-rw-r--r--services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java71
-rwxr-xr-xservices/core/java/com/android/server/notification/NotificationManagerService.java6
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java83
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java2
-rw-r--r--services/core/java/com/android/server/utils/Android.bp10
-rw-r--r--services/core/java/com/android/server/utils/AnrTimer.java (renamed from services/core/java/com/android/server/am/AnrTimer.java)20
-rw-r--r--services/core/java/com/android/server/utils/flags.aconfig9
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java5
-rw-r--r--services/core/java/com/android/server/wm/BackgroundActivityStartController.java17
-rw-r--r--services/core/java/com/android/server/wm/InputMonitor.java2
-rw-r--r--services/core/java/com/android/server/wm/KeyguardController.java3
-rw-r--r--services/core/java/com/android/server/wm/RecentsAnimationController.java3
-rw-r--r--services/core/java/com/android/server/wm/Transition.java2
-rw-r--r--services/incremental/IncrementalService.cpp2
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/job/controllers/BackgroundJobsControllerTest.java291
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java48
-rw-r--r--services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java389
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/AudioDeviceBrokerTest.java132
-rw-r--r--services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTvTest.java22
-rw-r--r--services/tests/servicestests/src/com/android/server/utils/AnrTimerTest.java203
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java115
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java100
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java21
-rw-r--r--tests/FlickerTests/ActivityEmbedding/Android.bp2
-rw-r--r--tests/FlickerTests/ActivityEmbedding/AndroidManifest.xml2
-rw-r--r--tests/FlickerTests/ActivityEmbedding/trace_config/trace_config.textproto6
-rw-r--r--tests/FlickerTests/Android.bp12
-rw-r--r--tests/FlickerTests/AppClose/Android.bp1
-rw-r--r--tests/FlickerTests/AppClose/trace_config/trace_config.textproto6
-rw-r--r--tests/FlickerTests/AppLaunch/Android.bp2
-rw-r--r--tests/FlickerTests/AppLaunch/trace_config/trace_config.textproto6
-rw-r--r--tests/FlickerTests/FlickerService/Android.bp1
-rw-r--r--tests/FlickerTests/FlickerService/trace_config/trace_config.textproto8
-rw-r--r--tests/FlickerTests/IME/Android.bp3
-rw-r--r--tests/FlickerTests/IME/trace_config/trace_config.textproto6
-rw-r--r--tests/FlickerTests/Notification/Android.bp1
-rw-r--r--tests/FlickerTests/Notification/trace_config/trace_config.textproto8
-rw-r--r--tests/FlickerTests/QuickSwitch/Android.bp1
-rw-r--r--tests/FlickerTests/QuickSwitch/trace_config/trace_config.textproto6
-rw-r--r--tests/FlickerTests/Rotation/Android.bp1
-rw-r--r--tests/FlickerTests/Rotation/trace_config/trace_config.textproto6
-rw-r--r--tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt5
-rw-r--r--tests/SilkFX/OWNERS1
-rw-r--r--tests/graphics/HwAccelerationTest/.classpath (renamed from tests/HwAccelerationTest/.classpath)0
-rw-r--r--tests/graphics/HwAccelerationTest/.gitignore (renamed from tests/HwAccelerationTest/.gitignore)0
-rw-r--r--tests/graphics/HwAccelerationTest/Android.bp (renamed from tests/HwAccelerationTest/Android.bp)0
-rw-r--r--tests/graphics/HwAccelerationTest/AndroidManifest.xml (renamed from tests/HwAccelerationTest/AndroidManifest.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/default.properties (renamed from tests/HwAccelerationTest/default.properties)0
-rw-r--r--tests/graphics/HwAccelerationTest/jni/Android.bp (renamed from tests/HwAccelerationTest/jni/Android.bp)0
-rw-r--r--tests/graphics/HwAccelerationTest/jni/native-lib.cpp (renamed from tests/HwAccelerationTest/jni/native-lib.cpp)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/anim/accelerate_interpolator_2.xml (renamed from tests/HwAccelerationTest/res/anim/accelerate_interpolator_2.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/anim/fade_in.xml (renamed from tests/HwAccelerationTest/res/anim/fade_in.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/anim/fade_out.xml (renamed from tests/HwAccelerationTest/res/anim/fade_out.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/anim/slide_off_left.xml (renamed from tests/HwAccelerationTest/res/anim/slide_off_left.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-hdpi/appwidget_background.xml (renamed from tests/HwAccelerationTest/res/drawable-hdpi/appwidget_background.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-hdpi/icon.png (renamed from tests/HwAccelerationTest/res/drawable-hdpi/icon.png)bin5141 -> 5141 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset1.jpg (renamed from tests/HwAccelerationTest/res/drawable-hdpi/sunset1.jpg)bin28050 -> 28050 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset2.png (renamed from tests/HwAccelerationTest/res/drawable-hdpi/sunset2.png)bin55763 -> 55763 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset3.png (renamed from tests/HwAccelerationTest/res/drawable-hdpi/sunset3.png)bin45781 -> 45781 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-hdpi/widget_header.png (renamed from tests/HwAccelerationTest/res/drawable-hdpi/widget_header.png)bin4092 -> 4092 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-mdpi/expander_ic_maximized.9.png (renamed from tests/HwAccelerationTest/res/drawable-mdpi/expander_ic_maximized.9.png)bin1929 -> 1929 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-mdpi/expander_ic_minimized.9.png (renamed from tests/HwAccelerationTest/res/drawable-mdpi/expander_ic_minimized.9.png)bin1982 -> 1982 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg.9.png)bin1694 -> 1694 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_focus.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_focus.9.png)bin1910 -> 1910 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_press.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_press.9.png)bin1908 -> 1908 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/green_gradient.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/green_gradient.9.png)bin1239 -> 1239 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/large_photo.jpg (renamed from tests/HwAccelerationTest/res/drawable-nodpi/large_photo.jpg)bin311474 -> 311474 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/patch.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/patch.9.png)bin2863 -> 2863 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/patch2.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/patch2.9.png)bin2825 -> 2825 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_bg_holo_dark.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_bg_holo_dark.9.png)bin189 -> 189 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_primary_holo_dark.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_primary_holo_dark.9.png)bin506 -> 506 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_secondary_holo_dark.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_secondary_holo_dark.9.png)bin204 -> 204 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/scratches.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/scratches.png)bin248848 -> 248848 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_primary_holo.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_primary_holo.9.png)bin177 -> 177 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_secondary_holo.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_secondary_holo.9.png)bin179 -> 179 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_dark.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_dark.9.png)bin185 -> 185 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_light.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_light.9.png)bin170 -> 170 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/spot_mask.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/spot_mask.png)bin25505 -> 25505 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg (renamed from tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg)bin1781132 -> 1781132 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/weather_2.jpg (renamed from tests/HwAccelerationTest/res/drawable-nodpi/weather_2.jpg)bin706520 -> 706520 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable-nodpi/widget_title_bg.9.png (renamed from tests/HwAccelerationTest/res/drawable-nodpi/widget_title_bg.9.png)bin1429 -> 1429 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/appwidget_background.xml (renamed from tests/HwAccelerationTest/res/drawable/appwidget_background.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg.9.png (renamed from tests/HwAccelerationTest/res/drawable/appwidget_bg.9.png)bin1694 -> 1694 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg_focus.9.png (renamed from tests/HwAccelerationTest/res/drawable/appwidget_bg_focus.9.png)bin1910 -> 1910 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg_press.9.png (renamed from tests/HwAccelerationTest/res/drawable/appwidget_bg_press.9.png)bin1908 -> 1908 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/btn_toggle_off.9.png (renamed from tests/HwAccelerationTest/res/drawable/btn_toggle_off.9.png)bin364 -> 364 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/btn_toggle_on.9.png (renamed from tests/HwAccelerationTest/res/drawable/btn_toggle_on.9.png)bin442 -> 442 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/default_wallpaper.png (renamed from tests/HwAccelerationTest/res/drawable/default_wallpaper.png)bin320012 -> 320012 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/gradient.xml (renamed from tests/HwAccelerationTest/res/drawable/gradient.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/green_gradient.9.png (renamed from tests/HwAccelerationTest/res/drawable/green_gradient.9.png)bin1239 -> 1239 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/icon.png (renamed from tests/HwAccelerationTest/res/drawable/icon.png)bin3133 -> 3133 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/progress_vertical_holo_dark.xml (renamed from tests/HwAccelerationTest/res/drawable/progress_vertical_holo_dark.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/robot.png (renamed from tests/HwAccelerationTest/res/drawable/robot.png)bin5634 -> 5634 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/robot_repeated.xml (renamed from tests/HwAccelerationTest/res/drawable/robot_repeated.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/round_rect_background.xml (renamed from tests/HwAccelerationTest/res/drawable/round_rect_background.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/scrubber_progress_vertical_holo_dark.xml (renamed from tests/HwAccelerationTest/res/drawable/scrubber_progress_vertical_holo_dark.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/sunset1.jpg (renamed from tests/HwAccelerationTest/res/drawable/sunset1.jpg)bin28050 -> 28050 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/sunset2.png (renamed from tests/HwAccelerationTest/res/drawable/sunset2.png)bin55763 -> 55763 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/sunset3.png (renamed from tests/HwAccelerationTest/res/drawable/sunset3.png)bin45781 -> 45781 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/widget_header.png (renamed from tests/HwAccelerationTest/res/drawable/widget_header.png)bin6098 -> 6098 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/drawable/widget_title_bg.9.png (renamed from tests/HwAccelerationTest/res/drawable/widget_title_bg.9.png)bin1429 -> 1429 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/_advanced_blend.xml (renamed from tests/HwAccelerationTest/res/layout/_advanced_blend.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/_advanced_gradient.xml (renamed from tests/HwAccelerationTest/res/layout/_advanced_gradient.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/_layers.xml (renamed from tests/HwAccelerationTest/res/layout/_layers.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/_lines.xml (renamed from tests/HwAccelerationTest/res/layout/_lines.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/_newlayers.xml (renamed from tests/HwAccelerationTest/res/layout/_newlayers.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/_paths.xml (renamed from tests/HwAccelerationTest/res/layout/_paths.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/_shaders.xml (renamed from tests/HwAccelerationTest/res/layout/_shaders.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/colored_shadows_activity.xml (renamed from tests/HwAccelerationTest/res/layout/colored_shadows_activity.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/colored_shadows_row.xml (renamed from tests/HwAccelerationTest/res/layout/colored_shadows_row.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/date_picker.xml (renamed from tests/HwAccelerationTest/res/layout/date_picker.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/flipper_item.xml (renamed from tests/HwAccelerationTest/res/layout/flipper_item.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/form.xml (renamed from tests/HwAccelerationTest/res/layout/form.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/image_filter_activity.xml (renamed from tests/HwAccelerationTest/res/layout/image_filter_activity.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/labels.xml (renamed from tests/HwAccelerationTest/res/layout/labels.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/list_activity.xml (renamed from tests/HwAccelerationTest/res/layout/list_activity.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/pen_stylus.xml (renamed from tests/HwAccelerationTest/res/layout/pen_stylus.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/projection.xml (renamed from tests/HwAccelerationTest/res/layout/projection.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/projection_clipping.xml (renamed from tests/HwAccelerationTest/res/layout/projection_clipping.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/scrolling_stretch_surfaceview.xml (renamed from tests/HwAccelerationTest/res/layout/scrolling_stretch_surfaceview.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/stack.xml (renamed from tests/HwAccelerationTest/res/layout/stack.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/stack_item.xml (renamed from tests/HwAccelerationTest/res/layout/stack_item.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/stretch_layout.xml (renamed from tests/HwAccelerationTest/res/layout/stretch_layout.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/text_fade.xml (renamed from tests/HwAccelerationTest/res/layout/text_fade.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/text_large.xml (renamed from tests/HwAccelerationTest/res/layout/text_large.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/text_medium.xml (renamed from tests/HwAccelerationTest/res/layout/text_medium.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/text_small.xml (renamed from tests/HwAccelerationTest/res/layout/text_small.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/transforms_and_animations.xml (renamed from tests/HwAccelerationTest/res/layout/transforms_and_animations.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/view_layer_invalidation.xml (renamed from tests/HwAccelerationTest/res/layout/view_layer_invalidation.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/view_layers.xml (renamed from tests/HwAccelerationTest/res/layout/view_layers.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/view_layers_3.xml (renamed from tests/HwAccelerationTest/res/layout/view_layers_3.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/view_layers_4.xml (renamed from tests/HwAccelerationTest/res/layout/view_layers_4.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/view_layers_5.xml (renamed from tests/HwAccelerationTest/res/layout/view_layers_5.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/view_properties.xml (renamed from tests/HwAccelerationTest/res/layout/view_properties.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/view_runtime_shader.xml (renamed from tests/HwAccelerationTest/res/layout/view_runtime_shader.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/widget.xml (renamed from tests/HwAccelerationTest/res/layout/widget.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/layout/z_ordering.xml (renamed from tests/HwAccelerationTest/res/layout/z_ordering.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/raw/colorgrid_video.mp4 (renamed from tests/HwAccelerationTest/res/raw/colorgrid_video.mp4)bin25216 -> 25216 bytes
-rw-r--r--tests/graphics/HwAccelerationTest/res/values/strings.xml (renamed from tests/HwAccelerationTest/res/values/strings.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/res/values/styles.xml (renamed from tests/HwAccelerationTest/res/values/styles.xml)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AdvancedBlendActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/AdvancedBlendActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AdvancedGradientsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/AdvancedGradientsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Alpha8BitmapActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/Alpha8BitmapActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AlphaLayersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/AlphaLayersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Animated3dActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/Animated3dActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AssetsAtlasActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/AssetsAtlasActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BackdropBlurActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BackdropBlurActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BigGradientActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BigGradientActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshLayerActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshLayerActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapTransitionView.kt (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapTransitionView.kt)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Bitmaps3dActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/Bitmaps3dActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsAlphaActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsAlphaActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsRectActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsRectActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsSkewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsSkewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BlurActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/BlurActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CanvasTextureViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/CanvasTextureViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClearActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ClearActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipOutlineActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ClipOutlineActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegion3Activity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion3Activity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegionActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegionActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorBitmapActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ColorBitmapActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColoredRectsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ColoredRectsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColoredShadowsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ColoredShadowsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CustomRenderer.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/CustomRenderer.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DatePicker.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/DatePicker.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DatePickerActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/DatePickerActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DisplayListLayersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/DisplayListLayersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DrawIntoHwBitmapActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/DrawIntoHwBitmapActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/EdgeEffectStretchActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/EdgeEffectStretchActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/FramebufferBlendActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/FramebufferBlendActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/FrontBufferedLayer.kt (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/FrontBufferedLayer.kt)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GLDepthTestActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/GLDepthTestActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GLTextureViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/GLTextureViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GetBitmapActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/GetBitmapActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GetBitmapSurfaceViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/GetBitmapSurfaceViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GradientStopsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/GradientStopsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GradientsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/GradientsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareBufferRendererActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/HardwareBufferRendererActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasSurfaceViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasSurfaceViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasTextureViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasTextureViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HwTests.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/HwTests.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LabelsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/LabelsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LayersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/LayersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Lines2Activity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/Lines2Activity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ListActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ListActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LooperAcceleration.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/LooperAcceleration.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MarqueeActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MarqueeActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MatrixActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MatrixActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MaxBitmapSizeActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MaxBitmapSizeActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MeshActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MeshActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MeshLargeActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MeshLargeActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MoreNinePatchesActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MoreNinePatchesActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MovingSurfaceViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MovingSurfaceViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MultiProducerActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MultiProducerActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MyLittleTextureView.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/MyLittleTextureView.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NewLayersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/NewLayersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NinePatchesActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/NinePatchesActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NoAATextActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/NoAATextActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/OpaqueActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/OpaqueActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PaintDrawFilterActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PaintDrawFilterActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathDestructionActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PathDestructionActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathOffsetActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PathOffsetActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathOpsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PathOpsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathsCacheActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PathsCacheActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PenStylusActivity.kt (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PenStylusActivity.kt)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PictureCaptureDemo.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PictureCaptureDemo.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PixelCopyWindow.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PixelCopyWindow.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PointsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PointsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PositionListenerActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/PositionListenerActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/QuickRejectActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/QuickRejectActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RenderEffectShaderActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/RenderEffectShaderActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RenderEffectViewActivity.kt (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/RenderEffectViewActivity.kt)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ResizeActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ResizeActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Rotate3dTextActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/Rotate3dTextActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RotationActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/RotationActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScaledPathsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ScaledPathsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScaledTextActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ScaledTextActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScrollingStretchSurfaceViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ScrollingStretchSurfaceViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ShadersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ShadersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ShapesActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ShapesActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SimplePatchActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/SimplePatchActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SimplePathsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/SimplePathsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SingleFrameTextureViewTestActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/SingleFrameTextureViewTestActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SmallCircleActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/SmallCircleActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StackActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/StackActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StretchySurfaceViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/StretchySurfaceViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SurfaceViewAlphaActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/SurfaceViewAlphaActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TJunctionActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TJunctionActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextGammaActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TextGammaActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextOnPathActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TextOnPathActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextPathActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TextPathActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TimeDialogActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TimeDialogActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Transform3dActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/Transform3dActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TransformsAndAnimationsActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TransformsAndAnimationsActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TransparentListActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/TransparentListActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/VideoViewCaptureActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/VideoViewCaptureActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewFlipperActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewFlipperActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayerInvalidationActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayerInvalidationActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity2.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity2.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity3.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity3.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity4.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity4.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity5.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity5.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewPropertyAlphaActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ViewPropertyAlphaActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/XfermodeActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/XfermodeActivity.java)0
-rw-r--r--tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java (renamed from tests/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java)0
-rw-r--r--tests/graphics/OWNERS (renamed from tests/HwAccelerationTest/OWNERS)2
-rw-r--r--tests/graphics/RenderThreadTest/Android.bp (renamed from tests/RenderThreadTest/Android.bp)0
-rw-r--r--tests/graphics/RenderThreadTest/AndroidManifest.xml (renamed from tests/RenderThreadTest/AndroidManifest.xml)0
-rw-r--r--tests/graphics/RenderThreadTest/res/drawable-hdpi/ic_launcher.png (renamed from tests/RenderThreadTest/res/drawable-hdpi/ic_launcher.png)bin9397 -> 9397 bytes
-rw-r--r--tests/graphics/RenderThreadTest/res/drawable-mdpi/ic_launcher.png (renamed from tests/RenderThreadTest/res/drawable-mdpi/ic_launcher.png)bin5237 -> 5237 bytes
-rw-r--r--tests/graphics/RenderThreadTest/res/drawable-xhdpi/ic_launcher.png (renamed from tests/RenderThreadTest/res/drawable-xhdpi/ic_launcher.png)bin14383 -> 14383 bytes
-rw-r--r--tests/graphics/RenderThreadTest/res/drawable-xhdpi/starry_night_bg.jpg (renamed from tests/RenderThreadTest/res/drawable-xhdpi/starry_night_bg.jpg)bin564084 -> 564084 bytes
-rw-r--r--tests/graphics/RenderThreadTest/res/layout/activity_main.xml (renamed from tests/RenderThreadTest/res/layout/activity_main.xml)0
-rw-r--r--tests/graphics/RenderThreadTest/res/layout/activity_sub.xml (renamed from tests/RenderThreadTest/res/layout/activity_sub.xml)0
-rw-r--r--tests/graphics/RenderThreadTest/res/layout/item_layout.xml (renamed from tests/RenderThreadTest/res/layout/item_layout.xml)0
-rw-r--r--tests/graphics/RenderThreadTest/res/values/strings.xml (renamed from tests/RenderThreadTest/res/values/strings.xml)0
-rw-r--r--tests/graphics/RenderThreadTest/res/values/styles.xml (renamed from tests/RenderThreadTest/res/values/styles.xml)0
-rw-r--r--tests/graphics/RenderThreadTest/src/com/example/renderthread/MainActivity.java (renamed from tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java)0
-rw-r--r--tests/graphics/RenderThreadTest/src/com/example/renderthread/SubActivity.java (renamed from tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java)0
-rw-r--r--tests/graphics/SilkFX/Android.bp (renamed from tests/SilkFX/Android.bp)0
-rw-r--r--tests/graphics/SilkFX/AndroidManifest.xml (renamed from tests/SilkFX/AndroidManifest.xml)0
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/city_night.jpg (renamed from tests/SilkFX/assets/gainmaps/city_night.jpg)bin2995396 -> 2995396 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/desert_palms.jpg (renamed from tests/SilkFX/assets/gainmaps/desert_palms.jpg)bin3859886 -> 3859886 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/desert_sunset.jpg (renamed from tests/SilkFX/assets/gainmaps/desert_sunset.jpg)bin2577663 -> 2577663 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/desert_wanda.jpg (renamed from tests/SilkFX/assets/gainmaps/desert_wanda.jpg)bin1925203 -> 1925203 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/fountain_night.jpg (renamed from tests/SilkFX/assets/gainmaps/fountain_night.jpg)bin3579758 -> 3579758 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/grand_canyon.jpg (renamed from tests/SilkFX/assets/gainmaps/grand_canyon.jpg)bin4714624 -> 4714624 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/lamps.jpg (renamed from tests/SilkFX/assets/gainmaps/lamps.jpg)bin1645109 -> 1645109 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/mountain_lake.jpg (renamed from tests/SilkFX/assets/gainmaps/mountain_lake.jpg)bin3242535 -> 3242535 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/mountains.jpg (renamed from tests/SilkFX/assets/gainmaps/mountains.jpg)bin4936427 -> 4936427 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/sunflower.jpg (renamed from tests/SilkFX/assets/gainmaps/sunflower.jpg)bin2525581 -> 2525581 bytes
-rw-r--r--tests/graphics/SilkFX/assets/gainmaps/train_station_night.jpg (renamed from tests/SilkFX/assets/gainmaps/train_station_night.jpg)bin3281254 -> 3281254 bytes
-rw-r--r--tests/graphics/SilkFX/res/drawable-hdpi/background1.jpeg (renamed from tests/SilkFX/res/drawable-hdpi/background1.jpeg)bin200459 -> 200459 bytes
-rw-r--r--tests/graphics/SilkFX/res/drawable-hdpi/background2.jpeg (renamed from tests/SilkFX/res/drawable-hdpi/background2.jpeg)bin110703 -> 110703 bytes
-rw-r--r--tests/graphics/SilkFX/res/drawable-hdpi/background3.jpeg (renamed from tests/SilkFX/res/drawable-hdpi/background3.jpeg)bin318853 -> 318853 bytes
-rw-r--r--tests/graphics/SilkFX/res/drawable-hdpi/noise.png (renamed from tests/SilkFX/res/drawable-hdpi/noise.png)bin494875 -> 494875 bytes
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/blue_sweep_gradient.xml (renamed from tests/SilkFX/res/drawable-nodpi/blue_sweep_gradient.xml)0
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/dark_gradient.xml (renamed from tests/SilkFX/res/drawable-nodpi/dark_gradient.xml)0
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/dark_notification.png (renamed from tests/SilkFX/res/drawable-nodpi/dark_notification.png)bin42263 -> 42263 bytes
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/green_sweep_gradient.xml (renamed from tests/SilkFX/res/drawable-nodpi/green_sweep_gradient.xml)0
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/grey_sweep_gradient.xml (renamed from tests/SilkFX/res/drawable-nodpi/grey_sweep_gradient.xml)0
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/light_gradient.xml (renamed from tests/SilkFX/res/drawable-nodpi/light_gradient.xml)0
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/light_notification.png (renamed from tests/SilkFX/res/drawable-nodpi/light_notification.png)bin37096 -> 37096 bytes
-rw-r--r--tests/graphics/SilkFX/res/drawable-nodpi/red_sweep_gradient.xml (renamed from tests/SilkFX/res/drawable-nodpi/red_sweep_gradient.xml)0
-rw-r--r--tests/graphics/SilkFX/res/drawable/background_blur_drawable.xml (renamed from tests/SilkFX/res/drawable/background_blur_drawable.xml)0
-rw-r--r--tests/graphics/SilkFX/res/drawable/blur_activity_background_drawable_white.xml (renamed from tests/SilkFX/res/drawable/blur_activity_background_drawable_white.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout-television/activity_glass.xml (renamed from tests/SilkFX/res/layout-television/activity_glass.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/activity_background_blur.xml (renamed from tests/SilkFX/res/layout/activity_background_blur.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/activity_glass.xml (renamed from tests/SilkFX/res/layout/activity_glass.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/bling_notifications.xml (renamed from tests/SilkFX/res/layout/bling_notifications.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/color_grid.xml (renamed from tests/SilkFX/res/layout/color_grid.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/color_mode_controls.xml (renamed from tests/SilkFX/res/layout/color_mode_controls.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/common_base.xml (renamed from tests/SilkFX/res/layout/common_base.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/gainmap_decode_test.xml (renamed from tests/SilkFX/res/layout/gainmap_decode_test.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/gainmap_image.xml (renamed from tests/SilkFX/res/layout/gainmap_image.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/gainmap_metadata.xml (renamed from tests/SilkFX/res/layout/gainmap_metadata.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/gainmap_transform_test.xml (renamed from tests/SilkFX/res/layout/gainmap_transform_test.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/gradient_sweep.xml (renamed from tests/SilkFX/res/layout/gradient_sweep.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/hdr_glows.xml (renamed from tests/SilkFX/res/layout/hdr_glows.xml)0
-rw-r--r--tests/graphics/SilkFX/res/layout/hdr_image_viewer.xml (renamed from tests/SilkFX/res/layout/hdr_image_viewer.xml)0
-rw-r--r--tests/graphics/SilkFX/res/values/style.xml (renamed from tests/SilkFX/res/values/style.xml)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/Main.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/app/BaseDemoActivity.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/app/BaseDemoActivity.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/app/CommonDemoActivity.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/app/CommonDemoActivity.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/app/HdrImageViewer.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/app/HdrImageViewer.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/app/WindowObserver.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/app/WindowObserver.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/common/BaseDrawingView.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/common/BaseDrawingView.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/common/ColorModeControls.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/common/ColorModeControls.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/common/HDRIndicator.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/common/HDRIndicator.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/BlingyNotification.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/BlingyNotification.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/ColorGrid.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/ColorGrid.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapDecodeTest.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapDecodeTest.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapImage.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapImage.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapMetadataEditor.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapMetadataEditor.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapTransformsTest.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapTransformsTest.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GlowActivity.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/GlowActivity.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GlowingCard.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/GlowingCard.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/RadialGlow.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/hdr/RadialGlow.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt)0
-rw-r--r--tests/graphics/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt (renamed from tests/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt)0
-rw-r--r--tests/graphics/VectorDrawableTest/Android.bp (renamed from tests/VectorDrawableTest/Android.bp)0
-rw-r--r--tests/graphics/VectorDrawableTest/AndroidManifest.xml (renamed from tests/VectorDrawableTest/AndroidManifest.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/OWNERS (renamed from tests/VectorDrawableTest/OWNERS)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/alpha_animation_progress_bar.xml (renamed from tests/VectorDrawableTest/res/anim/alpha_animation_progress_bar.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_favorite.xml (renamed from tests/VectorDrawableTest/res/anim/animation_favorite.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_favorite02.xml (renamed from tests/VectorDrawableTest/res/anim/animation_favorite02.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_grouping_1_01.xml (renamed from tests/VectorDrawableTest/res/anim/animation_grouping_1_01.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_grouping_1_02.xml (renamed from tests/VectorDrawableTest/res/anim/animation_grouping_1_02.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_scale.xml (renamed from tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_scale.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_translate.xml (renamed from tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_translate.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_scale.xml (renamed from tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_scale.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_translate.xml (renamed from tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_translate.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/blink.xml (renamed from tests/VectorDrawableTest/res/anim/blink.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_fill_outlines.xml (renamed from tests/VectorDrawableTest/res/anim/ic_hourglass_animation_fill_outlines.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_hourglass_frame.xml (renamed from tests/VectorDrawableTest/res/anim/ic_hourglass_animation_hourglass_frame.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_mask_1.xml (renamed from tests/VectorDrawableTest/res/anim/ic_hourglass_animation_mask_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_arrows_1.xml (renamed from tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_arrows_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_1.xml (renamed from tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_2.xml (renamed from tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_2.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_cross_1.xml (renamed from tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_cross_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_ic_signal_airplane.xml (renamed from tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_ic_signal_airplane.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_mask_2.xml (renamed from tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_mask_2.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_path_1_1.xml (renamed from tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_path_1_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/trim_path_animation01.xml (renamed from tests/VectorDrawableTest/res/anim/trim_path_animation01.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/trim_path_animation02.xml (renamed from tests/VectorDrawableTest/res/anim/trim_path_animation02.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/trim_path_animation03.xml (renamed from tests/VectorDrawableTest/res/anim/trim_path_animation03.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/trim_path_animation04.xml (renamed from tests/VectorDrawableTest/res/anim/trim_path_animation04.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/trim_path_animation05.xml (renamed from tests/VectorDrawableTest/res/anim/trim_path_animation05.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/trim_path_animation06.xml (renamed from tests/VectorDrawableTest/res/anim/trim_path_animation06.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml (renamed from tests/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_linear.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_clamp.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_linear_clamp.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_linear_item.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap_mirror.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap_mirror.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_repeat.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_linear_item_repeat.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_radial.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_clamp.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_radial_clamp.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_radial_item.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_repeat.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_radial_item_repeat.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_short.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_radial_item_short.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_short_mirror.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_radial_item_short_mirror.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_sweep.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_clamp.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_sweep_clamp.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_sweep_item.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_long.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_long.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_long_mirror.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_long_mirror.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_repeat.xml (renamed from tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_repeat.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/stroke_gradient.xml (renamed from tests/VectorDrawableTest/res/color/stroke_gradient.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/stroke_gradient_clamp.xml (renamed from tests/VectorDrawableTest/res/color/stroke_gradient_clamp.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item.xml (renamed from tests/VectorDrawableTest/res/color/stroke_gradient_item.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_alpha.xml (renamed from tests/VectorDrawableTest/res/color/stroke_gradient_item_alpha.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_alpha_mirror.xml (renamed from tests/VectorDrawableTest/res/color/stroke_gradient_item_alpha_mirror.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_repeat.xml (renamed from tests/VectorDrawableTest/res/color/stroke_gradient_item_repeat.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/vector_icon_fill_state_list.xml (renamed from tests/VectorDrawableTest/res/color/vector_icon_fill_state_list.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/vector_icon_fill_state_list_simple.xml (renamed from tests/VectorDrawableTest/res/color/vector_icon_fill_state_list_simple.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/vector_icon_stroke_state_list.xml (renamed from tests/VectorDrawableTest/res/color/vector_icon_stroke_state_list.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/color/vector_icon_stroke_state_list_simple.xml (renamed from tests/VectorDrawableTest/res/color/vector_icon_stroke_state_list_simple.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable-hdpi/icon.png (renamed from tests/VectorDrawableTest/res/drawable-hdpi/icon.png)bin5141 -> 5141 bytes
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable-nodpi/bitmap_drawable01.jpg (renamed from tests/VectorDrawableTest/res/drawable-nodpi/bitmap_drawable01.jpg)bin3304 -> 3304 bytes
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon.xml (renamed from tests/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon_animated.xml (renamed from tests/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon_animated.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animation_drawable_vector.xml (renamed from tests/VectorDrawableTest/res/drawable/animation_drawable_vector.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml (renamed from tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml (renamed from tests/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml (renamed from tests/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animation_vector_linear_progress_bar.xml (renamed from tests/VectorDrawableTest/res/drawable/animation_vector_linear_progress_bar.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml (renamed from tests/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml (renamed from tests/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/ic_hourglass.xml (renamed from tests/VectorDrawableTest/res/drawable/ic_hourglass.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/ic_hourglass_animation.xml (renamed from tests/VectorDrawableTest/res/drawable/ic_hourglass_animation.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2.xml (renamed from tests/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2_animation.xml (renamed from tests/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2_animation.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/ic_signal_airplane_v2.xml (renamed from tests/VectorDrawableTest/res/drawable/ic_signal_airplane_v2.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/ic_signal_airplane_v2_animation.xml (renamed from tests/VectorDrawableTest/res/drawable/ic_signal_airplane_v2_animation.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/icon.png (renamed from tests/VectorDrawableTest/res/drawable/icon.png)bin3133 -> 3133 bytes
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_drawable04.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_drawable04.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_drawable04_false.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_drawable04_false.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable01.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable01.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable01_false.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable01_false.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable02.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable02.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable02_false.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable02_false.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable03.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable03.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable03_false.xml (renamed from tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable03_false.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable01.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable01.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable02.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable02.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable03.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable03.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable04.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable04.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable05.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable05.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable06.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable06.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable07.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable07.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable08.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable08.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable09.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable09.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable10.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable10.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable11.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable11.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable12.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable12.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable13.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable13.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable14.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable14.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable15.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable15.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable16.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable16.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable17.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable17.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable18.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable18.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable19.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable19.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable20.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable20.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable21.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable21.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable22.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable22.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable23.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable23.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable24.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable24.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable25.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable25.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable26.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable26.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable27.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable27.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable28.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable28.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable29.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable29.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable30.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable30.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_linear_progress_bar.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_linear_progress_bar.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale0.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_scale0.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale1.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_scale1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale2.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_scale2.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale3.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_drawable_scale3.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_create.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_create.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_delete.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_filltype_evenodd.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_filltype_evenodd.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_filltype_nonzero.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_filltype_nonzero.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_1.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_gradient_1.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_1_clamp.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_gradient_1_clamp.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_2.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_gradient_2.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_2_repeat.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_gradient_2_repeat.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_3.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_gradient_3.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_3_mirror.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_gradient_3_mirror.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_heart.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_schedule.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_settings.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_settings.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_state_list_simple.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_state_list_simple.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_icon_state_list_theme.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_icon_state_list_theme.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_test01.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_test01.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/drawable/vector_test02.xml (renamed from tests/VectorDrawableTest/res/drawable/vector_test02.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml (renamed from tests/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml (renamed from tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml (renamed from tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_rotation_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_rotation_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_scalex_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_scalex_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_1_rotation_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_1_rotation_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_2_pathdata_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_2_pathdata_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/ic_signal_airplane_v2_path_1_1_pathdata_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/ic_signal_airplane_v2_path_1_1_pathdata_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml (renamed from tests/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/layout/activity_animated_vector_drawable_attr.xml (renamed from tests/VectorDrawableTest/res/layout/activity_animated_vector_drawable_attr.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/values/attrs.xml (renamed from tests/VectorDrawableTest/res/values/attrs.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/values/colors.xml (renamed from tests/VectorDrawableTest/res/values/colors.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/values/strings.xml (renamed from tests/VectorDrawableTest/res/values/strings.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/res/values/styles.xml (renamed from tests/VectorDrawableTest/res/values/styles.xml)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedStateVectorDrawableTest.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedStateVectorDrawableTest.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableAttr.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableAttr.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableDupPerf.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableDupPerf.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/BitmapDrawableDupe.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/BitmapDrawableDupe.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/BoundsCheckTest.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/BoundsCheckTest.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/ScaleDrawableTests.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/ScaleDrawableTests.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableAnimation.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableAnimation.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java)0
-rw-r--r--tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java (renamed from tests/VectorDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java)0
-rw-r--r--tools/aapt2/cmd/Link.cpp8
-rw-r--r--tools/aapt2/link/ManifestFixer.cpp2
701 files changed, 5650 insertions, 930 deletions
diff --git a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
index f97100bf2e9b..83db4cbb7e43 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java
@@ -1433,10 +1433,10 @@ public class JobSchedulerService extends com.android.server.SystemService
Slog.d(TAG, "Removing jobs for pkg " + pkgName + " at uid " + pkgUid);
}
synchronized (mLock) {
- // Exclude jobs scheduled on behalf of this app for now because SyncManager
+ // Exclude jobs scheduled on behalf of this app because SyncManager
// and other job proxy agents may not know to reschedule the job properly
// after force stop.
- // TODO(209852664): determine how to best handle syncs & other proxied jobs
+ // Proxied jobs will not be allowed to run if the source app is stopped.
cancelJobsForPackageAndUidLocked(pkgName, pkgUid,
/* includeSchedulingApp */ true, /* includeSourceApp */ false,
JobParameters.STOP_REASON_USER,
@@ -1448,7 +1448,9 @@ public class JobSchedulerService extends com.android.server.SystemService
}
};
- private String getPackageName(Intent intent) {
+ /** Returns the package name stored in the intent's data. */
+ @Nullable
+ public static String getPackageName(Intent intent) {
Uri uri = intent.getData();
String pkg = uri != null ? uri.getSchemeSpecificPart() : null;
return pkg;
@@ -5365,6 +5367,14 @@ public class JobSchedulerService extends com.android.server.SystemService
}
pw.println();
+ pw.println("Aconfig flags:");
+ pw.increaseIndent();
+ pw.print(Flags.FLAG_THROW_ON_UNSUPPORTED_BIAS_USAGE,
+ Flags.throwOnUnsupportedBiasUsage());
+ pw.println();
+ pw.decreaseIndent();
+ pw.println();
+
for (int i = mJobRestrictions.size() - 1; i >= 0; i--) {
mJobRestrictions.get(i).dumpConstants(pw);
}
diff --git a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerShellCommand.java b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerShellCommand.java
index 293088d9236f..c14efae3fa62 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerShellCommand.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/JobSchedulerShellCommand.java
@@ -58,6 +58,8 @@ public final class JobSchedulerShellCommand extends BasicShellCommandHandler {
return cancelJob(pw);
case "monitor-battery":
return monitorBattery(pw);
+ case "get-aconfig-flag-state":
+ return getAconfigFlagState(pw);
case "get-battery-seq":
return getBatterySeq(pw);
case "get-battery-charging":
@@ -336,6 +338,28 @@ public final class JobSchedulerShellCommand extends BasicShellCommandHandler {
return 0;
}
+ private int getAconfigFlagState(PrintWriter pw) throws Exception {
+ checkPermission("get aconfig flag state");
+
+ final String flagName = getNextArgRequired();
+
+ switch (flagName) {
+ case android.app.job.Flags.FLAG_JOB_DEBUG_INFO_APIS:
+ pw.println(android.app.job.Flags.jobDebugInfoApis());
+ break;
+ case android.app.job.Flags.FLAG_ENFORCE_MINIMUM_TIME_WINDOWS:
+ pw.println(android.app.job.Flags.enforceMinimumTimeWindows());
+ break;
+ case com.android.server.job.Flags.FLAG_THROW_ON_UNSUPPORTED_BIAS_USAGE:
+ pw.println(com.android.server.job.Flags.throwOnUnsupportedBiasUsage());
+ break;
+ default:
+ pw.println("Unknown flag: " + flagName);
+ break;
+ }
+ return 0;
+ }
+
private int getBatterySeq(PrintWriter pw) {
int seq = mInternal.getBatterySeq();
pw.println(seq);
@@ -693,6 +717,9 @@ public final class JobSchedulerShellCommand extends BasicShellCommandHandler {
pw.println(" monitor-battery [on|off]");
pw.println(" Control monitoring of all battery changes. Off by default. Turning");
pw.println(" on makes get-battery-seq useful.");
+ pw.println(" get-aconfig-flag-state FULL_FLAG_NAME");
+ pw.println(" Return the state of the specified aconfig flag, if known. The flag name");
+ pw.println(" must be fully qualified.");
pw.println(" get-battery-seq");
pw.println(" Return the last battery update sequence number that was received.");
pw.println(" get-battery-charging");
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/BackgroundJobsController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/BackgroundJobsController.java
index cd3ba6b9e13e..4aadc903ba23 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/BackgroundJobsController.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/BackgroundJobsController.java
@@ -17,18 +17,26 @@
package com.android.server.job.controllers;
import static com.android.server.job.JobSchedulerService.NEVER_INDEX;
+import static com.android.server.job.JobSchedulerService.getPackageName;
import static com.android.server.job.JobSchedulerService.sElapsedRealtimeClock;
import android.app.ActivityManager;
import android.app.ActivityManagerInternal;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManagerInternal;
import android.os.SystemClock;
import android.os.UserHandle;
import android.util.ArraySet;
import android.util.IndentingPrintWriter;
import android.util.Log;
import android.util.Slog;
+import android.util.SparseArrayMap;
import android.util.proto.ProtoOutputStream;
+import com.android.internal.annotations.GuardedBy;
import com.android.server.AppStateTracker;
import com.android.server.AppStateTrackerImpl;
import com.android.server.AppStateTrackerImpl.Listener;
@@ -50,6 +58,8 @@ import java.util.function.Predicate;
*
* - the uid-active boolean state expressed by the AppStateTracker. Jobs in 'active'
* uids are inherently eligible to run jobs regardless of the uid's standby bucket.
+ *
+ * - the app's stopped state
*/
public final class BackgroundJobsController extends StateController {
private static final String TAG = "JobScheduler.Background";
@@ -63,9 +73,48 @@ public final class BackgroundJobsController extends StateController {
private final ActivityManagerInternal mActivityManagerInternal;
private final AppStateTrackerImpl mAppStateTracker;
+ private final PackageManagerInternal mPackageManagerInternal;
+
+ @GuardedBy("mLock")
+ private final SparseArrayMap<String, Boolean> mPackageStoppedState = new SparseArrayMap<>();
private final UpdateJobFunctor mUpdateJobFunctor = new UpdateJobFunctor();
+ private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final String pkgName = getPackageName(intent);
+ final int pkgUid = intent.getIntExtra(Intent.EXTRA_UID, -1);
+ final String action = intent.getAction();
+ if (pkgUid == -1) {
+ Slog.e(TAG, "Didn't get package UID in intent (" + action + ")");
+ return;
+ }
+
+ if (DEBUG) {
+ Slog.d(TAG, "Got " + action + " for " + pkgUid + "/" + pkgName);
+ }
+
+ switch (action) {
+ case Intent.ACTION_PACKAGE_RESTARTED: {
+ synchronized (mLock) {
+ mPackageStoppedState.add(pkgUid, pkgName, Boolean.TRUE);
+ updateJobRestrictionsForUidLocked(pkgUid, false);
+ }
+ }
+ break;
+
+ case Intent.ACTION_PACKAGE_UNSTOPPED: {
+ synchronized (mLock) {
+ mPackageStoppedState.add(pkgUid, pkgName, Boolean.FALSE);
+ updateJobRestrictionsLocked(pkgUid, UNKNOWN);
+ }
+ }
+ break;
+ }
+ }
+ };
+
public BackgroundJobsController(JobSchedulerService service) {
super(service);
@@ -73,11 +122,18 @@ public final class BackgroundJobsController extends StateController {
LocalServices.getService(ActivityManagerInternal.class));
mAppStateTracker = (AppStateTrackerImpl) Objects.requireNonNull(
LocalServices.getService(AppStateTracker.class));
+ mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class);
}
@Override
public void startTrackingLocked() {
mAppStateTracker.addListener(mForceAppStandbyListener);
+ final IntentFilter filter = new IntentFilter();
+ filter.addAction(Intent.ACTION_PACKAGE_RESTARTED);
+ filter.addAction(Intent.ACTION_PACKAGE_UNSTOPPED);
+ filter.addDataScheme("package");
+ mContext.registerReceiverAsUser(
+ mBroadcastReceiver, UserHandle.ALL, filter, null, null);
}
@Override
@@ -99,11 +155,45 @@ public final class BackgroundJobsController extends StateController {
}
@Override
+ public void onAppRemovedLocked(String packageName, int uid) {
+ mPackageStoppedState.delete(uid, packageName);
+ }
+
+ @Override
+ public void onUserRemovedLocked(int userId) {
+ for (int u = mPackageStoppedState.numMaps() - 1; u >= 0; --u) {
+ final int uid = mPackageStoppedState.keyAt(u);
+ if (UserHandle.getUserId(uid) == userId) {
+ mPackageStoppedState.deleteAt(u);
+ }
+ }
+ }
+
+ @Override
public void dumpControllerStateLocked(final IndentingPrintWriter pw,
final Predicate<JobStatus> predicate) {
+ pw.println("Aconfig flags:");
+ pw.increaseIndent();
+ pw.print(android.content.pm.Flags.FLAG_STAY_STOPPED,
+ android.content.pm.Flags.stayStopped());
+ pw.println();
+ pw.decreaseIndent();
+ pw.println();
+
mAppStateTracker.dump(pw);
pw.println();
+ pw.println("Stopped packages:");
+ pw.increaseIndent();
+ mPackageStoppedState.forEach((uid, pkgName, isStopped) -> {
+ pw.print(uid);
+ pw.print(":");
+ pw.print(pkgName);
+ pw.print("=");
+ pw.println(isStopped);
+ });
+ pw.println();
+
mService.getJobStore().forEachJob(predicate, (jobStatus) -> {
final int uid = jobStatus.getSourceUid();
final String sourcePkg = jobStatus.getSourcePackageName();
@@ -205,14 +295,34 @@ public final class BackgroundJobsController extends StateController {
}
}
+ private boolean isPackageStopped(String packageName, int uid) {
+ if (mPackageStoppedState.contains(uid, packageName)) {
+ return mPackageStoppedState.get(uid, packageName);
+ }
+ final boolean isStopped = mPackageManagerInternal.isPackageStopped(packageName, uid);
+ mPackageStoppedState.add(uid, packageName, isStopped);
+ return isStopped;
+ }
+
boolean updateSingleJobRestrictionLocked(JobStatus jobStatus, final long nowElapsed,
int activeState) {
final int uid = jobStatus.getSourceUid();
final String packageName = jobStatus.getSourcePackageName();
- final boolean isUserBgRestricted =
- !mActivityManagerInternal.isBgAutoRestrictedBucketFeatureFlagEnabled()
- && !mAppStateTracker.isRunAnyInBackgroundAppOpsAllowed(uid, packageName);
+ final boolean isSourcePkgStopped =
+ isPackageStopped(jobStatus.getSourcePackageName(), jobStatus.getSourceUid());
+ final boolean isCallingPkgStopped;
+ if (!jobStatus.isProxyJob()) {
+ isCallingPkgStopped = isSourcePkgStopped;
+ } else {
+ isCallingPkgStopped =
+ isPackageStopped(jobStatus.getCallingPackageName(), jobStatus.getUid());
+ }
+ final boolean isStopped = android.content.pm.Flags.stayStopped()
+ && (isCallingPkgStopped || isSourcePkgStopped);
+ final boolean isUserBgRestricted = isStopped
+ || (!mActivityManagerInternal.isBgAutoRestrictedBucketFeatureFlagEnabled()
+ && !mAppStateTracker.isRunAnyInBackgroundAppOpsAllowed(uid, packageName));
// If a job started with the foreground flag, it'll cause the UID to stay active
// and thus cause areJobsRestricted() to always return false, so if
// areJobsRestricted() returns false and the app is BG restricted and not TOP,
@@ -233,7 +343,8 @@ public final class BackgroundJobsController extends StateController {
&& isUserBgRestricted
&& mService.getUidProcState(uid)
> ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
- final boolean canRun = !shouldStopImmediately
+ // Don't let jobs (including proxied jobs) run if the app is in the stopped state.
+ final boolean canRun = !isStopped && !shouldStopImmediately
&& !mAppStateTracker.areJobsRestricted(
uid, packageName, jobStatus.canRunInBatterySaver());
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
index b74806494a60..d1f575ef40c8 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
@@ -1102,6 +1102,12 @@ public final class JobStatus {
return job.getService();
}
+ /** Return the package name of the app that scheduled the job. */
+ public String getCallingPackageName() {
+ return job.getService().getPackageName();
+ }
+
+ /** Return the package name of the app on whose behalf the job was scheduled. */
public String getSourcePackageName() {
return sourcePackageName;
}
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index dc39beae5cf4..378a18c175be 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -13040,6 +13040,7 @@ package android.service.voice {
method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_HOTWORD_DETECTION) public final android.service.voice.HotwordDetector createHotwordDetector(@Nullable android.os.PersistableBundle, @Nullable android.os.SharedMemory, @NonNull java.util.concurrent.Executor, @NonNull android.service.voice.HotwordDetector.Callback);
method @NonNull @RequiresPermission("android.permission.MANAGE_VOICE_KEYPHRASES") public final android.media.voice.KeyphraseModelManager createKeyphraseModelManager();
method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_HOTWORD_DETECTION) public final android.service.voice.VisualQueryDetector createVisualQueryDetector(@Nullable android.os.PersistableBundle, @Nullable android.os.SharedMemory, @NonNull java.util.concurrent.Executor, @NonNull android.service.voice.VisualQueryDetector.Callback);
+ method @FlaggedApi("android.service.voice.flags.allow_training_data_egress_from_hds") @RequiresPermission(android.Manifest.permission.MANAGE_HOTWORD_DETECTION) public void setIsReceiveSandboxedTrainingDataAllowed(boolean);
}
}
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index 71a05a909a09..98a78cfaa38c 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -1162,6 +1162,13 @@ package android.content.pm {
field public static final int SHOW_IN_LAUNCHER_WITH_PARENT = 0; // 0x0
}
+ public static final class UserProperties.Builder {
+ ctor public UserProperties.Builder();
+ method @NonNull public android.content.pm.UserProperties build();
+ method @NonNull public android.content.pm.UserProperties.Builder setShowInQuietMode(int);
+ method @NonNull public android.content.pm.UserProperties.Builder setShowInSharingSurfaces(int);
+ }
+
}
package android.content.res {
@@ -1597,6 +1604,10 @@ package android.hardware.display {
method public void restoreDozeSettings(int);
}
+ public final class ColorDisplayManager {
+ method @FlaggedApi("android.app.modes_api") @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public boolean isSaturationActivated();
+ }
+
public final class DisplayManager {
method public boolean areUserDisabledHdrTypesAllowed();
method @RequiresPermission(android.Manifest.permission.MODIFY_USER_PREFERRED_DISPLAY_MODE) public void clearGlobalUserPreferredDisplayMode();
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index 6aad1682466d..8b8576a0b25e 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -683,10 +683,11 @@ public class KeyguardManager {
* <p>
* Specifically, this returns {@code true} if at least one of the following is true:
* <ul>
- * <li>The {@link Context}'s user has a secure lock screen. A full user has a secure lock
- * screen if its lock screen is set to PIN, pattern, or password, as opposed to swipe or none.
- * A profile that uses a unified challenge is considered to have a secure lock screen if and
- * only if its parent user has a secure lock screen.</li>
+ * <li>The {@link Context}'s user has a secure lock screen. A full user or a profile that uses
+ * a separate challenge has a secure lock screen if its lock screen is set to PIN, pattern, or
+ * password, as opposed to swipe or none. A profile that uses a unified challenge is
+ * considered to have a secure lock screen if and only if its parent user has a secure lock
+ * screen.</li>
* <li>At least one SIM card is currently locked and requires a PIN.</li>
* </ul>
* <p>
@@ -733,8 +734,15 @@ public class KeyguardManager {
* <p>
* For a user that is not the current user but can be switched to (usually this means "another
* full user"), and that has a PIN, pattern, or password, the device is always considered
- * locked. For a profile with a unified challenge, the device is considered locked if and only
- * if the device is locked for the parent user.
+ * locked.
+ * <p>
+ * For a profile with a unified challenge, the device locked state is the same as that of the
+ * parent user.
+ * <p>
+ * For a profile with a separate challenge, the device becomes unlocked when the profile's PIN,
+ * pattern, password, or biometric is verified. It becomes locked when the parent user becomes
+ * locked, the screen turns off, the device reboots, the device policy controller locks the
+ * profile, or the timeout set by the device policy controller expires.
*
* @return {@code true} if the device is currently locked for the user
* @see #isKeyguardLocked()
@@ -770,9 +778,10 @@ public class KeyguardManager {
* Returns whether the user has a secure lock screen.
* <p>
* This returns {@code true} if the {@link Context}'s user has a secure lock screen. A full user
- * has a secure lock screen if its lock screen is set to PIN, pattern, or password, as opposed
- * to swipe or none. A profile that uses a unified challenge is considered to have a secure lock
- * screen if and only if its parent user has a secure lock screen.
+ * or a profile that uses a separate challenge has a secure lock screen if its lock screen is
+ * set to PIN, pattern, or password, as opposed to swipe or none. A profile that uses a unified
+ * challenge is considered to have a secure lock screen if and only if its parent user has a
+ * secure lock screen.
* <p>
* This method does not consider whether the lock screen is currently showing or not.
* <p>
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index c003540100ae..013bcddbb7f3 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -9209,12 +9209,6 @@ public class Notification implements Parcelable
* You can opt-out of this behavior by using {@link Notification.Builder#setColorized(boolean)}.
* <p>
*
- * <p>
- * Starting at {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM Android V} the
- * {@link Notification#FLAG_NO_CLEAR NO_CLEAR flag} will be set for valid MediaStyle
- * notifications.
- * <p>
- *
* To use this style with your Notification, feed it to
* {@link Notification.Builder#setStyle(android.app.Notification.Style)} like so:
* <pre class="prettyprint">
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index d660078a9ae7..820ff3e308e4 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -21,6 +21,8 @@ import static android.Manifest.permission.READ_WALLPAPER_INTERNAL;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.ParcelFileDescriptor.MODE_READ_ONLY;
+import static com.android.window.flags.Flags.multiCrop;
+
import android.annotation.FloatRange;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -857,8 +859,7 @@ public class WallpaperManager {
*/
public static boolean isMultiCropEnabled() {
if (sGlobals == null) {
- sIsMultiCropEnabled = SystemProperties.getBoolean(
- "persist.wm.debug.wallpaper_multi_crop", false);
+ sIsMultiCropEnabled = multiCrop();
}
if (sIsMultiCropEnabled == null) {
try {
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 5c6c49a18caa..23a5d4d20a2e 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -2805,7 +2805,7 @@ public class Intent implements Parcelable, Cloneable {
* and the package in the stopped state cannot self-start for any reason unless there's an
* explicit request to start a component in the package. The {@link #ACTION_PACKAGE_UNSTOPPED}
* broadcast is sent when such an explicit process start occurs and the package is taken
- * out of the stopped state.
+ * out of the stopped state. The data contains the name of the package.
* </p>
* <ul>
* <li> {@link #EXTRA_UID} containing the integer uid assigned to the package.
diff --git a/core/java/android/content/pm/UserProperties.java b/core/java/android/content/pm/UserProperties.java
index 445ca0c98416..56e8291f25e9 100644
--- a/core/java/android/content/pm/UserProperties.java
+++ b/core/java/android/content/pm/UserProperties.java
@@ -1076,6 +1076,8 @@ public final class UserProperties implements Parcelable {
* Intended for building default values (and so all properties are present in the built object).
* @hide
*/
+ @TestApi
+ @SuppressLint("UnflaggedApi") // b/306636213
public static final class Builder {
// UserProperties fields and their default values.
private @ShowInLauncher int mShowInLauncher = SHOW_IN_LAUNCHER_WITH_PARENT;
@@ -1099,54 +1101,82 @@ public final class UserProperties implements Parcelable {
private boolean mDeleteAppWithParent = false;
private boolean mAlwaysVisible = false;
+ /**
+ * @hide
+ */
+ @SuppressLint("UnflaggedApi") // b/306636213
+ @TestApi
+ public Builder() {}
+
+ /** @hide */
public Builder setShowInLauncher(@ShowInLauncher int showInLauncher) {
mShowInLauncher = showInLauncher;
return this;
}
+ /** @hide */
public Builder setStartWithParent(boolean startWithParent) {
mStartWithParent = startWithParent;
return this;
}
- /** Sets the value for {@link #mShowInSettings} */
+ /** Sets the value for {@link #mShowInSettings}
+ * @hide
+ */
public Builder setShowInSettings(@ShowInSettings int showInSettings) {
mShowInSettings = showInSettings;
return this;
}
- /** Sets the value for {@link #mShowInQuietMode} */
+ /** Sets the value for {@link #mShowInQuietMode}
+ * @hide
+ */
+ @TestApi
+ @SuppressLint("UnflaggedApi") // b/306636213
+ @NonNull
public Builder setShowInQuietMode(@ShowInQuietMode int showInQuietMode) {
mShowInQuietMode = showInQuietMode;
return this;
}
- /** Sets the value for {@link #mShowInSharingSurfaces}. */
+ /** Sets the value for {@link #mShowInSharingSurfaces}.
+ * @hide
+ */
+ @TestApi
+ @SuppressLint("UnflaggedApi") // b/306636213
+ @NonNull
public Builder setShowInSharingSurfaces(@ShowInSharingSurfaces int showInSharingSurfaces) {
mShowInSharingSurfaces = showInSharingSurfaces;
return this;
}
- /** Sets the value for {@link #mInheritDevicePolicy}*/
+ /** Sets the value for {@link #mInheritDevicePolicy}
+ * @hide
+ */
public Builder setInheritDevicePolicy(
@InheritDevicePolicy int inheritRestrictionsDevicePolicy) {
mInheritDevicePolicy = inheritRestrictionsDevicePolicy;
return this;
}
+ /** @hide */
public Builder setUseParentsContacts(boolean useParentsContacts) {
mUseParentsContacts = useParentsContacts;
return this;
}
- /** Sets the value for {@link #mUpdateCrossProfileIntentFiltersOnOTA} */
+ /** Sets the value for {@link #mUpdateCrossProfileIntentFiltersOnOTA}
+ * @hide
+ */
public Builder setUpdateCrossProfileIntentFiltersOnOTA(boolean
updateCrossProfileIntentFiltersOnOTA) {
mUpdateCrossProfileIntentFiltersOnOTA = updateCrossProfileIntentFiltersOnOTA;
return this;
}
- /** Sets the value for {@link #mCrossProfileIntentFilterAccessControl} */
+ /** Sets the value for {@link #mCrossProfileIntentFilterAccessControl}
+ * @hide
+ */
public Builder setCrossProfileIntentFilterAccessControl(
@CrossProfileIntentFilterAccessControlLevel int
crossProfileIntentFilterAccessControl) {
@@ -1154,24 +1184,30 @@ public final class UserProperties implements Parcelable {
return this;
}
- /** Sets the value for {@link #mCrossProfileIntentResolutionStrategy} */
+ /** Sets the value for {@link #mCrossProfileIntentResolutionStrategy}
+ * @hide
+ */
public Builder setCrossProfileIntentResolutionStrategy(@CrossProfileIntentResolutionStrategy
int crossProfileIntentResolutionStrategy) {
mCrossProfileIntentResolutionStrategy = crossProfileIntentResolutionStrategy;
return this;
}
+ /** @hide */
public Builder setMediaSharedWithParent(boolean mediaSharedWithParent) {
mMediaSharedWithParent = mediaSharedWithParent;
return this;
}
+ /** @hide */
public Builder setCredentialShareableWithParent(boolean credentialShareableWithParent) {
mCredentialShareableWithParent = credentialShareableWithParent;
return this;
}
- /** Sets the value for {@link #mAuthAlwaysRequiredToDisableQuietMode} */
+ /** Sets the value for {@link #mAuthAlwaysRequiredToDisableQuietMode}
+ * @hide
+ */
public Builder setAuthAlwaysRequiredToDisableQuietMode(
boolean authAlwaysRequiredToDisableQuietMode) {
mAuthAlwaysRequiredToDisableQuietMode =
@@ -1179,19 +1215,28 @@ public final class UserProperties implements Parcelable {
return this;
}
- /** Sets the value for {@link #mDeleteAppWithParent}*/
+ /** Sets the value for {@link #mDeleteAppWithParent}
+ * @hide
+ */
public Builder setDeleteAppWithParent(boolean deleteAppWithParent) {
mDeleteAppWithParent = deleteAppWithParent;
return this;
}
- /** Sets the value for {@link #mAlwaysVisible}*/
+ /** Sets the value for {@link #mAlwaysVisible}
+ * @hide
+ */
public Builder setAlwaysVisible(boolean alwaysVisible) {
mAlwaysVisible = alwaysVisible;
return this;
}
- /** Builds a UserProperties object with *all* values populated. */
+ /** Builds a UserProperties object with *all* values populated.
+ * @hide
+ */
+ @TestApi
+ @SuppressLint("UnflaggedApi") // b/306636213
+ @NonNull
public UserProperties build() {
return new UserProperties(
mShowInLauncher,
diff --git a/core/java/android/hardware/display/ColorDisplayManager.java b/core/java/android/hardware/display/ColorDisplayManager.java
index aafa7d520632..f927b8b52912 100644
--- a/core/java/android/hardware/display/ColorDisplayManager.java
+++ b/core/java/android/hardware/display/ColorDisplayManager.java
@@ -17,12 +17,14 @@
package android.hardware.display;
import android.Manifest;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.TestApi;
import android.content.ContentResolver;
import android.content.Context;
import android.metrics.LogMaker;
@@ -397,6 +399,8 @@ public final class ColorDisplayManager {
* @return {@code true} if the display is not at full saturation
* @hide
*/
+ @TestApi
+ @FlaggedApi(android.app.Flags.FLAG_MODES_API)
@RequiresPermission(Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS)
public boolean isSaturationActivated() {
return mManager.isSaturationActivated();
diff --git a/core/java/android/os/OWNERS b/core/java/android/os/OWNERS
index 655debc84d1d..209a59583944 100644
--- a/core/java/android/os/OWNERS
+++ b/core/java/android/os/OWNERS
@@ -90,4 +90,5 @@ per-file PerformanceHintManager.java = file:/ADPF_OWNERS
# IThermal interfaces
per-file IThermal* = file:/THERMAL_OWNERS
-
+per-file CoolingDevice.java = file:/THERMAL_OWNERS
+per-file Temperature.java = file:/THERMAL_OWNERS
diff --git a/core/java/android/security/FileIntegrityManager.java b/core/java/android/security/FileIntegrityManager.java
index dae3202b2043..025aac962fb9 100644
--- a/core/java/android/security/FileIntegrityManager.java
+++ b/core/java/android/security/FileIntegrityManager.java
@@ -53,10 +53,10 @@ public final class FileIntegrityManager {
* verification, although the app APIs are only made available to apps in a later SDK version.
* Only when this method returns true, the other fs-verity APIs in the same class can succeed.
*
- * <p>The app may not need this method and just call the other APIs (i.e. {@link
- * #setupFsVerity(File)} and {@link #getFsVerityDigest(File)}) normally and handle any failure.
- * If some app feature really depends on fs-verity (e.g. protecting integrity of a large file
- * download), an early check of support status may avoid any cost if it is to fail late.
+ * <p>The app may not need this method and just call the other APIs normally and handle any
+ * failure. If some app feature really depends on fs-verity (e.g. protecting integrity of a
+ * large file download), an early check of support status may avoid any cost if it is to fail
+ * late.
*
* <p>Note: for historical reasons this is named {@code isApkVeritySupported()} instead of
* {@code isFsVeritySupported()}. It has also been available since API level 30, predating the
diff --git a/core/java/android/service/notification/DeviceEffectsApplier.java b/core/java/android/service/notification/DeviceEffectsApplier.java
new file mode 100644
index 000000000000..234ff4dd0852
--- /dev/null
+++ b/core/java/android/service/notification/DeviceEffectsApplier.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.service.notification;
+
+/**
+ * Responsible for making any service calls needed to apply the set of {@link ZenDeviceEffects} that
+ * make sense for the current platform.
+ * @hide
+ */
+public interface DeviceEffectsApplier {
+ /**
+ * Applies the {@link ZenDeviceEffects} to the device.
+ *
+ * <p>The supplied {@code effects} represents the "consolidated" device effects, i.e. the
+ * union of the effects of all the {@link ZenModeConfig.ZenRule} instances that are currently
+ * active. If no rules are active (or no active rules specify custom effects) then {@code
+ * effects} will be all-default (i.e. {@link ZenDeviceEffects#hasEffects} will return {@code
+ * false}.
+ *
+ * <p>This will be called whenever the set of consolidated effects changes (normally through
+ * the activation or deactivation of zen rules).
+ */
+ void apply(ZenDeviceEffects effects);
+}
diff --git a/core/java/android/service/notification/ZenDeviceEffects.java b/core/java/android/service/notification/ZenDeviceEffects.java
index db0b7ffa0913..0e82b6c2c7d7 100644
--- a/core/java/android/service/notification/ZenDeviceEffects.java
+++ b/core/java/android/service/notification/ZenDeviceEffects.java
@@ -18,6 +18,7 @@ package android.service.notification;
import android.annotation.FlaggedApi;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.app.Flags;
import android.os.Parcel;
import android.os.Parcelable;
@@ -359,6 +360,27 @@ public final class ZenDeviceEffects implements Parcelable {
return this;
}
+ /**
+ * Applies the effects that are {@code true} on the supplied {@link ZenDeviceEffects} to
+ * this builder (essentially logically-ORing the effect set).
+ * @hide
+ */
+ @NonNull
+ public Builder add(@Nullable ZenDeviceEffects effects) {
+ if (effects == null) return this;
+ if (effects.shouldDisplayGrayscale()) setShouldDisplayGrayscale(true);
+ if (effects.shouldSuppressAmbientDisplay()) setShouldSuppressAmbientDisplay(true);
+ if (effects.shouldDimWallpaper()) setShouldDimWallpaper(true);
+ if (effects.shouldUseNightMode()) setShouldUseNightMode(true);
+ if (effects.shouldDisableAutoBrightness()) setShouldDisableAutoBrightness(true);
+ if (effects.shouldDisableTapToWake()) setShouldDisableTapToWake(true);
+ if (effects.shouldDisableTiltToWake()) setShouldDisableTiltToWake(true);
+ if (effects.shouldDisableTouch()) setShouldDisableTouch(true);
+ if (effects.shouldMinimizeRadioUsage()) setShouldMinimizeRadioUsage(true);
+ if (effects.shouldMaximizeDoze()) setShouldMaximizeDoze(true);
+ return this;
+ }
+
/** Builds a {@link ZenDeviceEffects} object based on the builder's state. */
@NonNull
public ZenDeviceEffects build() {
diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java
index c716cd2e4a9c..fba09233e4f4 100644
--- a/core/java/android/service/voice/VoiceInteractionService.java
+++ b/core/java/android/service/voice/VoiceInteractionService.java
@@ -1024,21 +1024,31 @@ public class VoiceInteractionService extends Service {
}
}
- /** Set sandboxed detection training data egress op.
+ /**
+ * Allow/disallow receiving training data from trusted process.
*
- * <p> This method can be called by a preinstalled assistant to allow/disallow training data
- * egress from trusted process.
+ * <p> This method can be called by a preinstalled assistant to receive/stop receiving
+ * training data via {@link HotwordDetector.Callback#onTrainingData(HotwordTrainingData)}.
+ * These training data events are produced during sandboxed detection (in trusted process).
*
- * @return whether was able to update sandboxed detection op successfully.
- * @throws SecurityException if assistant is not a preinstalled assistant.
+ * @param allowed whether to allow/disallow receiving training data produced during
+ * sandboxed detection (from trusted process).
+ * @throws SecurityException if caller is not a preinstalled assistant or if caller is not the
+ * active assistant.
*
* @hide
*/
+ //TODO(b/315053245): Add mitigations to make API no-op once user has modified setting.
+ @SystemApi
@FlaggedApi(Flags.FLAG_ALLOW_TRAINING_DATA_EGRESS_FROM_HDS)
- public boolean setSandboxedDetectionTrainingDataOp(int opMode) {
- Log.i(TAG, "Setting training data egress op-mode to " + opMode);
+ @RequiresPermission(Manifest.permission.MANAGE_HOTWORD_DETECTION)
+ public void setIsReceiveSandboxedTrainingDataAllowed(boolean allowed) {
+ Log.i(TAG, "setIsReceiveSandboxedTrainingDataAllowed to " + allowed);
+ if (mSystemService == null) {
+ throw new IllegalStateException("Not available until onReady() is called");
+ }
try {
- return mSystemService.setSandboxedDetectionTrainingDataOp(opMode);
+ mSystemService.setIsReceiveSandboxedTrainingDataAllowed(allowed);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/core/java/android/view/HdrRenderState.java b/core/java/android/view/HdrRenderState.java
new file mode 100644
index 000000000000..2fbbf48dff77
--- /dev/null
+++ b/core/java/android/view/HdrRenderState.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+import android.os.SystemClock;
+
+import com.android.graphics.hwui.flags.Flags;
+
+import java.util.function.Consumer;
+
+/** @hide */
+class HdrRenderState implements Consumer<Display> {
+ // Targeting an animation from 1x to 5x over 400ms means we need to increase by 0.01/ms
+ private static final float TRANSITION_PER_MS = 0.01f;
+
+ private static final boolean FLAG_ANIMATE_ENABLED = Flags.animateHdrTransitions();
+
+ private final ViewRootImpl mViewRoot;
+
+ private boolean mIsListenerRegistered = false;
+ private boolean mUpdateHdrSdrRatioInfo = false;
+ private float mDesiredHdrSdrRatio = 1f;
+ private float mTargetHdrSdrRatio = 1f;
+ private float mRenderHdrSdrRatio = 1f;
+ private float mPreviousRenderRatio = 1f;
+ private long mLastUpdateMillis = -1;
+
+ HdrRenderState(ViewRootImpl viewRoot) {
+ mViewRoot = viewRoot;
+ }
+
+ @Override
+ public void accept(Display display) {
+ forceUpdateHdrSdrRatio();
+ mViewRoot.invalidate();
+ }
+
+ boolean isHdrEnabled() {
+ return mDesiredHdrSdrRatio >= 1.01f;
+ }
+
+ void stopListening() {
+ if (mIsListenerRegistered) {
+ mViewRoot.mDisplay.unregisterHdrSdrRatioChangedListener(this);
+ mIsListenerRegistered = false;
+ }
+ }
+
+ void startListening() {
+ if (isHdrEnabled() && !mIsListenerRegistered && mViewRoot.mDisplay != null) {
+ mViewRoot.mDisplay.registerHdrSdrRatioChangedListener(mViewRoot.mExecutor, this);
+ }
+ }
+
+ /** @return true if something changed, else false */
+ boolean updateForFrame(long frameTimeMillis) {
+ boolean hasUpdate = mUpdateHdrSdrRatioInfo;
+ mUpdateHdrSdrRatioInfo = false;
+ mRenderHdrSdrRatio = mTargetHdrSdrRatio;
+ long timeDelta = Math.max(Math.min(32, frameTimeMillis - mLastUpdateMillis), 8);
+ final float maxStep = timeDelta * TRANSITION_PER_MS;
+ mLastUpdateMillis = frameTimeMillis;
+ if (hasUpdate && FLAG_ANIMATE_ENABLED) {
+ if (mTargetHdrSdrRatio == 1.0f) {
+ mPreviousRenderRatio = mTargetHdrSdrRatio;
+ } else {
+ float delta = mTargetHdrSdrRatio - mPreviousRenderRatio;
+ if (delta > maxStep) {
+ mRenderHdrSdrRatio = mPreviousRenderRatio + maxStep;
+ mUpdateHdrSdrRatioInfo = true;
+ mViewRoot.invalidate();
+ }
+ mPreviousRenderRatio = mRenderHdrSdrRatio;
+ }
+ }
+ return hasUpdate;
+ }
+
+ float getDesiredHdrSdrRatio() {
+ return mDesiredHdrSdrRatio;
+ }
+
+ float getRenderHdrSdrRatio() {
+ return mRenderHdrSdrRatio;
+ }
+
+ void forceUpdateHdrSdrRatio() {
+ mTargetHdrSdrRatio = Math.min(mDesiredHdrSdrRatio, mViewRoot.mDisplay.getHdrSdrRatio());
+ mUpdateHdrSdrRatioInfo = true;
+ }
+
+ void setDesiredHdrSdrRatio(float desiredRatio) {
+ mLastUpdateMillis = SystemClock.uptimeMillis();
+ // TODO: When decreasing the desired ratio we need to animate it downwards
+ if (desiredRatio != mDesiredHdrSdrRatio) {
+ mDesiredHdrSdrRatio = desiredRatio;
+ forceUpdateHdrSdrRatio();
+ mViewRoot.invalidate();
+
+ if (isHdrEnabled()) {
+ startListening();
+ } else {
+ stopListening();
+ }
+ }
+ }
+}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 870ec4bb6969..1530aa78d73d 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -735,10 +735,7 @@ public final class ViewRootImpl implements ViewParent,
private BLASTBufferQueue mBlastBufferQueue;
- private boolean mUpdateHdrSdrRatioInfo = false;
- private float mDesiredHdrSdrRatio = 1f;
- private float mRenderHdrSdrRatio = 1f;
- private Consumer<Display> mHdrSdrRatioChangedListener = null;
+ private final HdrRenderState mHdrRenderState = new HdrRenderState(this);
/**
* Child container layer of {@code mSurface} with the same bounds as its parent, and cropped to
@@ -1813,7 +1810,7 @@ public final class ViewRootImpl implements ViewParent,
mAttachInfo.mThreadedRenderer = renderer;
renderer.setSurfaceControl(mSurfaceControl, mBlastBufferQueue);
updateColorModeIfNeeded(attrs.getColorMode(), attrs.getDesiredHdrHeadroom());
- updateRenderHdrSdrRatio();
+ mHdrRenderState.forceUpdateHdrSdrRatio();
updateForceDarkMode();
mAttachInfo.mHardwareAccelerated = true;
mAttachInfo.mHardwareAccelerationRequested = true;
@@ -2156,9 +2153,7 @@ public final class ViewRootImpl implements ViewParent,
private void updateInternalDisplay(int displayId, Resources resources) {
final Display preferredDisplay =
ResourcesManager.getInstance().getAdjustedDisplay(displayId, resources);
- if (mHdrSdrRatioChangedListener != null && mDisplay != null) {
- mDisplay.unregisterHdrSdrRatioChangedListener(mHdrSdrRatioChangedListener);
- }
+ mHdrRenderState.stopListening();
if (preferredDisplay == null) {
// Fallback to use default display.
Slog.w(TAG, "Cannot get desired display with Id: " + displayId);
@@ -2167,9 +2162,7 @@ public final class ViewRootImpl implements ViewParent,
} else {
mDisplay = preferredDisplay;
}
- if (mHdrSdrRatioChangedListener != null && mDisplay != null) {
- mDisplay.registerHdrSdrRatioChangedListener(mExecutor, mHdrSdrRatioChangedListener);
- }
+ mHdrRenderState.startListening();
mContext.updateDisplay(mDisplay.getDisplayId());
}
@@ -5154,11 +5147,12 @@ public final class ViewRootImpl implements ViewParent,
useAsyncReport = true;
- if (mUpdateHdrSdrRatioInfo) {
- mUpdateHdrSdrRatioInfo = false;
+ if (mHdrRenderState.updateForFrame(mAttachInfo.mDrawingTime)) {
+ final float renderRatio = mHdrRenderState.getRenderHdrSdrRatio();
applyTransactionOnDraw(mTransaction.setExtendedRangeBrightness(
- getSurfaceControl(), mRenderHdrSdrRatio, mDesiredHdrSdrRatio));
- mAttachInfo.mThreadedRenderer.setTargetHdrSdrRatio(mRenderHdrSdrRatio);
+ getSurfaceControl(), renderRatio,
+ mHdrRenderState.getDesiredHdrSdrRatio()));
+ mAttachInfo.mThreadedRenderer.setTargetHdrSdrRatio(renderRatio);
}
if (activeSyncGroup != null) {
@@ -5769,11 +5763,6 @@ public final class ViewRootImpl implements ViewParent,
}
}
- private void updateRenderHdrSdrRatio() {
- mRenderHdrSdrRatio = Math.min(mDesiredHdrSdrRatio, mDisplay.getHdrSdrRatio());
- mUpdateHdrSdrRatioInfo = true;
- }
-
private void updateColorModeIfNeeded(@ActivityInfo.ColorMode int colorMode,
float desiredRatio) {
if (mAttachInfo.mThreadedRenderer == null) {
@@ -5793,22 +5782,8 @@ public final class ViewRootImpl implements ViewParent,
if (desiredRatio == 0 || desiredRatio > automaticRatio) {
desiredRatio = automaticRatio;
}
- if (desiredRatio != mDesiredHdrSdrRatio) {
- mDesiredHdrSdrRatio = desiredRatio;
- updateRenderHdrSdrRatio();
- invalidate();
- if (mDesiredHdrSdrRatio < 1.01f) {
- mDisplay.unregisterHdrSdrRatioChangedListener(mHdrSdrRatioChangedListener);
- mHdrSdrRatioChangedListener = null;
- } else {
- mHdrSdrRatioChangedListener = display -> {
- updateRenderHdrSdrRatio();
- invalidate();
- };
- mDisplay.registerHdrSdrRatioChangedListener(mExecutor, mHdrSdrRatioChangedListener);
- }
- }
+ mHdrRenderState.setDesiredHdrSdrRatio(desiredRatio);
}
@Override
@@ -6428,7 +6403,7 @@ public final class ViewRootImpl implements ViewParent,
}
final ViewRootHandler mHandler = new ViewRootHandler();
- private final Executor mExecutor = (Runnable r) -> {
+ final Executor mExecutor = (Runnable r) -> {
mHandler.post(r);
};
@@ -8764,7 +8739,7 @@ public final class ViewRootImpl implements ViewParent,
if (mAttachInfo.mThreadedRenderer != null) {
mAttachInfo.mThreadedRenderer.setSurfaceControl(mSurfaceControl, mBlastBufferQueue);
}
- updateRenderHdrSdrRatio();
+ mHdrRenderState.forceUpdateHdrSdrRatio();
if (mPreviousTransformHint != transformHint) {
mPreviousTransformHint = transformHint;
dispatchTransformHintChanged(transformHint);
@@ -9312,9 +9287,7 @@ public final class ViewRootImpl implements ViewParent,
private void destroyHardwareRenderer() {
ThreadedRenderer hardwareRenderer = mAttachInfo.mThreadedRenderer;
- if (mHdrSdrRatioChangedListener != null) {
- mDisplay.unregisterHdrSdrRatioChangedListener(mHdrSdrRatioChangedListener);
- }
+ mHdrRenderState.stopListening();
if (hardwareRenderer != null) {
if (mHardwareRendererObserver != null) {
diff --git a/core/java/android/view/accessibility/AccessibilityManager.java b/core/java/android/view/accessibility/AccessibilityManager.java
index 3dbe65ef4180..a38092a21178 100644
--- a/core/java/android/view/accessibility/AccessibilityManager.java
+++ b/core/java/android/view/accessibility/AccessibilityManager.java
@@ -185,16 +185,31 @@ public final class AccessibilityManager {
/**
* Annotations for the shortcut type.
+ * <p>Note: Keep in sync with {@link #SHORTCUT_TYPES}.</p>
* @hide
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef(value = {
+ // LINT.IfChange(shortcut_type_intdef)
ACCESSIBILITY_BUTTON,
ACCESSIBILITY_SHORTCUT_KEY
+ // LINT.ThenChange(:shortcut_type_array)
})
public @interface ShortcutType {}
/**
+ * Used for iterating through {@link ShortcutType}.
+ * <p>Note: Keep in sync with {@link ShortcutType}.</p>
+ * @hide
+ */
+ public static final int[] SHORTCUT_TYPES = {
+ // LINT.IfChange(shortcut_type_array)
+ ACCESSIBILITY_BUTTON,
+ ACCESSIBILITY_SHORTCUT_KEY,
+ // LINT.ThenChange(:shortcut_type_intdef)
+ };
+
+ /**
* Annotations for content flag of UI.
* @hide
*/
@@ -914,6 +929,28 @@ public final class AccessibilityManager {
}
/**
+ * Returns whether the user must be shown the AccessibilityService warning dialog
+ * before the AccessibilityService (or any shortcut for the service) can be enabled.
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.MANAGE_ACCESSIBILITY)
+ public boolean isAccessibilityServiceWarningRequired(@NonNull AccessibilityServiceInfo info) {
+ final IAccessibilityManager service;
+ synchronized (mLock) {
+ service = getServiceLocked();
+ if (service == null) {
+ return true;
+ }
+ }
+ try {
+ return service.isAccessibilityServiceWarningRequired(info);
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error while checking isAccessibilityServiceWarningRequired: ", re);
+ return true;
+ }
+ }
+
+ /**
* Registers an {@link AccessibilityStateChangeListener} for changes in
* the global accessibility state of the system. Equivalent to calling
* {@link #addAccessibilityStateChangeListener(AccessibilityStateChangeListener, Handler)}
diff --git a/core/java/android/view/accessibility/IAccessibilityManager.aidl b/core/java/android/view/accessibility/IAccessibilityManager.aidl
index f741080c57a8..9c04c27d189a 100644
--- a/core/java/android/view/accessibility/IAccessibilityManager.aidl
+++ b/core/java/android/view/accessibility/IAccessibilityManager.aidl
@@ -128,6 +128,9 @@ interface IAccessibilityManager {
boolean isAccessibilityTargetAllowed(String packageName, int uid, int userId);
boolean sendRestrictedDialogIntent(String packageName, int uid, int userId);
+ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.MANAGE_ACCESSIBILITY)")
+ boolean isAccessibilityServiceWarningRequired(in AccessibilityServiceInfo info);
+
parcelable WindowTransformationSpec {
float[] transformationMatrix;
MagnificationSpec magnificationSpec;
diff --git a/core/java/android/view/accessibility/flags/accessibility_flags.aconfig b/core/java/android/view/accessibility/flags/accessibility_flags.aconfig
index b29967888312..75ea08e5450b 100644
--- a/core/java/android/view/accessibility/flags/accessibility_flags.aconfig
+++ b/core/java/android/view/accessibility/flags/accessibility_flags.aconfig
@@ -17,17 +17,17 @@ flag {
}
flag {
+ name: "cleanup_accessibility_warning_dialog"
namespace: "accessibility"
- name: "collection_info_item_counts"
- description: "Fields for total items and the number of important for accessibility items in a collection"
- bug: "302376158"
+ description: "Cleans up duplicated or broken logic surrounding the accessibility warning dialog."
+ bug: "303511250"
}
flag {
- name: "deduplicate_accessibility_warning_dialog"
namespace: "accessibility"
- description: "Removes duplicate definition of the accessibility warning dialog."
- bug: "303511250"
+ name: "collection_info_item_counts"
+ description: "Fields for total items and the number of important for accessibility items in a collection"
+ bug: "302376158"
}
flag {
diff --git a/core/java/android/view/contentcapture/MainContentCaptureSession.java b/core/java/android/view/contentcapture/MainContentCaptureSession.java
index 14ec14bf7cfc..966161fd642a 100644
--- a/core/java/android/view/contentcapture/MainContentCaptureSession.java
+++ b/core/java/android/view/contentcapture/MainContentCaptureSession.java
@@ -31,6 +31,7 @@ import static android.view.contentcapture.ContentCaptureHelper.getSanitizedStrin
import static android.view.contentcapture.ContentCaptureHelper.sDebug;
import static android.view.contentcapture.ContentCaptureHelper.sVerbose;
import static android.view.contentcapture.ContentCaptureManager.RESULT_CODE_FALSE;
+import static android.view.contentcapture.flags.Flags.runOnBackgroundThreadEnabled;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -209,14 +210,14 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
binder = resultData.getBinder(EXTRA_BINDER);
if (binder == null) {
Log.wtf(TAG, "No " + EXTRA_BINDER + " extra result");
- mainSession.mHandler.post(() -> mainSession.resetSession(
+ mainSession.runOnContentCaptureThread(() -> mainSession.resetSession(
STATE_DISABLED | STATE_INTERNAL_ERROR));
return;
}
} else {
binder = null;
}
- mainSession.mHandler.post(() ->
+ mainSession.runOnContentCaptureThread(() ->
mainSession.onSessionStarted(resultCode, binder));
}
}
@@ -256,7 +257,13 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
*/
void start(@NonNull IBinder token, @NonNull IBinder shareableActivityToken,
@NonNull ComponentName component, int flags) {
- runOnContentCaptureThread(() -> startImpl(token, shareableActivityToken, component, flags));
+ if (runOnBackgroundThreadEnabled()) {
+ runOnContentCaptureThread(
+ () -> startImpl(token, shareableActivityToken, component, flags));
+ } else {
+ // Preserve the control arm behaviour.
+ startImpl(token, shareableActivityToken, component, flags);
+ }
}
private void startImpl(@NonNull IBinder token, @NonNull IBinder shareableActivityToken,
@@ -613,7 +620,12 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
@Override
public void flush(@FlushReason int reason) {
- runOnContentCaptureThread(() -> flushImpl(reason));
+ if (runOnBackgroundThreadEnabled()) {
+ runOnContentCaptureThread(() -> flushImpl(reason));
+ } else {
+ // Preserve the control arm behaviour.
+ flushImpl(reason);
+ }
}
private void flushImpl(@FlushReason int reason) {
@@ -904,7 +916,12 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
/** public because is also used by ViewRootImpl */
public void notifyContentCaptureEvents(
@NonNull SparseArray<ArrayList<Object>> contentCaptureEvents) {
- runOnContentCaptureThread(() -> notifyContentCaptureEventsImpl(contentCaptureEvents));
+ if (runOnBackgroundThreadEnabled()) {
+ runOnContentCaptureThread(() -> notifyContentCaptureEventsImpl(contentCaptureEvents));
+ } else {
+ // Preserve the control arm behaviour.
+ notifyContentCaptureEventsImpl(contentCaptureEvents);
+ }
}
private void notifyContentCaptureEventsImpl(
@@ -1076,19 +1093,30 @@ public final class MainContentCaptureSession extends ContentCaptureSession {
* </p>
*/
private void runOnContentCaptureThread(@NonNull Runnable r) {
- if (!mHandler.getLooper().isCurrentThread()) {
- mHandler.post(r);
+ if (runOnBackgroundThreadEnabled()) {
+ if (!mHandler.getLooper().isCurrentThread()) {
+ mHandler.post(r);
+ } else {
+ r.run();
+ }
} else {
- r.run();
+ // Preserve the control arm behaviour to always post to the handler.
+ mHandler.post(r);
}
}
private void clearAndRunOnContentCaptureThread(@NonNull Runnable r, int what) {
- if (!mHandler.getLooper().isCurrentThread()) {
+ if (runOnBackgroundThreadEnabled()) {
+ if (!mHandler.getLooper().isCurrentThread()) {
+ mHandler.removeMessages(what);
+ mHandler.post(r);
+ } else {
+ r.run();
+ }
+ } else {
+ // Preserve the control arm behaviour to always post to the handler.
mHandler.removeMessages(what);
mHandler.post(r);
- } else {
- r.run();
}
}
}
diff --git a/core/java/android/view/inputmethod/ImeTracker.java b/core/java/android/view/inputmethod/ImeTracker.java
index d4cfd63492fc..fab8c7796dfd 100644
--- a/core/java/android/view/inputmethod/ImeTracker.java
+++ b/core/java/android/view/inputmethod/ImeTracker.java
@@ -737,7 +737,7 @@ public interface ImeTracker {
*/
public void onCancelAnimation(@AnimationType int animType) {
final int cujType = getImeInsetsCujFromAnimation(animType);
- if (cujType == -1) {
+ if (cujType != -1) {
InteractionJankMonitor.getInstance().cancel(cujType);
}
}
diff --git a/core/java/android/window/flags/wallpaper_manager.aconfig b/core/java/android/window/flags/wallpaper_manager.aconfig
index 09be0cfc5fb0..f03c993a9c66 100644
--- a/core/java/android/window/flags/wallpaper_manager.aconfig
+++ b/core/java/android/window/flags/wallpaper_manager.aconfig
@@ -5,4 +5,11 @@ flag {
namespace: "wear_frameworks"
description: "Allow out of focus process to update wallpaper complications"
bug: "271132915"
-} \ No newline at end of file
+}
+
+flag {
+ name: "multi_crop"
+ namespace: "systemui"
+ description: "Support storing different wallpaper crops for different display dimensions. Only effective after rebooting."
+ bug: "281648899"
+}
diff --git a/core/java/com/android/internal/accessibility/dialog/AccessibilityShortcutChooserActivity.java b/core/java/com/android/internal/accessibility/dialog/AccessibilityShortcutChooserActivity.java
index d4eccd458e35..7d06e3f5a7bc 100644
--- a/core/java/com/android/internal/accessibility/dialog/AccessibilityShortcutChooserActivity.java
+++ b/core/java/com/android/internal/accessibility/dialog/AccessibilityShortcutChooserActivity.java
@@ -37,6 +37,7 @@ import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
+import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.Flags;
import android.widget.AdapterView;
@@ -114,18 +115,39 @@ public class AccessibilityShortcutChooserActivity extends Activity {
private void onTargetChecked(AdapterView<?> parent, View view, int position, long id) {
final AccessibilityTarget target = mTargets.get(position);
- if (!target.isShortcutEnabled()) {
- if (target instanceof AccessibilityServiceTarget
- || target instanceof AccessibilityActivityTarget) {
+ if (Flags.cleanupAccessibilityWarningDialog()) {
+ if (target instanceof AccessibilityServiceTarget serviceTarget) {
if (sendRestrictedDialogIntentIfNeeded(target)) {
return;
}
+ final AccessibilityManager am = getSystemService(AccessibilityManager.class);
+ if (am.isAccessibilityServiceWarningRequired(
+ serviceTarget.getAccessibilityServiceInfo())) {
+ showPermissionDialogIfNeeded(this, (AccessibilityServiceTarget) target,
+ position, mTargetAdapter);
+ return;
+ }
+ }
+ if (target instanceof AccessibilityActivityTarget activityTarget) {
+ if (!activityTarget.isShortcutEnabled()
+ && sendRestrictedDialogIntentIfNeeded(activityTarget)) {
+ return;
+ }
}
+ } else {
+ if (!target.isShortcutEnabled()) {
+ if (target instanceof AccessibilityServiceTarget
+ || target instanceof AccessibilityActivityTarget) {
+ if (sendRestrictedDialogIntentIfNeeded(target)) {
+ return;
+ }
+ }
- if (target instanceof AccessibilityServiceTarget) {
- showPermissionDialogIfNeeded(this, (AccessibilityServiceTarget) target,
- position, mTargetAdapter);
- return;
+ if (target instanceof AccessibilityServiceTarget) {
+ showPermissionDialogIfNeeded(this, (AccessibilityServiceTarget) target,
+ position, mTargetAdapter);
+ return;
+ }
}
}
@@ -156,7 +178,7 @@ public class AccessibilityShortcutChooserActivity extends Activity {
return;
}
- if (Flags.deduplicateAccessibilityWarningDialog()) {
+ if (Flags.cleanupAccessibilityWarningDialog()) {
mPermissionDialog = AccessibilityServiceWarning
.createAccessibilityServiceWarningDialog(context,
serviceTarget.getAccessibilityServiceInfo(),
diff --git a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
index ea4fc3910d89..82ee8fc47571 100644
--- a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
+++ b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl
@@ -390,12 +390,12 @@ interface IVoiceInteractionManagerService {
int type);
/**
- * Sets the sandboxed detection training data egress op to provided op-mode.
+ * Allows/disallows receiving training data from trusted process.
* Caller must be the active assistant and a preinstalled assistant.
*
- * @param opMode app-op mode to set training data egress op to.
- *
- * @return whether was able to successfully set training data egress op.
+ * @param allowed whether to allow/disallow receiving training data produced during
+ * sandboxed detection (from trusted process).
*/
- boolean setSandboxedDetectionTrainingDataOp(int opMode);
+ @EnforcePermission("MANAGE_HOTWORD_DETECTION")
+ void setIsReceiveSandboxedTrainingDataAllowed(boolean allowed);
}
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index ba1f3924bff3..1229453e5736 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -693,6 +693,16 @@
-->
</integer-array>
+ <!-- The device states (supplied by DeviceStateManager) that should be treated as concurrent
+ display state. Default is empty. -->
+ <integer-array name="config_concurrentDisplayDeviceStates">
+ <!-- Example:
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ -->
+ </integer-array>
+
<!-- Indicates whether the window manager reacts to half-fold device states by overriding
rotation. -->
<bool name="config_windowManagerHalfFoldAutoRotateOverride">false</bool>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 7787c5d394e4..93aacdff57df 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -4142,6 +4142,7 @@
<java-symbol type="array" name="config_foldedDeviceStates" />
<java-symbol type="array" name="config_halfFoldedDeviceStates" />
<java-symbol type="array" name="config_rearDisplayDeviceStates" />
+ <java-symbol type="array" name="config_concurrentDisplayDeviceStates" />
<java-symbol type="bool" name="config_windowManagerHalfFoldAutoRotateOverride" />
<java-symbol type="bool" name="config_windowManagerPauseRotationWhenUnfolding" />
<java-symbol type="integer" name="config_pauseRotationWhenUnfolding_hingeEventTimeout" />
diff --git a/core/tests/coretests/src/com/android/internal/accessibility/AccessibilityShortcutChooserActivityTest.java b/core/tests/coretests/src/com/android/internal/accessibility/AccessibilityShortcutChooserActivityTest.java
index 088b57feb200..6374e5df3307 100644
--- a/core/tests/coretests/src/com/android/internal/accessibility/AccessibilityShortcutChooserActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/accessibility/AccessibilityShortcutChooserActivityTest.java
@@ -18,7 +18,6 @@ package com.android.internal.accessibility;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
-import static androidx.test.espresso.action.ViewActions.doubleClick;
import static androidx.test.espresso.action.ViewActions.scrollTo;
import static androidx.test.espresso.action.ViewActions.swipeUp;
import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
@@ -85,10 +84,13 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
+import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
+import org.mockito.stubbing.Answer;
import java.util.Collections;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* Tests for {@link AccessibilityShortcutChooserActivity}.
@@ -151,6 +153,8 @@ public class AccessibilityShortcutChooserActivityTest {
when(mAccessibilityManagerService.getInstalledAccessibilityServiceList(
anyInt())).thenReturn(new ParceledListSlice<>(
Collections.singletonList(mAccessibilityServiceInfo)));
+ when(mAccessibilityManagerService.isAccessibilityServiceWarningRequired(any()))
+ .thenReturn(true);
when(mAccessibilityManagerService.isAccessibilityTargetAllowed(
anyString(), anyInt(), anyInt())).thenReturn(true);
when(mKeyguardManager.isKeyguardLocked()).thenReturn(false);
@@ -169,7 +173,7 @@ public class AccessibilityShortcutChooserActivityTest {
}
@Test
- @RequiresFlagsDisabled(Flags.FLAG_DEDUPLICATE_ACCESSIBILITY_WARNING_DIALOG)
+ @RequiresFlagsDisabled(Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
public void selectTestService_oldPermissionDialog_deny_dialogIsHidden() {
launchActivity();
openShortcutsList();
@@ -183,7 +187,7 @@ public class AccessibilityShortcutChooserActivityTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_DEDUPLICATE_ACCESSIBILITY_WARNING_DIALOG)
+ @RequiresFlagsEnabled(Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
public void selectTestService_permissionDialog_allow_rowChecked() {
launchActivity();
openShortcutsList();
@@ -197,7 +201,7 @@ public class AccessibilityShortcutChooserActivityTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_DEDUPLICATE_ACCESSIBILITY_WARNING_DIALOG)
+ @RequiresFlagsEnabled(Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
public void selectTestService_permissionDialog_deny_rowNotChecked() {
launchActivity();
openShortcutsList();
@@ -211,7 +215,7 @@ public class AccessibilityShortcutChooserActivityTest {
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_DEDUPLICATE_ACCESSIBILITY_WARNING_DIALOG)
+ @RequiresFlagsEnabled(Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
public void selectTestService_permissionDialog_uninstall_callsUninstaller_rowRemoved() {
launchActivity();
openShortcutsList();
@@ -227,6 +231,59 @@ public class AccessibilityShortcutChooserActivityTest {
}
@Test
+ @RequiresFlagsEnabled(Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
+ public void selectTestService_permissionDialog_notShownWhenNotRequired() throws Exception {
+ when(mAccessibilityManagerService.isAccessibilityServiceWarningRequired(any()))
+ .thenReturn(false);
+ launchActivity();
+ openShortcutsList();
+
+ // Clicking the test service should not show a permission dialog window,
+ assertThat(mDevice.findObject(By.text(TEST_LABEL)).clickAndWait(
+ Until.newWindow(), UI_TIMEOUT_MS)).isFalse();
+ // and should become checked.
+ assertThat(mDevice.findObject(By.checked(true))).isNotNull();
+ }
+
+ @Test
+ @RequiresFlagsEnabled(Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
+ public void selectTestService_notPermittedByAdmin_blockedEvenIfNoWarningRequired()
+ throws Exception {
+ when(mAccessibilityManagerService.isAccessibilityServiceWarningRequired(any()))
+ .thenReturn(false);
+ when(mAccessibilityManagerService.isAccessibilityTargetAllowed(
+ eq(TEST_COMPONENT_NAME.getPackageName()), anyInt(), anyInt())).thenReturn(false);
+ // This test class mocks AccessibilityManagerService, so the restricted dialog window
+ // will not actually appear and therefore cannot be used for a wait Until.newWindow().
+ // To still allow smart waiting in this test we can instead set up the mocked method
+ // to update an atomic boolean and wait for that to be set.
+ final Object waitObject = new Object();
+ final AtomicBoolean calledSendRestrictedDialogIntent = new AtomicBoolean(false);
+ Mockito.doAnswer((Answer<Void>) invocation -> {
+ synchronized (waitObject) {
+ calledSendRestrictedDialogIntent.set(true);
+ waitObject.notify();
+ }
+ return null;
+ }).when(mAccessibilityManagerService).sendRestrictedDialogIntent(
+ eq(TEST_COMPONENT_NAME.getPackageName()), anyInt(), anyInt());
+ launchActivity();
+ openShortcutsList();
+
+ mDevice.findObject(By.text(TEST_LABEL)).click();
+ final long timeout = System.currentTimeMillis() + UI_TIMEOUT_MS;
+ synchronized (waitObject) {
+ while (!calledSendRestrictedDialogIntent.get() &&
+ (System.currentTimeMillis() < timeout)) {
+ waitObject.wait(timeout - System.currentTimeMillis());
+ }
+ }
+
+ assertThat(calledSendRestrictedDialogIntent.get()).isTrue();
+ assertThat(mDevice.findObject(By.checked(true))).isNull();
+ }
+
+ @Test
public void clickServiceTarget_notPermittedByAdmin_sendRestrictedDialogIntent()
throws Exception {
when(mAccessibilityManagerService.isAccessibilityTargetAllowed(
@@ -329,7 +386,7 @@ public class AccessibilityShortcutChooserActivityTest {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if (Flags.deduplicateAccessibilityWarningDialog()) {
+ if (Flags.cleanupAccessibilityWarningDialog()) {
// Setting the Theme is necessary here for the dialog to use the proper style
// resources as designated in its layout XML.
setTheme(R.style.Theme_DeviceDefault_DayNight);
diff --git a/core/tests/coretests/src/com/android/internal/accessibility/dialog/AccessibilityServiceWarningTest.java b/core/tests/coretests/src/com/android/internal/accessibility/dialog/AccessibilityServiceWarningTest.java
index b76dd51d3f2b..24aab6192c50 100644
--- a/core/tests/coretests/src/com/android/internal/accessibility/dialog/AccessibilityServiceWarningTest.java
+++ b/core/tests/coretests/src/com/android/internal/accessibility/dialog/AccessibilityServiceWarningTest.java
@@ -58,7 +58,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
@RunWith(AndroidTestingRunner.class)
@TestableLooper.RunWithLooper
@RequiresFlagsEnabled(
- android.view.accessibility.Flags.FLAG_DEDUPLICATE_ACCESSIBILITY_WARNING_DIALOG)
+ android.view.accessibility.Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
public class AccessibilityServiceWarningTest {
private static final String A11Y_SERVICE_PACKAGE_LABEL = "TestA11yService";
private static final String A11Y_SERVICE_SUMMARY = "TestA11yService summary";
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index 3cf28c919f07..69a6e6d998a4 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -535,6 +535,8 @@ applications that come with the platform
<!-- Permission required for CTS test IntentRedirectionTest -->
<permission name="android.permission.QUERY_CLONED_APPS"/>
<permission name="android.permission.GET_BINDING_UID_IMPORTANCE"/>
+ <!-- Permission required for CTS test NotificationManagerZenTest -->
+ <permission name="android.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS" />
</privapp-permissions>
<privapp-permissions package="com.android.statementservice">
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java
index e74e578dc213..249f52bd6156 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java
@@ -1280,7 +1280,14 @@ public class BubbleController implements ConfigurationChangeListener,
* Dismiss bubble if it exists and remove it from the stack
*/
public void dismissBubble(Bubble bubble, @Bubbles.DismissReason int reason) {
- mBubbleData.dismissBubbleWithKey(bubble.getKey(), reason);
+ dismissBubble(bubble.getKey(), reason);
+ }
+
+ /**
+ * Dismiss bubble with given key if it exists and remove it from the stack
+ */
+ public void dismissBubble(String key, @Bubbles.DismissReason int reason) {
+ mBubbleData.dismissBubbleWithKey(key, reason);
}
/**
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
index 65db69ad1904..b7f749e8a8b6 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java
@@ -2462,6 +2462,7 @@ public class BubbleStackView extends FrameLayout
final Runnable collapseBackToStack = () ->
mExpandedAnimationController.collapseBackToStack(
mStackAnimationController.getStackPositionAlongNearestHorizontalEdge(),
+ /* fadeBubblesDuringCollapse= */ mRemovingLastBubbleWhileExpanded,
() -> {
mBubbleContainer.setActiveController(mStackAnimationController);
updateOverflowVisibility();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationController.java
index 79f306ece283..5b0239f6d659 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationController.java
@@ -107,6 +107,7 @@ public class ExpandedAnimationController
private Runnable mAfterExpand;
private Runnable mAfterCollapse;
private PointF mCollapsePoint;
+ private boolean mFadeBubblesDuringCollapse = false;
/**
* Whether the dragged out bubble is springing towards the touch point, rather than using the
@@ -201,12 +202,14 @@ public class ExpandedAnimationController
}
/** Animate collapsing the bubbles back to their stacked position. */
- public void collapseBackToStack(PointF collapsePoint, Runnable after) {
+ public void collapseBackToStack(PointF collapsePoint, boolean fadeBubblesDuringCollapse,
+ Runnable after) {
mAnimatingExpand = false;
mPreparingToCollapse = false;
mAnimatingCollapse = true;
mAfterCollapse = after;
mCollapsePoint = collapsePoint;
+ mFadeBubblesDuringCollapse = fadeBubblesDuringCollapse;
startOrUpdatePathAnimation(false /* expanding */);
}
@@ -253,6 +256,7 @@ public class ExpandedAnimationController
}
mAfterCollapse = null;
+ mFadeBubblesDuringCollapse = false;
};
}
@@ -262,7 +266,7 @@ public class ExpandedAnimationController
== LAYOUT_DIRECTION_RTL;
// Animate each bubble individually, since each path will end in a different spot.
- animationsForChildrenFromIndex(0, (index, animation) -> {
+ animationsForChildrenFromIndex(0, mFadeBubblesDuringCollapse, (index, animation) -> {
final View bubble = mLayout.getChildAt(index);
// Start a path at the bubble's current position.
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java
index f3cc514d2972..ed00da848a14 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/animation/PhysicsAnimationLayout.java
@@ -204,6 +204,13 @@ public class PhysicsAnimationLayout extends FrameLayout {
return animationForChild(mLayout.getChildAt(index));
}
+
+ protected MultiAnimationStarter animationsForChildrenFromIndex(
+ int startIndex, ChildAnimationConfigurator configurator) {
+ return animationsForChildrenFromIndex(startIndex, /* fadeChildren= */ false,
+ configurator);
+ }
+
/**
* Returns a {@link MultiAnimationStarter} whose startAll method will start the physics
* animations for all children from startIndex onward. The provided configurator will be
@@ -211,14 +218,16 @@ public class PhysicsAnimationLayout extends FrameLayout {
* animation appropriately.
*/
protected MultiAnimationStarter animationsForChildrenFromIndex(
- int startIndex, ChildAnimationConfigurator configurator) {
+ int startIndex, boolean fadeChildren, ChildAnimationConfigurator configurator) {
final Set<DynamicAnimation.ViewProperty> allAnimatedProperties = new HashSet<>();
final List<PhysicsPropertyAnimator> allChildAnims = new ArrayList<>();
// Retrieve the animator for each child, ask the configurator to configure it, then save
// it and the properties it chose to animate.
for (int i = startIndex; i < mLayout.getChildCount(); i++) {
- final PhysicsPropertyAnimator anim = animationForChildAtIndex(i);
+ final PhysicsPropertyAnimator anim = fadeChildren
+ ? animationForChildAtIndex(i).alpha(0)
+ : animationForChildAtIndex(i);
configurator.configureAnimationForChildAtIndex(i, anim);
allAnimatedProperties.addAll(anim.getAnimatedProperties());
allChildAnims.add(anim);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java
index 50e1f7311ce0..d073f1df938a 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedView.java
@@ -67,7 +67,6 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView
private boolean mIsOverflow;
private BubbleTaskViewHelper mBubbleTaskViewHelper;
private BubbleBarMenuViewController mMenuViewController;
- private BubbleBarExpandedViewDragController mDragController;
private @Nullable Supplier<Rect> mLayerBoundsSupplier;
private @Nullable Listener mListener;
@@ -181,8 +180,6 @@ public class BubbleBarExpandedView extends FrameLayout implements BubbleTaskView
mHandleView.setOnClickListener(view -> {
mMenuViewController.showMenu(true /* animated */);
});
-
- mDragController = new BubbleBarExpandedViewDragController(this);
}
public BubbleBarHandleView getHandleView() {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewDragController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewDragController.kt
index 933794be071e..4ea18f78f5b2 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewDragController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarExpandedViewDragController.kt
@@ -19,29 +19,47 @@ package com.android.wm.shell.bubbles.bar
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.graphics.PointF
+import android.graphics.Rect
import android.view.MotionEvent
import android.view.View
import com.android.wm.shell.animation.Interpolators
+import com.android.wm.shell.common.bubbles.DismissView
import com.android.wm.shell.common.bubbles.RelativeTouchListener
/** Controller for handling drag interactions with [BubbleBarExpandedView] */
-class BubbleBarExpandedViewDragController(private val expandedView: BubbleBarExpandedView) {
+class BubbleBarExpandedViewDragController(
+ private val expandedView: BubbleBarExpandedView,
+ private val dismissView: DismissView,
+ private val onDismissed: () -> Unit
+) {
init {
expandedView.handleView.setOnTouchListener(HandleDragListener())
}
+ private fun finishDrag(x: Float, y: Float, viewInitialX: Float, viewInitialY: Float) {
+ val dismissCircleBounds = Rect().apply { dismissView.circle.getBoundsOnScreen(this) }
+ if (dismissCircleBounds.contains(x.toInt(), y.toInt())) {
+ onDismissed()
+ } else {
+ resetExpandedViewPosition(viewInitialX, viewInitialY)
+ }
+ dismissView.hide()
+ }
+
private fun resetExpandedViewPosition(initialX: Float, initialY: Float) {
- val listener = object : AnimatorListenerAdapter() {
- override fun onAnimationStart(animation: Animator) {
- expandedView.isAnimating = true
- }
+ val listener =
+ object : AnimatorListenerAdapter() {
+ override fun onAnimationStart(animation: Animator) {
+ expandedView.isAnimating = true
+ }
- override fun onAnimationEnd(animation: Animator) {
- expandedView.isAnimating = false
+ override fun onAnimationEnd(animation: Animator) {
+ expandedView.isAnimating = false
+ }
}
- }
- expandedView.animate()
+ expandedView
+ .animate()
.translationX(initialX)
.translationY(initialY)
.setDuration(RESET_POSITION_ANIM_DURATION)
@@ -74,6 +92,7 @@ class BubbleBarExpandedViewDragController(private val expandedView: BubbleBarExp
) {
expandedView.translationX = expandedViewRestPosition.x + dx
expandedView.translationY = expandedViewRestPosition.y + dy
+ dismissView.show()
}
override fun onUp(
@@ -86,11 +105,12 @@ class BubbleBarExpandedViewDragController(private val expandedView: BubbleBarExp
velX: Float,
velY: Float
) {
- resetExpandedViewPosition(expandedViewRestPosition.x, expandedViewRestPosition.y)
+ finishDrag(ev.rawX, ev.rawY, expandedViewRestPosition.x, expandedViewRestPosition.y)
}
override fun onCancel(v: View, ev: MotionEvent, viewInitialX: Float, viewInitialY: Float) {
resetExpandedViewPosition(expandedViewRestPosition.x, expandedViewRestPosition.y)
+ dismissView.hide()
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java
index 92cb436528cc..bdb0e206e490 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/bar/BubbleBarLayerView.java
@@ -31,17 +31,21 @@ import android.view.ViewTreeObserver;
import android.view.WindowManager;
import android.widget.FrameLayout;
+import com.android.wm.shell.R;
import com.android.wm.shell.bubbles.BubbleController;
import com.android.wm.shell.bubbles.BubbleOverflow;
import com.android.wm.shell.bubbles.BubblePositioner;
import com.android.wm.shell.bubbles.BubbleViewProvider;
+import com.android.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.bubbles.DeviceConfig;
+import com.android.wm.shell.bubbles.DismissViewUtils;
+import com.android.wm.shell.common.bubbles.DismissView;
+
+import kotlin.Unit;
import java.util.Objects;
import java.util.function.Consumer;
-import kotlin.Unit;
-
/**
* Similar to {@link com.android.wm.shell.bubbles.BubbleStackView}, this view is added to window
* manager to display bubbles. However, it is only used when bubbles are being displayed in
@@ -63,7 +67,11 @@ public class BubbleBarLayerView extends FrameLayout
@Nullable
private BubbleViewProvider mExpandedBubble;
+ @Nullable
private BubbleBarExpandedView mExpandedView;
+ @Nullable
+ private BubbleBarExpandedViewDragController mDragController;
+ private DismissView mDismissView;
private @Nullable Consumer<String> mUnBubbleConversationCallback;
// TODO(b/273310265) - currently the view is always on the right, need to update for RTL.
@@ -101,6 +109,8 @@ public class BubbleBarLayerView extends FrameLayout
mScrimView.setBackgroundDrawable(new ColorDrawable(
getResources().getColor(android.R.color.system_neutral1_1000)));
+ setUpDismissView();
+
setOnClickListener(view -> hideMenuOrCollapse());
}
@@ -196,6 +206,13 @@ public class BubbleBarLayerView extends FrameLayout
}
});
+ mDragController = new BubbleBarExpandedViewDragController(mExpandedView, mDismissView,
+ () -> {
+ mBubbleController.dismissBubble(mExpandedBubble.getKey(),
+ Bubbles.DISMISS_USER_GESTURE);
+ return Unit.INSTANCE;
+ });
+
addView(mExpandedView, new FrameLayout.LayoutParams(width, height));
}
@@ -227,6 +244,7 @@ public class BubbleBarLayerView extends FrameLayout
mAnimationHelper.animateCollapse(() -> removeView(viewToRemove));
mBubbleController.getSysuiProxy().onStackExpandChanged(false);
mExpandedView = null;
+ mDragController = null;
setTouchDelegate(null);
showScrim(false);
}
@@ -252,6 +270,18 @@ public class BubbleBarLayerView extends FrameLayout
mUnBubbleConversationCallback = unBubbleConversationCallback;
}
+ private void setUpDismissView() {
+ if (mDismissView != null) {
+ removeView(mDismissView);
+ }
+ mDismissView = new DismissView(getContext());
+ DismissViewUtils.setup(mDismissView);
+ int elevation = getResources().getDimensionPixelSize(R.dimen.bubble_elevation);
+
+ addView(mDismissView);
+ mDismissView.setElevation(elevation);
+ }
+
/** Hides the current modal education/menu view, expanded view or collapses the bubble stack */
private void hideMenuOrCollapse() {
if (mEducationViewController.isEducationVisible()) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java
index d5fab441cd46..fe4980a9eb16 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java
@@ -554,6 +554,11 @@ public class PipTransition extends PipTransitionController {
}
}
}
+ // if overlay is present remove it immediately, as exit transition came before it faded out
+ if (mPipOrganizer.mSwipePipToHomeOverlay != null) {
+ startTransaction.remove(mPipOrganizer.mSwipePipToHomeOverlay);
+ clearSwipePipToHomeOverlay();
+ }
if (pipChange == null) {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
"%s: No window of exiting PIP is found. Can't play expand animation", TAG);
@@ -1007,7 +1012,6 @@ public class PipTransition extends PipTransitionController {
// the overlay to the final PIP task.
startTransaction.reparent(swipePipToHomeOverlay, leash)
.setLayer(swipePipToHomeOverlay, Integer.MAX_VALUE);
- mPipOrganizer.mSwipePipToHomeOverlay = null;
}
final Rect sourceBounds = pipTaskInfo.configuration.windowConfiguration.getBounds();
@@ -1029,7 +1033,7 @@ public class PipTransition extends PipTransitionController {
sendOnPipTransitionFinished(TRANSITION_DIRECTION_TO_PIP);
if (swipePipToHomeOverlay != null) {
mPipOrganizer.fadeOutAndRemoveOverlay(swipePipToHomeOverlay,
- null /* callback */, false /* withStartDelay */);
+ this::clearSwipePipToHomeOverlay /* callback */, false /* withStartDelay */);
}
mPipTransitionState.setInSwipePipToHomeTransition(false);
}
@@ -1173,6 +1177,10 @@ public class PipTransition extends PipTransitionController {
mPipMenuController.updateMenuBounds(destinationBounds);
}
+ private void clearSwipePipToHomeOverlay() {
+ mPipOrganizer.mSwipePipToHomeOverlay = null;
+ }
+
@Override
public void dump(PrintWriter pw, String prefix) {
final String innerPrefix = prefix + " ";
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt
index d7b306c3be23..03170a326890 100644
--- a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromAllApps.kt
@@ -57,10 +57,13 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)
+
+ tapl.enableBlockTimeout(true)
}
@Test
open fun enterSplitScreenByDragFromAllApps() {
+ tapl.showTaskbarIfHidden()
tapl.launchedAppState.taskbar
.openAllApps()
.getAppIcon(secondaryApp.appName)
@@ -72,5 +75,6 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
fun teardown() {
primaryApp.exit(wmHelper)
secondaryApp.exit(wmHelper)
+ tapl.enableBlockTimeout(false)
}
}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt
index 8134fddd40e5..479d01ddaeb9 100644
--- a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromShortcut.kt
@@ -59,10 +59,13 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)
+
+ tapl.enableBlockTimeout(true)
}
@Test
open fun enterSplitScreenByDragFromShortcut() {
+ tapl.showTaskbarIfHidden()
tapl.launchedAppState.taskbar
.getAppIcon(secondaryApp.appName)
.openDeepShortcutMenu()
@@ -83,6 +86,7 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
fun teardwon() {
primaryApp.exit(wmHelper)
secondaryApp.exit(wmHelper)
+ tapl.enableBlockTimeout(false)
}
companion object {
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromTaskbar.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromTaskbar.kt
index 3417744f13a5..625c56bc4a4c 100644
--- a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromTaskbar.kt
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/EnterSplitScreenByDragFromTaskbar.kt
@@ -54,6 +54,8 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)
+ tapl.enableBlockTimeout(true)
+
tapl.goHome()
SplitScreenUtils.createShortcutOnHotseatIfNotExist(tapl, secondaryApp.appName)
primaryApp.launchViaIntent(wmHelper)
@@ -61,6 +63,7 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
@Test
open fun enterSplitScreenByDragFromTaskbar() {
+ tapl.showTaskbarIfHidden()
tapl.launchedAppState.taskbar
.getAppIcon(secondaryApp.appName)
.dragToSplitscreen(secondaryApp.packageName, primaryApp.packageName)
@@ -71,6 +74,7 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
fun teardown() {
primaryApp.exit(wmHelper)
secondaryApp.exit(wmHelper)
+ tapl.enableBlockTimeout(false)
}
companion object {
diff --git a/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromAllAppsBenchmark.kt b/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromAllAppsBenchmark.kt
index 394864ad9d4d..5c43cbdb3832 100644
--- a/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromAllAppsBenchmark.kt
+++ b/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromAllAppsBenchmark.kt
@@ -23,6 +23,7 @@ import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.flicker.utils.SplitScreenUtils
+import org.junit.After
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
@@ -42,8 +43,10 @@ abstract class EnterSplitScreenByDragFromAllAppsBenchmark(override val flicker:
setup {
tapl.goHome()
primaryApp.launchViaIntent(wmHelper)
+ tapl.enableBlockTimeout(true)
}
transitions {
+ tapl.showTaskbarIfHidden()
tapl.launchedAppState.taskbar
.openAllApps()
.getAppIcon(secondaryApp.appName)
@@ -57,6 +60,11 @@ abstract class EnterSplitScreenByDragFromAllAppsBenchmark(override val flicker:
Assume.assumeTrue(tapl.isTablet)
}
+ @After
+ fun after() {
+ tapl.enableBlockTimeout(false)
+ }
+
companion object {
@Parameterized.Parameters(name = "{0}")
@JvmStatic
diff --git a/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromShortcutBenchmark.kt b/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromShortcutBenchmark.kt
index 3b3be84f9841..15ad0c12c49a 100644
--- a/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromShortcutBenchmark.kt
+++ b/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromShortcutBenchmark.kt
@@ -23,6 +23,7 @@ import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.flicker.utils.SplitScreenUtils
+import org.junit.After
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
@@ -42,13 +43,20 @@ abstract class EnterSplitScreenByDragFromShortcutBenchmark(
Assume.assumeTrue(tapl.isTablet)
}
+ @After
+ fun after() {
+ tapl.enableBlockTimeout(false)
+ }
+
protected val thisTransition: FlickerBuilder.() -> Unit = {
setup {
tapl.goHome()
SplitScreenUtils.createShortcutOnHotseatIfNotExist(tapl, secondaryApp.appName)
primaryApp.launchViaIntent(wmHelper)
+ tapl.enableBlockTimeout(true)
}
transitions {
+ tapl.showTaskbarIfHidden()
tapl.launchedAppState.taskbar
.getAppIcon(secondaryApp.appName)
.openDeepShortcutMenu()
diff --git a/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromTaskbarBenchmark.kt b/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromTaskbarBenchmark.kt
index eff355987cc0..ca8adb1fcb38 100644
--- a/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromTaskbarBenchmark.kt
+++ b/libs/WindowManager/Shell/tests/flicker/splitscreen/src/com/android/wm/shell/flicker/splitscreen/benchmark/EnterSplitScreenByDragFromTaskbarBenchmark.kt
@@ -23,6 +23,7 @@ import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.flicker.utils.SplitScreenUtils
+import org.junit.After
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
@@ -44,6 +45,7 @@ abstract class EnterSplitScreenByDragFromTaskbarBenchmark(override val flicker:
primaryApp.launchViaIntent(wmHelper)
}
transitions {
+ tapl.showTaskbarIfHidden()
tapl.launchedAppState.taskbar
.getAppIcon(secondaryApp.appName)
.dragToSplitscreen(secondaryApp.packageName, primaryApp.packageName)
@@ -54,6 +56,12 @@ abstract class EnterSplitScreenByDragFromTaskbarBenchmark(override val flicker:
@Before
fun before() {
Assume.assumeTrue(tapl.isTablet)
+ tapl.enableBlockTimeout(true)
+ }
+
+ @After
+ fun after() {
+ tapl.enableBlockTimeout(false)
}
companion object {
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationControllerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationControllerTest.java
index 6403e794a33e..c1ff260836b8 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationControllerTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/animation/ExpandedAnimationControllerTest.java
@@ -106,7 +106,7 @@ public class ExpandedAnimationControllerTest extends PhysicsAnimationLayoutTestC
verify(afterExpand).run();
Runnable afterCollapse = mock(Runnable.class);
- mExpandedController.collapseBackToStack(mExpansionPoint, afterCollapse);
+ mExpandedController.collapseBackToStack(mExpansionPoint, false, afterCollapse);
waitForPropertyAnimations(DynamicAnimation.TRANSLATION_X, DynamicAnimation.TRANSLATION_Y);
testStackedAtPosition(mExpansionPoint.x, mExpansionPoint.y, -1);
diff --git a/libs/hwui/aconfig/hwui_flags.aconfig b/libs/hwui/aconfig/hwui_flags.aconfig
index 78a64795967a..ca119757e816 100644
--- a/libs/hwui/aconfig/hwui_flags.aconfig
+++ b/libs/hwui/aconfig/hwui_flags.aconfig
@@ -1,6 +1,13 @@
package: "com.android.graphics.hwui.flags"
flag {
+ name: "matrix_44"
+ namespace: "core_graphics"
+ description: "API for 4x4 matrix and related canvas functions"
+ bug: "280116960"
+}
+
+flag {
name: "limited_hdr"
namespace: "core_graphics"
description: "API to enable apps to restrict the amount of HDR headroom that is used"
@@ -41,3 +48,10 @@ flag {
description: "Enable r_8, r_16_uint, rg_1616_uint, and rgba_10101010 in the SDK"
bug: "292545615"
}
+
+flag {
+ name: "animate_hdr_transitions"
+ namespace: "core_graphics"
+ description: "Automatically animate all changes in HDR headroom"
+ bug: "314810174"
+}
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/common/ui/BottomSheet.kt b/packages/CredentialManager/src/com/android/credentialmanager/common/ui/BottomSheet.kt
index a5998faa68ad..db69b8bdf42b 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/common/ui/BottomSheet.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/common/ui/BottomSheet.kt
@@ -60,14 +60,15 @@ fun ModalBottomSheet(
sheetContent = sheetContent,
sheetShape = EntryShape.TopRoundedCorner,
) {}
- LaunchedEffect(state.currentValue) {
+ LaunchedEffect(state.currentValue, state.targetValue) {
if (state.currentValue == ModalBottomSheetValue.Hidden) {
if (isInitialRender) {
onInitialRenderComplete()
scope.launch { state.show() }
- } else {
+ } else if (state.targetValue == ModalBottomSheetValue.Hidden) {
+ // Only dismiss ui when the motion is downwards
onDismiss()
}
}
}
-} \ No newline at end of file
+}
diff --git a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlow.kt b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlow.kt
index 2c60db4e76c7..8c52d574b156 100644
--- a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlow.kt
+++ b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlow.kt
@@ -21,13 +21,17 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.UserHandle
+import android.util.Log
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.callbackFlow
+import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.conflate
import kotlinx.coroutines.flow.flowOn
+private const val TAG = "BroadcastReceiverAsUser"
+
/**
* A [BroadcastReceiver] flow for the given [intentFilter].
*/
@@ -50,4 +54,6 @@ fun Context.broadcastReceiverAsUserFlow(
)
awaitClose { unregisterReceiver(broadcastReceiver) }
+}.catch { e ->
+ Log.e(TAG, "Error while broadcastReceiverAsUserFlow", e)
}.conflate().flowOn(Dispatchers.Default)
diff --git a/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlowTest.kt b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlowTest.kt
index dfb8e22c7b52..9cb33d2e9b2c 100644
--- a/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlowTest.kt
+++ b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/framework/common/BroadcastReceiverAsUserFlowTest.kt
@@ -32,9 +32,11 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.kotlin.any
import org.mockito.kotlin.doAnswer
+import org.mockito.kotlin.doThrow
import org.mockito.kotlin.eq
import org.mockito.kotlin.isNull
import org.mockito.kotlin.mock
+import org.mockito.kotlin.stub
@RunWith(AndroidJUnit4::class)
class BroadcastReceiverAsUserFlowTest {
@@ -83,6 +85,18 @@ class BroadcastReceiverAsUserFlowTest {
assertThat(onReceiveIsCalled).isTrue()
}
+ @Test
+ fun broadcastReceiverAsUserFlow_unregisterReceiverThrowException_noCrash() = runBlocking {
+ context.stub {
+ on { unregisterReceiver(any()) } doThrow IllegalArgumentException()
+ }
+ val flow = context.broadcastReceiverAsUserFlow(INTENT_FILTER, USER_HANDLE)
+
+ flow.firstWithTimeoutOrNull()
+
+ assertThat(registeredBroadcastReceiver).isNotNull()
+ }
+
private companion object {
val USER_HANDLE: UserHandle = UserHandle.of(0)
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index b6a0c7bafa44..d12d9d665a8c 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -562,6 +562,9 @@
<!-- Permissions required for CTS test - NotificationManagerTest -->
<uses-permission android:name="android.permission.MANAGE_NOTIFICATION_LISTENERS" />
+ <!-- Permissions required for CTS test - NotificationManagerZenTest -->
+ <uses-permission android:name="android.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS" />
+
<!-- Permissions required for CTS test - CtsContactsProviderTestCases -->
<uses-permission android:name="android.contacts.permission.MANAGE_SIM_ACCOUNTS" />
<uses-permission android:name="android.permission.SET_DEFAULT_ACCOUNT_FOR_CONTACTS" />
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 7cf562f48ff3..c2c5e001a5df 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -190,6 +190,7 @@ android_library {
"androidx.room_room-runtime",
"androidx.room_room-ktx",
"com.google.android.material_material",
+ "device_state_flags_lib",
"kotlinx_coroutines_android",
"kotlinx_coroutines",
"iconloader_base",
@@ -302,6 +303,7 @@ android_library {
"androidx.exifinterface_exifinterface",
"androidx.room_room-runtime",
"androidx.room_room-ktx",
+ "device_state_flags_lib",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
"kotlinx_coroutines_test",
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
index 658b45f68c92..2986504b7dbc 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
@@ -17,11 +17,13 @@
package com.android.compose.animation.scene
import androidx.compose.foundation.gestures.Orientation
-import androidx.compose.runtime.DisposableEffect
-import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
-import androidx.compose.ui.composed
-import androidx.compose.ui.input.nestedscroll.nestedScroll
+import androidx.compose.ui.input.nestedscroll.nestedScrollModifierNode
+import androidx.compose.ui.node.DelegatableNode
+import androidx.compose.ui.node.DelegatingNode
+import androidx.compose.ui.node.ModifierNodeElement
+import androidx.compose.ui.platform.InspectorInfo
+import com.android.compose.nestedscroll.PriorityNestedScrollConnection
/**
* Defines the behavior of the [SceneTransitionLayout] when a scrollable component is scrolled.
@@ -32,8 +34,9 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll
*/
enum class NestedScrollBehavior(val canStartOnPostFling: Boolean) {
/**
- * During scene transitions, scroll events are consumed by the [SceneTransitionLayout] instead
- * of the scrollable component.
+ * During scene transitions, if we are within
+ * [SceneTransitionLayoutImpl.transitionInterceptionThreshold], the [SceneTransitionLayout]
+ * consumes scroll events instead of the scrollable component.
*/
DuringTransitionBetweenScenes(canStartOnPostFling = false),
@@ -72,21 +75,101 @@ internal fun Modifier.nestedScrollToScene(
orientation: Orientation,
startBehavior: NestedScrollBehavior,
endBehavior: NestedScrollBehavior,
-): Modifier = composed {
- val connection =
- remember(layoutImpl, orientation, startBehavior, endBehavior) {
+) =
+ this then
+ NestedScrollToSceneElement(
+ layoutImpl = layoutImpl,
+ orientation = orientation,
+ startBehavior = startBehavior,
+ endBehavior = endBehavior,
+ )
+
+private data class NestedScrollToSceneElement(
+ private val layoutImpl: SceneTransitionLayoutImpl,
+ private val orientation: Orientation,
+ private val startBehavior: NestedScrollBehavior,
+ private val endBehavior: NestedScrollBehavior,
+) : ModifierNodeElement<NestedScrollToSceneNode>() {
+ override fun create() =
+ NestedScrollToSceneNode(
+ layoutImpl = layoutImpl,
+ orientation = orientation,
+ startBehavior = startBehavior,
+ endBehavior = endBehavior,
+ )
+
+ override fun update(node: NestedScrollToSceneNode) {
+ node.update(
+ layoutImpl = layoutImpl,
+ orientation = orientation,
+ startBehavior = startBehavior,
+ endBehavior = endBehavior,
+ )
+ }
+
+ override fun InspectorInfo.inspectableProperties() {
+ name = "nestedScrollToScene"
+ properties["layoutImpl"] = layoutImpl
+ properties["orientation"] = orientation
+ properties["startBehavior"] = startBehavior
+ properties["endBehavior"] = endBehavior
+ }
+}
+
+private class NestedScrollToSceneNode(
+ layoutImpl: SceneTransitionLayoutImpl,
+ orientation: Orientation,
+ startBehavior: NestedScrollBehavior,
+ endBehavior: NestedScrollBehavior,
+) : DelegatingNode() {
+ private var priorityNestedScrollConnection: PriorityNestedScrollConnection =
+ scenePriorityNestedScrollConnection(
+ layoutImpl = layoutImpl,
+ orientation = orientation,
+ startBehavior = startBehavior,
+ endBehavior = endBehavior,
+ )
+
+ private var nestedScrollNode: DelegatableNode =
+ nestedScrollModifierNode(
+ connection = priorityNestedScrollConnection,
+ dispatcher = null,
+ )
+
+ override fun onAttach() {
+ delegate(nestedScrollNode)
+ }
+
+ override fun onDetach() {
+ // Make sure we reset the scroll connection when this modifier is removed from composition
+ priorityNestedScrollConnection.reset()
+ }
+
+ fun update(
+ layoutImpl: SceneTransitionLayoutImpl,
+ orientation: Orientation,
+ startBehavior: NestedScrollBehavior,
+ endBehavior: NestedScrollBehavior,
+ ) {
+ // Clean up the old nested scroll connection
+ priorityNestedScrollConnection.reset()
+ undelegate(nestedScrollNode)
+
+ // Create a new nested scroll connection
+ priorityNestedScrollConnection =
scenePriorityNestedScrollConnection(
layoutImpl = layoutImpl,
orientation = orientation,
startBehavior = startBehavior,
- endBehavior = endBehavior
+ endBehavior = endBehavior,
)
- }
-
- // Make sure we reset the scroll connection when this modifier is removed from composition
- DisposableEffect(connection) { onDispose { connection.reset() } }
-
- nestedScroll(connection = connection)
+ nestedScrollNode =
+ nestedScrollModifierNode(
+ connection = priorityNestedScrollConnection,
+ dispatcher = null,
+ )
+ delegate(nestedScrollNode)
+ }
}
private fun scenePriorityNestedScrollConnection(
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt
index ea3006f0b502..8896e6e64bd9 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt
@@ -39,6 +39,7 @@ import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository
import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
+import javax.inject.Provider
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -83,7 +84,7 @@ class CommunalEditModeViewModelTest : SysuiTestCase() {
underTest =
CommunalEditModeViewModel(
withDeps.communalInteractor,
- shadeViewController,
+ Provider { shadeViewController },
powerManager,
mediaHost,
)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt
index 9bd083501780..7fbcae0d8986 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt
@@ -39,6 +39,7 @@ import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository
import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
+import javax.inject.Provider
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -84,7 +85,7 @@ class CommunalViewModelTest : SysuiTestCase() {
CommunalViewModel(
withDeps.communalInteractor,
withDeps.tutorialInteractor,
- shadeViewController,
+ Provider { shadeViewController },
powerManager,
mediaHost,
)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileDataInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileDataInteractorTest.kt
new file mode 100644
index 000000000000..7497ebdc2978
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileDataInteractorTest.kt
@@ -0,0 +1,200 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight.domain
+
+import android.app.UiModeManager
+import android.content.res.Configuration
+import android.content.res.Configuration.UI_MODE_NIGHT_NO
+import android.content.res.Configuration.UI_MODE_NIGHT_YES
+import android.os.UserHandle
+import android.testing.LeakCheck
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.coroutines.collectValues
+import com.android.systemui.qs.tiles.base.interactor.DataUpdateTrigger
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.interactor.UiModeNightTileDataInteractor
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.model.UiModeNightTileModel
+import com.android.systemui.statusbar.phone.ConfigurationControllerImpl
+import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.util.mockito.mock
+import com.android.systemui.util.mockito.whenever
+import com.android.systemui.util.time.DateFormatUtil
+import com.android.systemui.utils.leaks.FakeBatteryController
+import com.android.systemui.utils.leaks.FakeLocationController
+import com.google.common.truth.Truth.assertThat
+import java.time.LocalTime
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mock
+import org.mockito.Mockito.verify
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class UiModeNightTileDataInteractorTest : SysuiTestCase() {
+ private val configurationController: ConfigurationController =
+ ConfigurationControllerImpl(context)
+ private val batteryController = FakeBatteryController(LeakCheck())
+ private val locationController = FakeLocationController(LeakCheck())
+
+ private lateinit var underTest: UiModeNightTileDataInteractor
+
+ @Mock private lateinit var uiModeManager: UiModeManager
+ @Mock private lateinit var dateFormatUtil: DateFormatUtil
+
+ @Before
+ fun setup() {
+ uiModeManager = mock<UiModeManager>()
+ dateFormatUtil = mock<DateFormatUtil>()
+
+ whenever(uiModeManager.customNightModeStart).thenReturn(LocalTime.MIN)
+ whenever(uiModeManager.customNightModeEnd).thenReturn(LocalTime.MAX)
+
+ underTest =
+ UiModeNightTileDataInteractor(
+ context,
+ configurationController,
+ uiModeManager,
+ batteryController,
+ locationController,
+ dateFormatUtil
+ )
+ }
+
+ @Test
+ fun collectTileDataReadsUiModeManagerNightMode() = runTest {
+ val expectedNightMode = Configuration.UI_MODE_NIGHT_UNDEFINED
+ whenever(uiModeManager.nightMode).thenReturn(expectedNightMode)
+
+ val model by
+ collectLastValue(
+ underTest.tileData(TEST_USER, flowOf(DataUpdateTrigger.InitialRequest))
+ )
+ runCurrent()
+
+ assertThat(model).isNotNull()
+ val actualNightMode = model?.uiMode
+ assertThat(actualNightMode).isEqualTo(expectedNightMode)
+ }
+
+ @Test
+ fun collectTileDataReadsUiModeManagerNightModeCustomTypeAndTimes() = runTest {
+ collectLastValue(underTest.tileData(TEST_USER, flowOf(DataUpdateTrigger.InitialRequest)))
+
+ runCurrent()
+
+ verify(uiModeManager).nightMode
+ verify(uiModeManager).nightModeCustomType
+ verify(uiModeManager).customNightModeStart
+ verify(uiModeManager).customNightModeEnd
+ }
+
+ /** Here, available refers to the tile showing up, not the tile being clickable. */
+ @Test
+ fun isAvailableRegardlessOfPowerSaveModeOn() = runTest {
+ batteryController.setPowerSaveMode(true)
+
+ runCurrent()
+ val availability by collectLastValue(underTest.availability(TEST_USER))
+
+ assertThat(availability).isTrue()
+ }
+
+ @Test
+ fun dataMatchesConfigurationController() = runTest {
+ setUiMode(UI_MODE_NIGHT_NO)
+ val flowValues: List<UiModeNightTileModel> by
+ collectValues(underTest.tileData(TEST_USER, flowOf(DataUpdateTrigger.InitialRequest)))
+
+ runCurrent()
+ setUiMode(UI_MODE_NIGHT_YES)
+ runCurrent()
+ setUiMode(UI_MODE_NIGHT_NO)
+ runCurrent()
+
+ assertThat(flowValues.size).isEqualTo(3)
+ assertThat(flowValues.map { it.isNightMode }).containsExactly(false, true, false).inOrder()
+ }
+
+ @Test
+ fun dataMatchesBatteryController() = runTest {
+ batteryController.setPowerSaveMode(false)
+ val flowValues: List<UiModeNightTileModel> by
+ collectValues(underTest.tileData(TEST_USER, flowOf(DataUpdateTrigger.InitialRequest)))
+
+ runCurrent()
+ batteryController.setPowerSaveMode(true)
+ runCurrent()
+ batteryController.setPowerSaveMode(false)
+ runCurrent()
+
+ assertThat(flowValues.size).isEqualTo(3)
+ assertThat(flowValues.map { it.isPowerSave }).containsExactly(false, true, false).inOrder()
+ }
+
+ @Test
+ fun dataMatchesLocationController() = runTest {
+ locationController.setLocationEnabled(false)
+ val flowValues: List<UiModeNightTileModel> by
+ collectValues(underTest.tileData(TEST_USER, flowOf(DataUpdateTrigger.InitialRequest)))
+
+ runCurrent()
+ locationController.setLocationEnabled(true)
+ runCurrent()
+ locationController.setLocationEnabled(false)
+ runCurrent()
+
+ assertThat(flowValues.size).isEqualTo(3)
+ assertThat(flowValues.map { it.isLocationEnabled })
+ .containsExactly(false, true, false)
+ .inOrder()
+ }
+
+ @Test
+ fun collectTileDataReads24HourFormatFromDateTimeUtil() = runTest {
+ collectLastValue(underTest.tileData(TEST_USER, flowOf(DataUpdateTrigger.InitialRequest)))
+ runCurrent()
+
+ verify(dateFormatUtil).is24HourFormat
+ }
+
+ /**
+ * Use this method to trigger [ConfigurationController.ConfigurationListener.onUiModeChanged]
+ */
+ private fun setUiMode(uiMode: Int) {
+ val config = context.resources.configuration
+ val newConfig = Configuration(config)
+ newConfig.uiMode = uiMode
+
+ /** [underTest] will see this config the next time it creates a model */
+ context.orCreateTestableResources.overrideConfiguration(newConfig)
+
+ /** Trigger updateUiMode callbacks */
+ configurationController.onConfigurationChanged(newConfig)
+ }
+
+ private companion object {
+ val TEST_USER = UserHandle.of(1)!!
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapperTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapperTest.kt
new file mode 100644
index 000000000000..87f50090e58b
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapperTest.kt
@@ -0,0 +1,481 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight.domain
+
+import android.app.UiModeManager
+import android.text.TextUtils
+import android.view.View
+import android.widget.Switch
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.common.shared.model.Icon
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.qs.tiles.impl.custom.QSTileStateSubject
+import com.android.systemui.qs.tiles.impl.uimodenight.UiModeNightTileModelHelper.createModel
+import com.android.systemui.qs.tiles.impl.uimodenight.qsUiModeNightTileConfig
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.res.R
+import kotlin.reflect.KClass
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class UiModeNightTileMapperTest : SysuiTestCase() {
+ private val kosmos = Kosmos()
+ private val qsTileConfig = kosmos.qsUiModeNightTileConfig
+
+ private val mapper by lazy {
+ UiModeNightTileMapper(context.orCreateTestableResources.resources)
+ }
+
+ private fun createUiNightModeTileState(
+ iconRes: Int = R.drawable.qs_light_dark_theme_icon_off,
+ label: CharSequence = context.getString(R.string.quick_settings_ui_mode_night_label),
+ activationState: QSTileState.ActivationState = QSTileState.ActivationState.INACTIVE,
+ secondaryLabel: CharSequence? = null,
+ supportedActions: Set<QSTileState.UserAction> =
+ if (activationState == QSTileState.ActivationState.UNAVAILABLE)
+ setOf(QSTileState.UserAction.LONG_CLICK)
+ else setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK),
+ contentDescription: CharSequence? = null,
+ stateDescription: CharSequence? = null,
+ sideViewIcon: QSTileState.SideViewIcon = QSTileState.SideViewIcon.None,
+ enabledState: QSTileState.EnabledState = QSTileState.EnabledState.ENABLED,
+ expandedAccessibilityClass: KClass<out View>? = Switch::class,
+ ): QSTileState {
+ return QSTileState(
+ { Icon.Resource(iconRes, null) },
+ label,
+ activationState,
+ secondaryLabel,
+ supportedActions,
+ contentDescription,
+ stateDescription,
+ sideViewIcon,
+ enabledState,
+ expandedAccessibilityClass?.qualifiedName
+ )
+ }
+
+ @Test
+ fun mapsEnabledDataToUnavailableStateWhenOnPowerSave() {
+ val inputModel = createModel(nightMode = true, powerSave = true)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_battery_saver)
+ val expectedContentDescription =
+ TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel)
+ val expectedState =
+ createUiNightModeTileState(
+ activationState = QSTileState.ActivationState.UNAVAILABLE,
+ secondaryLabel = expectedSecondaryLabel,
+ contentDescription = expectedContentDescription
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun mapsDisabledDataToUnavailableStateWhenOnPowerSave() {
+ val inputModel = createModel(nightMode = false, powerSave = true)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_battery_saver)
+ val expectedContentDescription =
+ TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel)
+ val expectedState =
+ createUiNightModeTileState(
+ activationState = QSTileState.ActivationState.UNAVAILABLE,
+ secondaryLabel = expectedSecondaryLabel,
+ contentDescription = expectedContentDescription
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun mapsDisabledDataToInactiveState() {
+ val inputModel = createModel(nightMode = false, powerSave = false)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[1]
+ val expectedState =
+ createUiNightModeTileState(
+ activationState = QSTileState.ActivationState.INACTIVE,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ contentDescription = expectedLabel
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun mapsEnabledDataToActiveState() {
+ val inputModel = createModel(true, false)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[2]
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_on,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.ACTIVE,
+ contentDescription = expectedLabel
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun mapsEnabledDataToOnIconState() {
+ val inputModel = createModel(nightMode = true, powerSave = false)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[2]
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_on,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.ACTIVE,
+ contentDescription = expectedLabel
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun mapsDisabledDataToOffIconState() {
+ val inputModel = createModel(nightMode = false, powerSave = false)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[1]
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.INACTIVE,
+ contentDescription = expectedLabel
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun supportsClickAndLongClickActionsWhenNotInPowerSaveInNightMode() {
+ val inputModel = createModel(nightMode = true, powerSave = false)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[2]
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_on,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.ACTIVE,
+ contentDescription = expectedLabel,
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun supportsOnlyLongClickActionWhenUnavailableInPowerSaveInNightMode() {
+ val inputModel = createModel(nightMode = true, powerSave = true)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_battery_saver)
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedContentDescription =
+ TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.UNAVAILABLE,
+ contentDescription = expectedContentDescription,
+ supportedActions = setOf(QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun supportsClickAndLongClickActionsWhenNotInPowerSaveNotInNightMode() {
+ val inputModel = createModel(nightMode = false, powerSave = false)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[1]
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.INACTIVE,
+ contentDescription = expectedLabel,
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun supportsOnlyClickActionWhenUnavailableInPowerSaveNotInNightMode() {
+ val inputModel = createModel(nightMode = false, powerSave = true)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_battery_saver)
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.UNAVAILABLE,
+ contentDescription = TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel),
+ supportedActions = setOf(QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenInPowerSaveMode() {
+ val inputModel = createModel(powerSave = true)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_battery_saver)
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.UNAVAILABLE,
+ contentDescription = TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel),
+ supportedActions = setOf(QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenInNightModeNotInPowerSaveModeLocationEnabledUiModeIsNightAuto() {
+ val inputModel =
+ createModel(
+ nightMode = true,
+ powerSave = false,
+ isLocationEnabled = true,
+ uiMode = UiModeManager.MODE_NIGHT_AUTO
+ )
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_until_sunrise)
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_on,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.ACTIVE,
+ contentDescription = TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel),
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenNotInNightModeNotInPowerSaveModeLocationEnableUiModeIsNightAuto() {
+ val inputModel =
+ createModel(
+ nightMode = false,
+ powerSave = false,
+ isLocationEnabled = true,
+ uiMode = UiModeManager.MODE_NIGHT_AUTO
+ )
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_on_at_sunset)
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.INACTIVE,
+ contentDescription = TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel),
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenNotInPowerSaveAndUiModeIsNightYesInNightMode() {
+ val inputModel =
+ createModel(nightMode = true, powerSave = false, uiMode = UiModeManager.MODE_NIGHT_YES)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[2]
+
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_on,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.ACTIVE,
+ contentDescription = expectedLabel,
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenNotInPowerSaveAndUiModeIsNightNoNotInNightMode() {
+ val inputModel =
+ createModel(nightMode = false, powerSave = false, uiMode = UiModeManager.MODE_NIGHT_NO)
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[1]
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.INACTIVE,
+ contentDescription = expectedLabel,
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenNotInPowerSaveAndUiModeIsUnknownCustomNotInNightMode() {
+ val inputModel =
+ createModel(
+ nightMode = false,
+ powerSave = false,
+ uiMode = UiModeManager.MODE_NIGHT_CUSTOM,
+ nighModeCustomType = UiModeManager.MODE_NIGHT_CUSTOM_TYPE_UNKNOWN
+ )
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[1]
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.INACTIVE,
+ contentDescription = expectedLabel,
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenNotInPowerSaveAndUiModeIsUnknownCustomInNightMode() {
+ val inputModel =
+ createModel(
+ nightMode = true,
+ powerSave = false,
+ uiMode = UiModeManager.MODE_NIGHT_CUSTOM,
+ nighModeCustomType = UiModeManager.MODE_NIGHT_CUSTOM_TYPE_UNKNOWN
+ )
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel = context.resources.getStringArray(R.array.tile_states_dark)[2]
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_on,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.ACTIVE,
+ contentDescription = expectedLabel,
+ supportedActions =
+ setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+
+ @Test
+ fun secondaryLabelCorrectWhenInPowerSaveAndUiModeIsUnknownCustomNotInNightMode() {
+ val inputModel =
+ createModel(
+ nightMode = false,
+ powerSave = true,
+ uiMode = UiModeManager.MODE_NIGHT_CUSTOM,
+ nighModeCustomType = UiModeManager.MODE_NIGHT_CUSTOM_TYPE_UNKNOWN
+ )
+
+ val actualState: QSTileState = mapper.map(qsTileConfig, inputModel)
+
+ val expectedSecondaryLabel =
+ context.getString(R.string.quick_settings_dark_mode_secondary_label_battery_saver)
+ val expectedLabel = context.getString(R.string.quick_settings_ui_mode_night_label)
+ val expectedContentDescription =
+ TextUtils.concat(expectedLabel, ", ", expectedSecondaryLabel)
+ val expectedState =
+ createUiNightModeTileState(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ label = expectedLabel,
+ secondaryLabel = expectedSecondaryLabel,
+ activationState = QSTileState.ActivationState.UNAVAILABLE,
+ contentDescription = expectedContentDescription,
+ supportedActions = setOf(QSTileState.UserAction.LONG_CLICK)
+ )
+ QSTileStateSubject.assertThat(actualState).isEqualTo(expectedState)
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileUserActionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileUserActionInteractorTest.kt
new file mode 100644
index 000000000000..004ec6250e7e
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileUserActionInteractorTest.kt
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight.domain
+
+import android.app.UiModeManager
+import android.provider.Settings
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.qs.tiles.base.actions.FakeQSTileIntentUserInputHandler
+import com.android.systemui.qs.tiles.base.actions.intentInputs
+import com.android.systemui.qs.tiles.base.interactor.QSTileInputTestKtx
+import com.android.systemui.qs.tiles.impl.uimodenight.UiModeNightTileModelHelper.createModel
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.interactor.UiModeNightTileUserActionInteractor
+import com.android.systemui.util.mockito.any
+import com.android.systemui.util.mockito.mock
+import com.google.common.truth.Truth
+import kotlin.coroutines.EmptyCoroutineContext
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mock
+import org.mockito.Mockito.never
+import org.mockito.Mockito.verify
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class UiModeNightTileUserActionInteractorTest : SysuiTestCase() {
+
+ private val qsTileIntentUserActionHandler = FakeQSTileIntentUserInputHandler()
+
+ private lateinit var underTest: UiModeNightTileUserActionInteractor
+
+ @Mock private lateinit var uiModeManager: UiModeManager
+
+ @Before
+ fun setup() {
+ uiModeManager = mock<UiModeManager>()
+ underTest =
+ UiModeNightTileUserActionInteractor(
+ EmptyCoroutineContext,
+ uiModeManager,
+ qsTileIntentUserActionHandler
+ )
+ }
+
+ @Test
+ fun handleClickToEnable() = runTest {
+ val stateBeforeClick = false
+
+ underTest.handleInput(QSTileInputTestKtx.click(createModel(stateBeforeClick)))
+
+ verify(uiModeManager).setNightModeActivated(!stateBeforeClick)
+ }
+
+ @Test
+ fun handleClickToDisable() = runTest {
+ val stateBeforeClick = true
+
+ underTest.handleInput(QSTileInputTestKtx.click(createModel(stateBeforeClick)))
+
+ verify(uiModeManager).setNightModeActivated(!stateBeforeClick)
+ }
+
+ @Test
+ fun clickToEnableDoesNothingWhenInPowerSaveInNightMode() = runTest {
+ val isNightMode = true
+ val isPowerSave = true
+
+ underTest.handleInput(QSTileInputTestKtx.click(createModel(isNightMode, isPowerSave)))
+
+ verify(uiModeManager, never()).setNightModeActivated(any())
+ }
+
+ @Test
+ fun clickToEnableDoesNothingWhenInPowerSaveNotInNightMode() = runTest {
+ val isNightMode = false
+ val isPowerSave = true
+
+ underTest.handleInput(QSTileInputTestKtx.click(createModel(isNightMode, isPowerSave)))
+
+ verify(uiModeManager, never()).setNightModeActivated(any())
+ }
+
+ @Test
+ fun handleLongClickNightModeEnabled() = runTest {
+ val isNightMode = true
+
+ underTest.handleInput(QSTileInputTestKtx.longClick(createModel(isNightMode)))
+
+ Truth.assertThat(qsTileIntentUserActionHandler.handledInputs).hasSize(1)
+ val intentInput = qsTileIntentUserActionHandler.intentInputs.last()
+ val actualIntentAction = intentInput.intent.action
+ val expectedIntentAction = Settings.ACTION_DARK_THEME_SETTINGS
+ Truth.assertThat(actualIntentAction).isEqualTo(expectedIntentAction)
+ }
+
+ @Test
+ fun handleLongClickNightModeDisabled() = runTest {
+ val isNightMode = false
+
+ underTest.handleInput(QSTileInputTestKtx.longClick(createModel(isNightMode)))
+
+ Truth.assertThat(qsTileIntentUserActionHandler.handledInputs).hasSize(1)
+ val intentInput = qsTileIntentUserActionHandler.intentInputs.last()
+ val actualIntentAction = intentInput.intent.action
+ val expectedIntentAction = Settings.ACTION_DARK_THEME_SETTINGS
+ Truth.assertThat(actualIntentAction).isEqualTo(expectedIntentAction)
+ }
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
index 06e9b10f6e7f..5d85fbade873 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
@@ -174,7 +174,7 @@ public interface QSTile {
public String spec;
/** Get the state text. */
- public String getStateText(int arrayResId, Resources resources) {
+ public CharSequence getStateText(int arrayResId, Resources resources) {
if (state == Tile.STATE_UNAVAILABLE || this instanceof QSTile.BooleanState) {
String[] array = resources.getStringArray(arrayResId);
return array[state];
@@ -184,13 +184,13 @@ public interface QSTile {
}
/** Get the text for secondaryLabel. */
- public String getSecondaryLabel(String stateText) {
+ public CharSequence getSecondaryLabel(CharSequence stateText) {
// Use a local reference as the value might change from other threads
CharSequence localSecondaryLabel = secondaryLabel;
if (TextUtils.isEmpty(localSecondaryLabel)) {
return stateText;
}
- return localSecondaryLabel.toString();
+ return localSecondaryLabel;
}
public boolean copyTo(State other) {
diff --git a/packages/SystemUI/res-keyguard/drawable/bouncer_password_text_view_focused_background.xml b/packages/SystemUI/res-keyguard/drawable/bouncer_password_text_view_focused_background.xml
new file mode 100644
index 000000000000..02e10cd4ad7c
--- /dev/null
+++ b/packages/SystemUI/res-keyguard/drawable/bouncer_password_text_view_focused_background.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true">
+ <shape android:shape="rectangle">
+ <corners android:radius="16dp" />
+ <stroke android:width="3dp"
+ android:color="@color/bouncer_password_focus_color" />
+ </shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_bouncer_message_area.xml b/packages/SystemUI/res-keyguard/layout/keyguard_bouncer_message_area.xml
index 66c54f2a668e..0b35559148af 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_bouncer_message_area.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_bouncer_message_area.xml
@@ -23,7 +23,7 @@
android:layout_marginTop="@dimen/keyguard_lock_padding"
android:importantForAccessibility="no"
android:ellipsize="marquee"
- android:focusable="true"
+ android:focusable="false"
android:gravity="center"
android:singleLine="true" />
</merge>
diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml
index 88f7bcd5d907..6e6709f94abb 100644
--- a/packages/SystemUI/res-keyguard/values/styles.xml
+++ b/packages/SystemUI/res-keyguard/values/styles.xml
@@ -76,6 +76,7 @@
</style>
<style name="Widget.TextView.Password" parent="@android:style/Widget.TextView">
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
+ <item name="android:background">@drawable/bouncer_password_text_view_focused_background</item>
<item name="android:gravity">center</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
diff --git a/packages/SystemUI/res/layout/connected_display_dialog.xml b/packages/SystemUI/res/layout/connected_display_dialog.xml
index 3f65aa7984b5..8d7f7ebd82dc 100644
--- a/packages/SystemUI/res/layout/connected_display_dialog.xml
+++ b/packages/SystemUI/res/layout/connected_display_dialog.xml
@@ -45,6 +45,15 @@
android:text="@string/connected_display_dialog_start_mirroring"
android:textAppearance="@style/TextAppearance.Dialog.Title" />
+ <TextView
+ android:id="@+id/dual_display_warning"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:visibility="gone"
+ android:text="@string/connected_display_dialog_dual_display_stop_warning"
+ android:textAppearance="@style/TextAppearance.Dialog.Body" />
+
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res/layout/screen_record_options.xml b/packages/SystemUI/res/layout/screen_record_options.xml
index 8916e427a1d5..fa345c929c25 100644
--- a/packages/SystemUI/res/layout/screen_record_options.xml
+++ b/packages/SystemUI/res/layout/screen_record_options.xml
@@ -40,16 +40,22 @@
android:popupBackground="@drawable/screenrecord_spinner_background"
android:dropDownWidth="274dp"
android:importantForAccessibility="yes"/>
- <Switch
+ <FrameLayout
+ android:id="@+id/screenrecord_audio_switch_container"
android:layout_width="wrap_content"
- android:minWidth="48dp"
- android:layout_height="48dp"
- android:layout_weight="0"
- android:layout_gravity="end"
- android:id="@+id/screenrecord_audio_switch"
- android:contentDescription="@string/screenrecord_audio_label"
- style="@style/ScreenRecord.Switch"
- android:importantForAccessibility="yes"/>
+ android:layout_height="wrap_content">
+ <Switch
+ android:layout_width="wrap_content"
+ android:minWidth="48dp"
+ android:layout_height="48dp"
+ android:layout_gravity="end"
+ android:focusable="false"
+ android:clickable="false"
+ android:id="@+id/screenrecord_audio_switch"
+ android:contentDescription="@string/screenrecord_audio_label"
+ style="@style/ScreenRecord.Switch"
+ android:importantForAccessibility="yes"/>
+ </FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/show_taps"
@@ -75,13 +81,20 @@
android:fontFamily="@*android:string/config_bodyFontFamily"
android:textColor="?android:attr/textColorPrimary"
android:contentDescription="@string/screenrecord_taps_label"/>
- <Switch
+ <FrameLayout
+ android:id="@+id/screenrecord_taps_switch_container"
android:layout_width="wrap_content"
- android:minWidth="48dp"
- android:layout_height="48dp"
- android:id="@+id/screenrecord_taps_switch"
- android:contentDescription="@string/screenrecord_taps_label"
- style="@style/ScreenRecord.Switch"
- android:importantForAccessibility="yes"/>
+ android:layout_height="wrap_content">
+ <Switch
+ android:layout_width="wrap_content"
+ android:minWidth="48dp"
+ android:layout_height="48dp"
+ android:focusable="false"
+ android:clickable="false"
+ android:id="@+id/screenrecord_taps_switch"
+ android:contentDescription="@string/screenrecord_taps_label"
+ style="@style/ScreenRecord.Switch"
+ android:importantForAccessibility="yes"/>
+ </FrameLayout>
</LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/udfps_touch_overlay.xml b/packages/SystemUI/res/layout/udfps_touch_overlay.xml
index ea92776aba2d..498d59b44e62 100644
--- a/packages/SystemUI/res/layout/udfps_touch_overlay.xml
+++ b/packages/SystemUI/res/layout/udfps_touch_overlay.xml
@@ -17,6 +17,5 @@
<com.android.systemui.biometrics.ui.view.UdfpsTouchOverlay xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/udfps_touch_overlay"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:contentDescription="@string/accessibility_fingerprint_label">
+ android:layout_height="match_parent">
</com.android.systemui.biometrics.ui.view.UdfpsTouchOverlay>
diff --git a/packages/SystemUI/res/values-night/colors.xml b/packages/SystemUI/res/values-night/colors.xml
index bcc3c83b4560..a22fd18fc2c0 100644
--- a/packages/SystemUI/res/values-night/colors.xml
+++ b/packages/SystemUI/res/values-night/colors.xml
@@ -93,6 +93,9 @@
<color name="qs_user_switcher_selected_avatar_icon_color">#202124</color>
<!-- Color of background circle of user avatars in quick settings user switcher -->
<color name="qs_user_switcher_avatar_background">#3C4043</color>
+ <!-- Color of border for keyguard password input when focused -->
+ <color name="bouncer_password_focus_color">@*android:color/system_secondary_dark</color>
+
<!-- Accessibility floating menu -->
<color name="accessibility_floating_menu_background">#B3000000</color> <!-- 70% -->
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 5f6a39a91b8b..462fc95b8cd1 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -56,6 +56,8 @@
<color name="kg_user_switcher_restricted_avatar_icon_color">@color/GM2_grey_600</color>
<!-- Color of background circle of user avatars in keyguard user switcher -->
<color name="user_avatar_color_bg">?android:attr/colorBackgroundFloating</color>
+ <!-- Color of border for keyguard password input when focused -->
+ <color name="bouncer_password_focus_color">@*android:color/system_secondary_light</color>
<!-- Icon color for user avatars in user switcher quick settings -->
<color name="qs_user_switcher_avatar_icon_color">#3C4043</color>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index f49d2a19bcd4..7ca0b6ee8d9f 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -3245,6 +3245,8 @@
<!--- Title of the dialog appearing when an external display is connected, asking whether to start mirroring [CHAR LIMIT=NONE]-->
<string name="connected_display_dialog_start_mirroring">Mirror to external display?</string>
+ <!--- Body of the mirroring dialog, shown when dual display is enabled. This signals that enabling mirroring will stop concurrent displays on a foldable device. [CHAR LIMIT=NONE]-->
+ <string name="connected_display_dialog_dual_display_stop_warning">Any dual screen activity currently running will be stopped</string>
<!--- Label of the "enable display" button of the dialog appearing when an external display is connected [CHAR LIMIT=NONE]-->
<string name="mirror_display">Mirror display</string>
<!--- Label of the dismiss button of the dialog appearing when an external display is connected [CHAR LIMIT=NONE]-->
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
index 36fe75f69a45..9764de1993e5 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
@@ -168,7 +168,6 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
// Set selected property on so the view can send accessibility events.
mPasswordEntry.setSelected(true);
- mPasswordEntry.setDefaultFocusHighlightEnabled(false);
mOkButton = findViewById(R.id.key_enter);
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt
index ff23837703b5..b0143f5cdc4a 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/data/repository/DisplayStateRepository.kt
@@ -60,6 +60,8 @@ interface DisplayStateRepository {
val currentRotation: StateFlow<DisplayRotation>
}
+// TODO(b/296211844): This class could directly use DeviceStateRepository and DisplayRepository
+// instead.
@SysUISingleton
class DisplayStateRepositoryImpl
@Inject
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
index bed42833a1d4..333fc194b288 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
@@ -24,13 +24,14 @@ import com.android.systemui.communal.domain.model.CommunalContentModel
import com.android.systemui.communal.shared.model.CommunalSceneKey
import com.android.systemui.media.controls.ui.MediaHost
import com.android.systemui.shade.ShadeViewController
+import javax.inject.Provider
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.StateFlow
/** The base view model for the communal hub. */
abstract class BaseCommunalViewModel(
private val communalInteractor: CommunalInteractor,
- private val shadeViewController: ShadeViewController,
+ private val shadeViewController: Provider<ShadeViewController>,
private val powerManager: PowerManager,
val mediaHost: MediaHost,
) {
@@ -48,7 +49,7 @@ abstract class BaseCommunalViewModel(
fun onOuterTouch(motionEvent: MotionEvent) {
// Forward the touch to the shade so that basic gestures like swipe up/down for
// shade/bouncer work.
- shadeViewController.handleExternalTouch(motionEvent)
+ shadeViewController.get().handleExternalTouch(motionEvent)
}
// TODO(b/308813166): remove once CommunalContainer is moved lower in z-order and doesn't block
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt
index b6843c529180..c82e00038b34 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt
@@ -25,6 +25,7 @@ import com.android.systemui.media.dagger.MediaModule
import com.android.systemui.shade.ShadeViewController
import javax.inject.Inject
import javax.inject.Named
+import javax.inject.Provider
import kotlinx.coroutines.flow.Flow
/** The view model for communal hub in edit mode. */
@@ -33,7 +34,7 @@ class CommunalEditModeViewModel
@Inject
constructor(
private val communalInteractor: CommunalInteractor,
- shadeViewController: ShadeViewController,
+ shadeViewController: Provider<ShadeViewController>,
powerManager: PowerManager,
@Named(MediaModule.COMMUNAL_HUB) mediaHost: MediaHost,
) : BaseCommunalViewModel(communalInteractor, shadeViewController, powerManager, mediaHost) {
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt
index d7dcdb9ea4f0..abf198637911 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt
@@ -26,6 +26,7 @@ import com.android.systemui.media.dagger.MediaModule
import com.android.systemui.shade.ShadeViewController
import javax.inject.Inject
import javax.inject.Named
+import javax.inject.Provider
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
@@ -39,7 +40,7 @@ class CommunalViewModel
constructor(
private val communalInteractor: CommunalInteractor,
tutorialInteractor: CommunalTutorialInteractor,
- shadeViewController: ShadeViewController,
+ shadeViewController: Provider<ShadeViewController>,
powerManager: PowerManager,
@Named(MediaModule.COMMUNAL_HUB) mediaHost: MediaHost,
) : BaseCommunalViewModel(communalInteractor, shadeViewController, powerManager, mediaHost) {
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java b/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java
index 9672facb8610..e7b87730f94b 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java
@@ -36,6 +36,8 @@ import com.android.systemui.unfold.FoldStateLogger;
import com.android.systemui.unfold.FoldStateLoggingProvider;
import com.android.systemui.unfold.SysUIUnfoldComponent;
import com.android.systemui.unfold.UnfoldTransitionProgressProvider;
+import com.android.systemui.unfold.dagger.UnfoldBg;
+import com.android.systemui.unfold.progress.UnfoldTransitionProgressForwarder;
import com.android.wm.shell.back.BackAnimation;
import com.android.wm.shell.bubbles.Bubbles;
import com.android.wm.shell.desktopmode.DesktopMode;
@@ -137,19 +139,26 @@ public interface SysUIComponent {
c.getUnfoldHapticsPlayer();
c.getNaturalRotationUnfoldProgressProvider().init();
c.getUnfoldLatencyTracker().init();
- c.getFoldStateLoggingProvider()
- .ifPresent(FoldStateLoggingProvider::init);
- c.getFoldStateLogger().ifPresent(FoldStateLogger::init);
- final UnfoldTransitionProgressProvider progressProvider =
- Flags.unfoldAnimationBackgroundProgress()
- ? c.getBgUnfoldTransitionProgressProvider()
- : c.getUnfoldTransitionProgressProvider();
- progressProvider.addCallback(c.getUnfoldTransitionProgressForwarder());
});
// No init method needed, just needs to be gotten so that it's created.
getMediaMuteAwaitConnectionCli();
getNearbyMediaDevicesManager();
getConnectingDisplayViewModel().init();
+ getFoldStateLoggingProvider().ifPresent(FoldStateLoggingProvider::init);
+ getFoldStateLogger().ifPresent(FoldStateLogger::init);
+
+ Optional<UnfoldTransitionProgressProvider> unfoldTransitionProgressProvider;
+
+ if (Flags.unfoldAnimationBackgroundProgress()) {
+ unfoldTransitionProgressProvider = getBgUnfoldTransitionProgressProvider();
+ } else {
+ unfoldTransitionProgressProvider = getUnfoldTransitionProgressProvider();
+ }
+ unfoldTransitionProgressProvider
+ .ifPresent(
+ (progressProvider) ->
+ getUnfoldTransitionProgressForwarder()
+ .ifPresent(progressProvider::addCallback));
}
/**
@@ -171,6 +180,37 @@ public interface SysUIComponent {
ContextComponentHelper getContextComponentHelper();
/**
+ * Creates a UnfoldTransitionProgressProvider that calculates progress in the background.
+ */
+ @SysUISingleton
+ @UnfoldBg
+ Optional<UnfoldTransitionProgressProvider> getBgUnfoldTransitionProgressProvider();
+
+ /**
+ * Creates a UnfoldTransitionProgressProvider that calculates progress in the main thread.
+ */
+ @SysUISingleton
+ Optional<UnfoldTransitionProgressProvider> getUnfoldTransitionProgressProvider();
+
+ /**
+ * Creates a UnfoldTransitionProgressForwarder.
+ */
+ @SysUISingleton
+ Optional<UnfoldTransitionProgressForwarder> getUnfoldTransitionProgressForwarder();
+
+ /**
+ * Creates a FoldStateLoggingProvider.
+ */
+ @SysUISingleton
+ Optional<FoldStateLoggingProvider> getFoldStateLoggingProvider();
+
+ /**
+ * Creates a FoldStateLogger.
+ */
+ @SysUISingleton
+ Optional<FoldStateLogger> getFoldStateLogger();
+
+ /**
* Main dependency providing module.
*/
@SysUISingleton
diff --git a/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt b/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt
index 65cd84bc4da1..373279cec5d1 100644
--- a/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt
@@ -16,6 +16,8 @@
package com.android.systemui.display
+import com.android.systemui.display.data.repository.DeviceStateRepository
+import com.android.systemui.display.data.repository.DeviceStateRepositoryImpl
import com.android.systemui.display.data.repository.DisplayRepository
import com.android.systemui.display.data.repository.DisplayRepositoryImpl
import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractor
@@ -32,4 +34,9 @@ interface DisplayModule {
): ConnectedDisplayInteractor
@Binds fun bindsDisplayRepository(displayRepository: DisplayRepositoryImpl): DisplayRepository
+
+ @Binds
+ fun bindsDeviceStateRepository(
+ deviceStateRepository: DeviceStateRepositoryImpl
+ ): DeviceStateRepository
}
diff --git a/packages/SystemUI/src/com/android/systemui/display/data/repository/DeviceStateRepository.kt b/packages/SystemUI/src/com/android/systemui/display/data/repository/DeviceStateRepository.kt
new file mode 100644
index 000000000000..83337f760c33
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/display/data/repository/DeviceStateRepository.kt
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.display.data.repository
+
+import android.content.Context
+import android.hardware.devicestate.DeviceStateManager
+import com.android.internal.R
+import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.display.data.repository.DeviceStateRepository.DeviceState
+import java.util.concurrent.Executor
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.stateIn
+
+interface DeviceStateRepository {
+ val state: StateFlow<DeviceState>
+
+ enum class DeviceState {
+ /** Device state in [R.array.config_foldedDeviceStates] */
+ FOLDED,
+ /** Device state in [R.array.config_halfFoldedDeviceStates] */
+ HALF_FOLDED,
+ /** Device state in [R.array.config_openDeviceStates] */
+ UNFOLDED,
+ /** Device state in [R.array.config_rearDisplayDeviceStates] */
+ REAR_DISPLAY,
+ /** Device state in [R.array.config_concurrentDisplayDeviceStates] */
+ CONCURRENT_DISPLAY,
+ /** Device state in none of the other arrays. */
+ UNKNOWN,
+ }
+}
+
+class DeviceStateRepositoryImpl
+@Inject
+constructor(
+ context: Context,
+ deviceStateManager: DeviceStateManager,
+ @Background bgScope: CoroutineScope,
+ @Background executor: Executor
+) : DeviceStateRepository {
+
+ override val state: StateFlow<DeviceState> =
+ conflatedCallbackFlow {
+ val callback =
+ DeviceStateManager.DeviceStateCallback { state ->
+ trySend(deviceStateToPosture(state))
+ }
+ deviceStateManager.registerCallback(executor, callback)
+ awaitClose { deviceStateManager.unregisterCallback(callback) }
+ }
+ .stateIn(bgScope, started = SharingStarted.WhileSubscribed(), DeviceState.UNKNOWN)
+
+ private fun deviceStateToPosture(deviceStateId: Int): DeviceState {
+ return deviceStateMap.firstOrNull { (ids, _) -> deviceStateId in ids }?.deviceState
+ ?: DeviceState.UNKNOWN
+ }
+
+ private val deviceStateMap =
+ listOf(
+ R.array.config_foldedDeviceStates to DeviceState.FOLDED,
+ R.array.config_halfFoldedDeviceStates to DeviceState.HALF_FOLDED,
+ R.array.config_openDeviceStates to DeviceState.UNFOLDED,
+ R.array.config_rearDisplayDeviceStates to DeviceState.REAR_DISPLAY,
+ R.array.config_concurrentDisplayDeviceStates to DeviceState.CONCURRENT_DISPLAY,
+ )
+ .map { IdsPerDeviceState(context.resources.getIntArray(it.first).toSet(), it.second) }
+
+ private data class IdsPerDeviceState(val ids: Set<Int>, val deviceState: DeviceState)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractor.kt b/packages/SystemUI/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractor.kt
index 20a9e5d572c9..73b7a8ac7bd3 100644
--- a/packages/SystemUI/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractor.kt
@@ -21,6 +21,7 @@ import android.companion.virtual.flags.Flags
import android.view.Display
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.display.data.repository.DeviceStateRepository
import com.android.systemui.display.data.repository.DisplayRepository
import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractor.PendingDisplay
import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractor.State
@@ -55,6 +56,9 @@ interface ConnectedDisplayInteractor {
/** Pending display that can be enabled to be used by the system. */
val pendingDisplay: Flow<PendingDisplay?>
+ /** Pending display that can be enabled to be used by the system. */
+ val concurrentDisplaysInProgress: Flow<Boolean>
+
/** Possible connected display state. */
enum class State {
DISCONNECTED,
@@ -84,6 +88,7 @@ constructor(
private val virtualDeviceManager: VirtualDeviceManager,
keyguardRepository: KeyguardRepository,
displayRepository: DisplayRepository,
+ deviceStateRepository: DeviceStateRepository,
@Background backgroundCoroutineDispatcher: CoroutineDispatcher,
) : ConnectedDisplayInteractor {
@@ -128,9 +133,16 @@ constructor(
}
}
+ override val concurrentDisplaysInProgress: Flow<Boolean> =
+ deviceStateRepository.state
+ .map { it == DeviceStateRepository.DeviceState.CONCURRENT_DISPLAY }
+ .distinctUntilChanged()
+ .flowOn(backgroundCoroutineDispatcher)
+
private fun DisplayRepository.PendingDisplay.toInteractorPendingDisplay(): PendingDisplay =
object : PendingDisplay {
override suspend fun enable() = this@toInteractorPendingDisplay.enable()
+
override suspend fun ignore() = this@toInteractorPendingDisplay.ignore()
}
diff --git a/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt b/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt
index d500d1c2d238..c0a873ac9a65 100644
--- a/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/ui/view/MirroringConfirmationDialog.kt
@@ -37,11 +37,13 @@ class MirroringConfirmationDialog(
private val onCancelMirroring: View.OnClickListener,
private val navbarBottomInsetsProvider: () -> Int,
configurationController: ConfigurationController? = null,
+ private val showConcurrentDisplayInfo: Boolean = false,
theme: Int = R.style.Theme_SystemUI_Dialog,
) : SystemUIBottomSheetDialog(context, configurationController, theme) {
private lateinit var mirrorButton: TextView
private lateinit var dismissButton: TextView
+ private lateinit var dualDisplayWarning: TextView
private var enabledPressed = false
override fun onCreate(savedInstanceState: Bundle?) {
@@ -56,6 +58,11 @@ class MirroringConfirmationDialog(
dismissButton =
requireViewById<TextView>(R.id.cancel).apply { setOnClickListener(onCancelMirroring) }
+ dualDisplayWarning =
+ requireViewById<TextView>(R.id.dual_display_warning).apply {
+ visibility = if (showConcurrentDisplayInfo) View.VISIBLE else View.GONE
+ }
+
setOnDismissListener {
if (!enabledPressed) {
onCancelMirroring.onClick(null)
diff --git a/packages/SystemUI/src/com/android/systemui/display/ui/viewmodel/ConnectingDisplayViewModel.kt b/packages/SystemUI/src/com/android/systemui/display/ui/viewmodel/ConnectingDisplayViewModel.kt
index 19b4d2220558..10aa70391f01 100644
--- a/packages/SystemUI/src/com/android/systemui/display/ui/viewmodel/ConnectingDisplayViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/ui/viewmodel/ConnectingDisplayViewModel.kt
@@ -17,6 +17,7 @@ package com.android.systemui.display.ui.viewmodel
import android.app.Dialog
import android.content.Context
+import com.android.server.policy.feature.flags.Flags
import com.android.systemui.biometrics.Utils
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
@@ -28,8 +29,9 @@ import com.android.systemui.statusbar.policy.ConfigurationController
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.launchIn
-import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
/**
@@ -44,25 +46,33 @@ constructor(
private val connectedDisplayInteractor: ConnectedDisplayInteractor,
@Application private val scope: CoroutineScope,
@Background private val bgDispatcher: CoroutineDispatcher,
- private val configurationController: ConfigurationController
+ private val configurationController: ConfigurationController,
) {
private var dialog: Dialog? = null
/** Starts listening for pending displays. */
fun init() {
- connectedDisplayInteractor.pendingDisplay
- .onEach { pendingDisplay ->
+ val pendingDisplayFlow = connectedDisplayInteractor.pendingDisplay
+ val concurrentDisplaysInProgessFlow =
+ if (Flags.enableDualDisplayBlocking()) {
+ connectedDisplayInteractor.concurrentDisplaysInProgress
+ } else {
+ flow { emit(false) }
+ }
+ pendingDisplayFlow
+ .combine(concurrentDisplaysInProgessFlow) { pendingDisplay, concurrentDisplaysInProgress
+ ->
if (pendingDisplay == null) {
hideDialog()
} else {
- showDialog(pendingDisplay)
+ showDialog(pendingDisplay, concurrentDisplaysInProgress)
}
}
.launchIn(scope)
}
- private fun showDialog(pendingDisplay: PendingDisplay) {
+ private fun showDialog(pendingDisplay: PendingDisplay, concurrentDisplaysInProgess: Boolean) {
hideDialog()
dialog =
MirroringConfirmationDialog(
@@ -77,6 +87,7 @@ constructor(
},
navbarBottomInsetsProvider = { Utils.getNavbarInsets(context).bottom },
configurationController,
+ showConcurrentDisplayInfo = concurrentDisplaysInProgess
)
.apply { show() }
}
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index 11d6507c03d9..e8ceabf90af7 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -438,12 +438,6 @@ object Flags {
val LOCKSCREEN_ENABLE_LANDSCAPE =
unreleasedFlag("lockscreen.enable_landscape")
- // TODO(b/281648899): Tracking bug
- @Keep
- @JvmField
- val WALLPAPER_MULTI_CROP =
- sysPropBooleanFlag("persist.wm.debug.wallpaper_multi_crop", default = false)
-
// 1200 - predictive back
@Keep
@JvmField
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
index 017dac200431..20da00ee3daf 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
@@ -43,6 +43,7 @@ import com.android.systemui.keyguard.ui.viewmodel.KeyguardBlueprintViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardIndicationAreaViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel
import com.android.systemui.keyguard.ui.viewmodel.OccludingAppDeviceEntryMessageViewModel
+import com.android.systemui.plugins.FalsingManager
import com.android.systemui.res.R
import com.android.systemui.shade.NotificationShadeWindowView
import com.android.systemui.shade.domain.interactor.ShadeInteractor
@@ -81,6 +82,7 @@ constructor(
private val interactionJankMonitor: InteractionJankMonitor,
private val deviceEntryHapticsInteractor: DeviceEntryHapticsInteractor,
private val vibratorHelper: VibratorHelper,
+ private val falsingManager: FalsingManager,
) : CoreStartable {
private var rootViewHandle: DisposableHandle? = null
@@ -155,6 +157,7 @@ constructor(
interactionJankMonitor,
deviceEntryHapticsInteractor,
vibratorHelper,
+ falsingManager,
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
index 2d6c0e1c13b2..b51edab6dfe8 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
@@ -157,6 +157,9 @@ interface KeyguardRepository {
val lastDozeTapToWakePosition: StateFlow<Point?>
+ /** Last point that [KeyguardRootView] was tapped */
+ val lastRootViewTapPosition: MutableStateFlow<Point?>
+
/** Observable for the [StatusBarState] */
val statusBarState: StateFlow<StatusBarState>
@@ -418,6 +421,8 @@ constructor(
_lastDozeTapToWakePosition.value = position
}
+ override val lastRootViewTapPosition: MutableStateFlow<Point?> = MutableStateFlow(null)
+
override val isDreamingWithOverlay: Flow<Boolean> =
conflatedCallbackFlow {
val callback =
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
index b8c392591494..702386d3b498 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
@@ -171,6 +171,9 @@ constructor(
/** Whether the keyguard is going away. */
val isKeyguardGoingAway: Flow<Boolean> = repository.isKeyguardGoingAway
+ /** Last point that [KeyguardRootView] view was tapped */
+ val lastRootViewTapPosition: Flow<Point?> = repository.lastRootViewTapPosition.asStateFlow()
+
/** Whether the primary bouncer is showing or not. */
val primaryBouncerShowing: Flow<Boolean> = bouncerRepository.primaryBouncerShow
@@ -304,6 +307,10 @@ constructor(
repository.setClockShouldBeCentered(shouldBeCentered)
}
+ fun setLastRootViewTapPosition(point: Point?) {
+ repository.lastRootViewTapPosition.value = point
+ }
+
companion object {
private const val TAG = "KeyguardInteractor"
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
index 02c6f33ffd01..e603ead463f2 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
@@ -19,6 +19,8 @@ package com.android.systemui.keyguard.ui.binder
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.annotation.DrawableRes
+import android.annotation.SuppressLint
+import android.graphics.Point
import android.view.HapticFeedbackConstants
import android.view.View
import android.view.View.OnLayoutChangeListener
@@ -47,6 +49,7 @@ import com.android.systemui.keyguard.shared.model.TransitionState
import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel
import com.android.systemui.keyguard.ui.viewmodel.OccludingAppDeviceEntryMessageViewModel
import com.android.systemui.lifecycle.repeatWhenAttached
+import com.android.systemui.plugins.FalsingManager
import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.res.R
import com.android.systemui.shade.domain.interactor.ShadeInteractor
@@ -73,6 +76,7 @@ import kotlinx.coroutines.launch
@OptIn(ExperimentalCoroutinesApi::class)
object KeyguardRootViewBinder {
+ @SuppressLint("ClickableViewAccessibility")
@JvmStatic
fun bind(
view: ViewGroup,
@@ -87,6 +91,7 @@ object KeyguardRootViewBinder {
interactionJankMonitor: InteractionJankMonitor?,
deviceEntryHapticsInteractor: DeviceEntryHapticsInteractor?,
vibratorHelper: VibratorHelper?,
+ falsingManager: FalsingManager?,
): DisposableHandle {
var onLayoutChangeListener: OnLayoutChange? = null
val childViews = mutableMapOf<Int, View>()
@@ -94,6 +99,16 @@ object KeyguardRootViewBinder {
val burnInLayerId = R.id.burn_in_layer
val aodNotificationIconContainerId = R.id.aod_notification_icon_container
val largeClockId = R.id.lockscreen_clock_view_large
+
+ if (keyguardBottomAreaRefactor()) {
+ view.setOnTouchListener { _, event ->
+ if (falsingManager?.isFalseTap(FalsingManager.LOW_PENALTY) == false) {
+ viewModel.setRootViewLastTapPosition(Point(event.x.toInt(), event.y.toInt()))
+ }
+ false
+ }
+ }
+
val disposableHandle =
view.repeatWhenAttached {
repeatOnLifecycle(Lifecycle.State.CREATED) {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt
index 8514225fda90..11e63e76c289 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSettingsViewBinder.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.ui.binder
+import android.graphics.Rect
import android.view.View
import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
@@ -25,6 +26,8 @@ import com.android.systemui.animation.ActivityLaunchAnimator
import com.android.systemui.animation.view.LaunchableLinearLayout
import com.android.systemui.common.ui.binder.IconViewBinder
import com.android.systemui.common.ui.binder.TextViewBinder
+import com.android.systemui.keyguard.ui.viewmodel.KeyguardLongPressViewModel
+import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardSettingsMenuViewModel
import com.android.systemui.keyguard.util.WallpaperPickerIntentUtils
import com.android.systemui.keyguard.util.WallpaperPickerIntentUtils.LAUNCH_SOURCE_KEYGUARD
@@ -35,12 +38,15 @@ import com.android.systemui.statusbar.VibratorHelper
import kotlinx.coroutines.DisposableHandle
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.launch
object KeyguardSettingsViewBinder {
fun bind(
parentView: View,
viewModel: KeyguardSettingsMenuViewModel,
+ longPressViewModel: KeyguardLongPressViewModel,
+ rootViewModel: KeyguardRootViewModel,
vibratorHelper: VibratorHelper,
activityStarter: ActivityStarter
): DisposableHandle {
@@ -88,6 +94,18 @@ object KeyguardSettingsViewBinder {
}
}
}
+
+ launch {
+ rootViewModel.lastRootViewTapPosition.filterNotNull().collect { point ->
+ if (view.isVisible) {
+ val hitRect = Rect()
+ view.getHitRect(hitRect)
+ if (!hitRect.contains(point.x, point.y)) {
+ longPressViewModel.onTouchedOutside()
+ }
+ }
+ }
+ }
}
}
return disposableHandle
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
index 4eecfdefa663..03e45fdbe75f 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
@@ -376,6 +376,7 @@ constructor(
null, // jank monitor not required for preview mode
null, // device entry haptics not required preview mode
null, // device entry haptics not required for preview mode
+ null, // falsing manager not required for preview mode
)
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultSettingsPopupMenuSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultSettingsPopupMenuSection.kt
index 9a33f08386a3..4bc2d86e6b54 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultSettingsPopupMenuSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultSettingsPopupMenuSection.kt
@@ -29,15 +29,15 @@ import androidx.constraintlayout.widget.ConstraintSet.START
import androidx.constraintlayout.widget.ConstraintSet.WRAP_CONTENT
import androidx.core.view.isVisible
import com.android.systemui.Flags.keyguardBottomAreaRefactor
-import com.android.systemui.res.R
import com.android.systemui.animation.view.LaunchableLinearLayout
import com.android.systemui.dagger.qualifiers.Main
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.shared.model.KeyguardSection
import com.android.systemui.keyguard.ui.binder.KeyguardSettingsViewBinder
+import com.android.systemui.keyguard.ui.viewmodel.KeyguardLongPressViewModel
+import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardSettingsMenuViewModel
import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.res.R
import com.android.systemui.statusbar.VibratorHelper
import javax.inject.Inject
import kotlinx.coroutines.DisposableHandle
@@ -47,6 +47,8 @@ class DefaultSettingsPopupMenuSection
constructor(
@Main private val resources: Resources,
private val keyguardSettingsMenuViewModel: KeyguardSettingsMenuViewModel,
+ private val keyguardLongPressViewModel: KeyguardLongPressViewModel,
+ private val keyguardRootViewModel: KeyguardRootViewModel,
private val vibratorHelper: VibratorHelper,
private val activityStarter: ActivityStarter,
) : KeyguardSection() {
@@ -73,6 +75,8 @@ constructor(
KeyguardSettingsViewBinder.bind(
constraintLayout.requireViewById<View>(R.id.keyguard_settings_button),
keyguardSettingsMenuViewModel,
+ keyguardLongPressViewModel,
+ keyguardRootViewModel,
vibratorHelper,
activityStarter,
)
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
index 97ddbb033648..4588e02df10e 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.ui.viewmodel
+import android.graphics.Point
import android.util.MathUtils
import android.view.View.VISIBLE
import com.android.app.animation.Interpolators
@@ -101,6 +102,9 @@ constructor(
val goneToAodTransition = keyguardTransitionInteractor.transition(from = GONE, to = AOD)
+ /** Last point that the root view was tapped */
+ val lastRootViewTapPosition: Flow<Point?> = keyguardInteractor.lastRootViewTapPosition
+
/** the shared notification container bounds *on the lockscreen* */
val notificationBounds: StateFlow<NotificationContainerBounds> =
keyguardInteractor.notificationContainerBounds
@@ -262,4 +266,8 @@ constructor(
}
.toAnimatedValueFlow()
}
+
+ fun setRootViewLastTapPosition(point: Point) {
+ keyguardInteractor.setLastRootViewTapPosition(point)
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapper.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapper.kt
new file mode 100644
index 000000000000..3f30c75a6b6a
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/UiModeNightTileMapper.kt
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight.domain
+
+import android.app.UiModeManager
+import android.content.res.Resources
+import android.text.TextUtils
+import com.android.systemui.common.shared.model.Icon
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.qs.tiles.base.interactor.QSTileDataToStateMapper
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.model.UiModeNightTileModel
+import com.android.systemui.qs.tiles.viewmodel.QSTileConfig
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.res.R
+import java.time.LocalTime
+import java.time.format.DateTimeFormatter
+import javax.inject.Inject
+
+/** Maps [UiModeNightTileModel] to [QSTileState]. */
+class UiModeNightTileMapper @Inject constructor(@Main private val resources: Resources) :
+ QSTileDataToStateMapper<UiModeNightTileModel> {
+ companion object {
+ val formatter12Hour: DateTimeFormatter = DateTimeFormatter.ofPattern("hh:mm a")
+ val formatter24Hour: DateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm")
+ }
+ override fun map(config: QSTileConfig, data: UiModeNightTileModel): QSTileState =
+ with(data) {
+ QSTileState.build(resources, config.uiConfig) {
+ var shouldSetSecondaryLabel = false
+
+ if (isPowerSave) {
+ secondaryLabel =
+ resources.getString(
+ R.string.quick_settings_dark_mode_secondary_label_battery_saver
+ )
+ } else if (uiMode == UiModeManager.MODE_NIGHT_AUTO && isLocationEnabled) {
+ secondaryLabel =
+ resources.getString(
+ if (isNightMode)
+ R.string.quick_settings_dark_mode_secondary_label_until_sunrise
+ else R.string.quick_settings_dark_mode_secondary_label_on_at_sunset
+ )
+ } else if (uiMode == UiModeManager.MODE_NIGHT_CUSTOM) {
+ if (nightModeCustomType == UiModeManager.MODE_NIGHT_CUSTOM_TYPE_SCHEDULE) {
+ val time: LocalTime =
+ if (isNightMode) {
+ customNightModeEnd
+ } else {
+ customNightModeStart
+ }
+
+ val formatter: DateTimeFormatter =
+ if (is24HourFormat) formatter24Hour else formatter12Hour
+
+ secondaryLabel =
+ resources.getString(
+ if (isNightMode)
+ R.string.quick_settings_dark_mode_secondary_label_until
+ else R.string.quick_settings_dark_mode_secondary_label_on_at,
+ formatter.format(time)
+ )
+ } else if (
+ nightModeCustomType == UiModeManager.MODE_NIGHT_CUSTOM_TYPE_BEDTIME
+ ) {
+ secondaryLabel =
+ resources.getString(
+ if (isNightMode)
+ R.string
+ .quick_settings_dark_mode_secondary_label_until_bedtime_ends
+ else R.string.quick_settings_dark_mode_secondary_label_on_at_bedtime
+ )
+ } else {
+ secondaryLabel = null // undefined type of nightModeCustomType
+ shouldSetSecondaryLabel = true
+ }
+ } else {
+ secondaryLabel = null
+ shouldSetSecondaryLabel = true
+ }
+
+ contentDescription =
+ if (TextUtils.isEmpty(secondaryLabel)) label
+ else TextUtils.concat(label, ", ", secondaryLabel)
+ if (isPowerSave) {
+ activationState = QSTileState.ActivationState.UNAVAILABLE
+ if (shouldSetSecondaryLabel)
+ secondaryLabel = resources.getStringArray(R.array.tile_states_dark)[0]
+ } else {
+ activationState =
+ if (isNightMode) QSTileState.ActivationState.ACTIVE
+ else QSTileState.ActivationState.INACTIVE
+
+ if (shouldSetSecondaryLabel) {
+ secondaryLabel =
+ if (activationState == QSTileState.ActivationState.INACTIVE)
+ resources.getStringArray(R.array.tile_states_dark)[1]
+ else resources.getStringArray(R.array.tile_states_dark)[2]
+ }
+ }
+
+ val iconRes =
+ if (activationState == QSTileState.ActivationState.ACTIVE)
+ R.drawable.qs_light_dark_theme_icon_on
+ else R.drawable.qs_light_dark_theme_icon_off
+ val iconResource = Icon.Resource(iconRes, null)
+ icon = { iconResource }
+
+ supportedActions =
+ if (activationState == QSTileState.ActivationState.UNAVAILABLE)
+ setOf(QSTileState.UserAction.LONG_CLICK)
+ else setOf(QSTileState.UserAction.CLICK, QSTileState.UserAction.LONG_CLICK)
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileDataInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileDataInteractor.kt
new file mode 100644
index 000000000000..c928e8af17fc
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileDataInteractor.kt
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight.domain.interactor
+
+import android.app.UiModeManager
+import android.content.Context
+import android.content.res.Configuration
+import android.os.UserHandle
+import com.android.systemui.common.coroutine.ConflatedCallbackFlow
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.qs.tiles.base.interactor.DataUpdateTrigger
+import com.android.systemui.qs.tiles.base.interactor.QSTileDataInteractor
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.model.UiModeNightTileModel
+import com.android.systemui.statusbar.policy.BatteryController
+import com.android.systemui.statusbar.policy.ConfigurationController
+import com.android.systemui.statusbar.policy.LocationController
+import com.android.systemui.util.time.DateFormatUtil
+import javax.inject.Inject
+import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.flowOf
+
+/** Observes ui mode night state changes providing the [UiModeNightTileModel]. */
+class UiModeNightTileDataInteractor
+@Inject
+constructor(
+ @Application private val context: Context,
+ private val configurationController: ConfigurationController,
+ private val uiModeManager: UiModeManager,
+ private val batteryController: BatteryController,
+ private val locationController: LocationController,
+ private val dateFormatUtil: DateFormatUtil,
+) : QSTileDataInteractor<UiModeNightTileModel> {
+
+ override fun tileData(
+ user: UserHandle,
+ triggers: Flow<DataUpdateTrigger>
+ ): Flow<UiModeNightTileModel> =
+ ConflatedCallbackFlow.conflatedCallbackFlow {
+ // send initial state
+ trySend(createModel())
+
+ val configurationCallback =
+ object : ConfigurationController.ConfigurationListener {
+ override fun onUiModeChanged() {
+ trySend(createModel())
+ }
+ }
+ configurationController.addCallback(configurationCallback)
+
+ val batteryCallback =
+ object : BatteryController.BatteryStateChangeCallback {
+ override fun onPowerSaveChanged(isPowerSave: Boolean) {
+ trySend(createModel())
+ }
+ }
+ batteryController.addCallback(batteryCallback)
+
+ val locationCallback =
+ object : LocationController.LocationChangeCallback {
+ override fun onLocationSettingsChanged(locationEnabled: Boolean) {
+ trySend(createModel())
+ }
+ }
+ locationController.addCallback(locationCallback)
+
+ awaitClose {
+ configurationController.removeCallback(configurationCallback)
+ batteryController.removeCallback(batteryCallback)
+ locationController.removeCallback(locationCallback)
+ }
+ }
+
+ private fun createModel(): UiModeNightTileModel {
+ val uiMode = uiModeManager.nightMode
+ val nightMode =
+ (context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) ==
+ Configuration.UI_MODE_NIGHT_YES
+ val powerSave = batteryController.isPowerSave
+ val locationEnabled = locationController.isLocationEnabled
+ val nightModeCustomType = uiModeManager.nightModeCustomType
+ val use24HourFormat = dateFormatUtil.is24HourFormat
+ val customNightModeEnd = uiModeManager.customNightModeEnd
+ val customNightModeStart = uiModeManager.customNightModeStart
+
+ return UiModeNightTileModel(
+ uiMode,
+ nightMode,
+ powerSave,
+ locationEnabled,
+ nightModeCustomType,
+ use24HourFormat,
+ customNightModeEnd,
+ customNightModeStart
+ )
+ }
+
+ override fun availability(user: UserHandle): Flow<Boolean> = flowOf(true)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileUserActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileUserActionInteractor.kt
new file mode 100644
index 000000000000..00d7a629f5be
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileUserActionInteractor.kt
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight.domain.interactor
+
+import android.app.UiModeManager
+import android.content.Intent
+import android.provider.Settings
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.qs.tiles.base.actions.QSTileIntentUserInputHandler
+import com.android.systemui.qs.tiles.base.interactor.QSTileInput
+import com.android.systemui.qs.tiles.base.interactor.QSTileUserActionInteractor
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.model.UiModeNightTileModel
+import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
+import javax.inject.Inject
+import kotlin.coroutines.CoroutineContext
+import kotlinx.coroutines.withContext
+
+/** Handles ui mode night tile clicks. */
+class UiModeNightTileUserActionInteractor
+@Inject
+constructor(
+ @Background private val backgroundContext: CoroutineContext,
+ private val uiModeManager: UiModeManager,
+ private val qsTileIntentUserActionHandler: QSTileIntentUserInputHandler,
+) : QSTileUserActionInteractor<UiModeNightTileModel> {
+
+ override suspend fun handleInput(input: QSTileInput<UiModeNightTileModel>) =
+ with(input) {
+ when (action) {
+ is QSTileUserAction.Click -> {
+ if (!input.data.isPowerSave) {
+ withContext(backgroundContext) {
+ uiModeManager.setNightModeActivated(!input.data.isNightMode)
+ }
+ }
+ }
+ is QSTileUserAction.LongClick -> {
+ qsTileIntentUserActionHandler.handle(
+ action.view,
+ Intent(Settings.ACTION_DARK_THEME_SETTINGS)
+ )
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/model/UiModeNightTileModel.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/model/UiModeNightTileModel.kt
new file mode 100644
index 000000000000..4fa1306d988d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/model/UiModeNightTileModel.kt
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight.domain.model
+
+import java.time.LocalTime
+
+/**
+ * UiModeNight tile model. Quick Settings tile for: Night Mode / Dark Theme / Dark Mode.
+ *
+ * @param isNightMode is true when the NightMode is enabled;
+ */
+data class UiModeNightTileModel(
+ val uiMode: Int,
+ val isNightMode: Boolean,
+ val isPowerSave: Boolean,
+ val isLocationEnabled: Boolean,
+ val nightModeCustomType: Int,
+ val is24HourFormat: Boolean,
+ val customNightModeEnd: LocalTime,
+ val customNightModeStart: LocalTime
+)
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegate.kt
index 10d51a59e44c..3eb26f498921 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegate.kt
@@ -28,6 +28,7 @@ import android.view.MotionEvent.ACTION_MOVE
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
+import android.view.ViewGroup
import android.view.accessibility.AccessibilityNodeInfo
import android.widget.AdapterView
import android.widget.ArrayAdapter
@@ -64,10 +65,13 @@ class ScreenRecordPermissionDialogDelegate(
mediaProjectionMetricsLogger,
R.drawable.ic_screenrecord,
R.color.screenrecord_icon_color
- ), SystemUIDialog.Delegate {
+ ),
+ SystemUIDialog.Delegate {
private lateinit var tapsSwitch: Switch
+ private lateinit var tapsSwitchContainer: ViewGroup
private lateinit var tapsView: View
private lateinit var audioSwitch: Switch
+ private lateinit var audioSwitchContainer: ViewGroup
private lateinit var options: Spinner
override fun createDialog(): SystemUIDialog {
@@ -114,12 +118,17 @@ class ScreenRecordPermissionDialogDelegate(
private fun initRecordOptionsView() {
audioSwitch = dialog.requireViewById(R.id.screenrecord_audio_switch)
tapsSwitch = dialog.requireViewById(R.id.screenrecord_taps_switch)
+ audioSwitchContainer = dialog.requireViewById(R.id.screenrecord_audio_switch_container)
+ tapsSwitchContainer = dialog.requireViewById(R.id.screenrecord_taps_switch_container)
// Add these listeners so that the switch only responds to movement
// within its target region, to meet accessibility requirements
audioSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE }
tapsSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE }
+ audioSwitchContainer.setOnClickListener { audioSwitch.toggle() }
+ tapsSwitchContainer.setOnClickListener { tapsSwitch.toggle() }
+
tapsView = dialog.requireViewById(R.id.show_taps)
updateTapsViewVisibility()
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
index 8397caae438f..dd194eaade9b 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
@@ -794,6 +794,13 @@ public class QuickSettingsController implements Dumpable {
/** update Qs height state */
public void setExpansionHeight(float height) {
+ // TODO(b/277909752): remove below log when bug is fixed
+ if (mSplitShadeEnabled && mShadeExpandedFraction == 1.0f && height == 0
+ && mBarState == SHADE) {
+ Log.wtf(TAG,
+ "setting QS height to 0 in split shade while shade is open(ing). "
+ + "Value of isExpandImmediate() = " + isExpandImmediate());
+ }
int maxHeight = getMaxExpansionHeight();
height = Math.min(Math.max(
height, getMinExpansionHeight()), maxHeight);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
index 93bc96022292..af6da3fb6e51 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
@@ -146,7 +146,7 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
* When you just need a dialog, call this.
*/
public SystemUIDialog create() {
- return create(new DialogDelegate<>(){});
+ return create(new DialogDelegate<>(){}, mContext);
}
/**
@@ -155,13 +155,18 @@ public class SystemUIDialog extends AlertDialog implements ViewRootImpl.ConfigCh
*
* When you need to customize the dialog, pass it a delegate.
*/
+ public SystemUIDialog create(Delegate delegate, Context context) {
+ return create((DialogDelegate<SystemUIDialog>) delegate, context);
+ }
+
public SystemUIDialog create(Delegate delegate) {
- return create((DialogDelegate<SystemUIDialog>) delegate);
+ return create(delegate, mContext);
}
- private SystemUIDialog create(DialogDelegate<SystemUIDialog> dialogDelegate) {
+ private SystemUIDialog create(DialogDelegate<SystemUIDialog> dialogDelegate,
+ Context context) {
return new SystemUIDialog(
- mContext,
+ context,
DEFAULT_THEME,
DEFAULT_DISMISS_ON_DEVICE_LOCK,
mFeatureFlags,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/model/InternetTileModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/model/InternetTileModel.kt
index 18865900eef6..ed0eb6d44508 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/model/InternetTileModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/model/InternetTileModel.kt
@@ -29,7 +29,7 @@ import com.android.systemui.qs.tileimpl.QSTileImpl
/** Model describing the state that the QS Internet tile should be in. */
sealed interface InternetTileModel {
- val secondaryTitle: String?
+ val secondaryTitle: CharSequence?
val secondaryLabel: Text?
val iconId: Int?
val icon: QSTile.Icon?
@@ -62,7 +62,7 @@ sealed interface InternetTileModel {
}
data class Active(
- override val secondaryTitle: String? = null,
+ override val secondaryTitle: CharSequence? = null,
override val secondaryLabel: Text? = null,
override val iconId: Int? = null,
override val icon: QSTile.Icon? = null,
@@ -71,7 +71,7 @@ sealed interface InternetTileModel {
) : InternetTileModel
data class Inactive(
- override val secondaryTitle: String? = null,
+ override val secondaryTitle: CharSequence? = null,
override val secondaryLabel: Text? = null,
override val iconId: Int? = null,
override val icon: QSTile.Icon? = null,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModel.kt
index a80ea905e6e7..99b123fbd702 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModel.kt
@@ -17,13 +17,14 @@
package com.android.systemui.statusbar.pipeline.shared.ui.viewmodel
import android.content.Context
-import com.android.systemui.res.R
+import android.text.Html
import com.android.systemui.common.shared.model.ContentDescription
import com.android.systemui.common.shared.model.Text
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.qs.tileimpl.QSTileImpl
import com.android.systemui.qs.tileimpl.QSTileImpl.ResourceIcon
+import com.android.systemui.res.R
import com.android.systemui.statusbar.pipeline.airplane.data.repository.AirplaneModeRepository
import com.android.systemui.statusbar.pipeline.ethernet.domain.EthernetInteractor
import com.android.systemui.statusbar.pipeline.mobile.domain.interactor.MobileIconsInteractor
@@ -120,7 +121,7 @@ constructor(
InternetTileModel.Active(
secondaryTitle = secondary,
icon = SignalIcon(signalIcon.toSignalDrawableState()),
- stateDescription = ContentDescription.Loaded(secondary),
+ stateDescription = ContentDescription.Loaded(secondary.toString()),
contentDescription = ContentDescription.Loaded(internetLabel),
)
}
@@ -130,22 +131,25 @@ constructor(
private fun mobileDataContentConcat(
networkName: String?,
dataContentDescription: CharSequence?
- ): String {
+ ): CharSequence {
if (dataContentDescription == null) {
return networkName ?: ""
}
if (networkName == null) {
- return dataContentDescription.toString()
+ return Html.fromHtml(dataContentDescription.toString(), 0)
}
- return context.getString(
- R.string.mobile_carrier_text_format,
- networkName,
- dataContentDescription
+ return Html.fromHtml(
+ context.getString(
+ R.string.mobile_carrier_text_format,
+ networkName,
+ dataContentDescription
+ ),
+ 0
)
}
- private fun loadString(resId: Int): String? =
+ private fun loadString(resId: Int): CharSequence? =
if (resId > 0) {
context.getString(resId)
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java
index 3deb9e7414af..80c68023b4c8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardStateControllerImpl.java
@@ -216,7 +216,11 @@ public class KeyguardStateControllerImpl implements KeyguardStateController, Dum
private void notifyKeyguardFaceAuthEnabledChanged() {
// Copy the list to allow removal during callback.
- new ArrayList<>(mCallbacks).forEach(Callback::onFaceEnrolledChanged);
+ new ArrayList<>(mCallbacks).forEach(callback -> {
+ if (callback != null) {
+ callback.onFaceEnrolledChanged();
+ }
+ });
}
private void notifyUnlockedChanged() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt
index 0f2da2d09633..087e100e9b33 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt
@@ -38,6 +38,10 @@ import com.android.systemui.qs.tiles.impl.location.domain.LocationTileMapper
import com.android.systemui.qs.tiles.impl.location.domain.interactor.LocationTileDataInteractor
import com.android.systemui.qs.tiles.impl.location.domain.interactor.LocationTileUserActionInteractor
import com.android.systemui.qs.tiles.impl.location.domain.model.LocationTileModel
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.UiModeNightTileMapper
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.interactor.UiModeNightTileDataInteractor
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.interactor.UiModeNightTileUserActionInteractor
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.model.UiModeNightTileModel
import com.android.systemui.qs.tiles.viewmodel.QSTileConfig
import com.android.systemui.qs.tiles.viewmodel.QSTileUIConfig
import com.android.systemui.qs.tiles.viewmodel.QSTileViewModel
@@ -64,6 +68,7 @@ interface PolicyModule {
const val FLASHLIGHT_TILE_SPEC = "flashlight"
const val LOCATION_TILE_SPEC = "location"
const val ALARM_TILE_SPEC = "alarm"
+ const val UIMODENIGHT_TILE_SPEC = "dark"
/** Inject flashlight config */
@Provides
@@ -160,6 +165,38 @@ interface PolicyModule {
stateInteractor,
mapper,
)
+
+ /** Inject uimodenight config */
+ @Provides
+ @IntoMap
+ @StringKey(UIMODENIGHT_TILE_SPEC)
+ fun provideUiModeNightTileConfig(uiEventLogger: QsEventLogger): QSTileConfig =
+ QSTileConfig(
+ tileSpec = TileSpec.create(UIMODENIGHT_TILE_SPEC),
+ uiConfig =
+ QSTileUIConfig.Resource(
+ iconRes = R.drawable.qs_light_dark_theme_icon_off,
+ labelRes = R.string.quick_settings_ui_mode_night_label,
+ ),
+ instanceId = uiEventLogger.getNewInstanceId(),
+ )
+
+ /** Inject uimodenight into tileViewModelMap in QSModule */
+ @Provides
+ @IntoMap
+ @StringKey(UIMODENIGHT_TILE_SPEC)
+ fun provideUiModeNightTileViewModel(
+ factory: QSTileViewModelFactory.Static<UiModeNightTileModel>,
+ mapper: UiModeNightTileMapper,
+ stateInteractor: UiModeNightTileDataInteractor,
+ userActionInteractor: UiModeNightTileUserActionInteractor
+ ): QSTileViewModel =
+ factory.create(
+ TileSpec.create(UIMODENIGHT_TILE_SPEC),
+ userActionInteractor,
+ stateInteractor,
+ mapper,
+ )
}
/** Inject FlashlightTile into tileMap in QSModule */
diff --git a/packages/SystemUI/src/com/android/systemui/unfold/SysUIUnfoldModule.kt b/packages/SystemUI/src/com/android/systemui/unfold/SysUIUnfoldModule.kt
index ff73e0e2ab3f..10fc83c8b82c 100644
--- a/packages/SystemUI/src/com/android/systemui/unfold/SysUIUnfoldModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/unfold/SysUIUnfoldModule.kt
@@ -21,7 +21,6 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.shade.NotificationPanelUnfoldAnimationController
import com.android.systemui.statusbar.phone.StatusBarMoveFromCenterAnimationController
import com.android.systemui.unfold.dagger.UnfoldBg
-import com.android.systemui.unfold.progress.UnfoldTransitionProgressForwarder
import com.android.systemui.unfold.util.NaturalRotationUnfoldProgressProvider
import com.android.systemui.unfold.util.ScopedUnfoldTransitionProgressProvider
import com.android.systemui.unfold.util.UnfoldKeyguardVisibilityManager
@@ -107,20 +106,4 @@ interface SysUIUnfoldComponent {
fun getUnfoldLatencyTracker(): UnfoldLatencyTracker
fun getNaturalRotationUnfoldProgressProvider(): NaturalRotationUnfoldProgressProvider
-
- /** Creates a UnfoldTransitionProgressProvider that calculates progress in the main thread. */
- fun getUnfoldTransitionProgressProvider(): UnfoldTransitionProgressProvider
-
- /** Creates a UnfoldTransitionProgressProvider that calculates progress in the background. */
- @UnfoldBg
- fun getBgUnfoldTransitionProgressProvider(): UnfoldTransitionProgressProvider
-
- /** Creates a UnfoldTransitionProgressForwarder. */
- fun getUnfoldTransitionProgressForwarder(): UnfoldTransitionProgressForwarder
-
- /** Creates a FoldStateLoggingProvider. */
- fun getFoldStateLoggingProvider(): Optional<FoldStateLoggingProvider>
-
- /** Creates a FoldStateLogger. */
- fun getFoldStateLogger(): Optional<FoldStateLogger>
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java b/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java
index d6e6f3fc56b1..bd698ab8ad5c 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java
@@ -157,6 +157,7 @@ public class CsdWarningDialog extends SystemUIDialog
if (mCsdWarning == AudioManager.CSD_WARNING_DOSE_REPEATED_5X) {
// only show a notification in case we reached 500% of dose
show5XNotification();
+ dismissCsdDialog();
return;
}
super.show();
@@ -217,6 +218,10 @@ public class CsdWarningDialog extends SystemUIDialog
@Override
public void onDismiss(DialogInterface unused) {
+ dismissCsdDialog();
+ }
+
+ private void dismissCsdDialog() {
try {
mContext.unregisterReceiver(mReceiver);
} catch (IllegalArgumentException e) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DeviceStateRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DeviceStateRepositoryTest.kt
new file mode 100644
index 000000000000..21b8aca363ca
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DeviceStateRepositoryTest.kt
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.display.data.repository
+
+import android.hardware.devicestate.DeviceStateManager
+import android.testing.AndroidTestingRunner
+import android.testing.TestableLooper
+import androidx.test.filters.SmallTest
+import com.android.internal.R
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.FlowValue
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.display.data.repository.DeviceStateRepository.DeviceState
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.mockito.any
+import com.android.systemui.util.mockito.kotlinArgumentCaptor
+import com.android.systemui.util.mockito.mock
+import com.android.systemui.util.time.FakeSystemClock
+import com.google.common.truth.Truth.assertThat
+import kotlin.test.Test
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.UnconfinedTestDispatcher
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.runner.RunWith
+import org.mockito.Mockito.never
+import org.mockito.Mockito.verify
+
+@RunWith(AndroidTestingRunner::class)
+@TestableLooper.RunWithLooper
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+class DeviceStateRepositoryTest : SysuiTestCase() {
+
+ private val deviceStateManager = mock<DeviceStateManager>()
+ private val deviceStateManagerListener =
+ kotlinArgumentCaptor<DeviceStateManager.DeviceStateCallback>()
+
+ private val testScope = TestScope(UnconfinedTestDispatcher())
+ private val fakeExecutor = FakeExecutor(FakeSystemClock())
+
+ private lateinit var deviceStateRepository: DeviceStateRepositoryImpl
+
+ @Before
+ fun setup() {
+ mContext.orCreateTestableResources.apply {
+ addOverride(R.array.config_foldedDeviceStates, listOf(TEST_FOLDED).toIntArray())
+ addOverride(R.array.config_halfFoldedDeviceStates, TEST_HALF_FOLDED.toIntArray())
+ addOverride(R.array.config_openDeviceStates, TEST_UNFOLDED.toIntArray())
+ addOverride(R.array.config_rearDisplayDeviceStates, TEST_REAR_DISPLAY.toIntArray())
+ addOverride(
+ R.array.config_concurrentDisplayDeviceStates,
+ TEST_CONCURRENT_DISPLAY.toIntArray()
+ )
+ }
+ deviceStateRepository =
+ DeviceStateRepositoryImpl(
+ mContext,
+ deviceStateManager,
+ TestScope(UnconfinedTestDispatcher()),
+ fakeExecutor
+ )
+
+ // It should register only after there are clients collecting the flow
+ verify(deviceStateManager, never()).registerCallback(any(), any())
+ }
+
+ @Test
+ fun folded_receivesFoldedState() =
+ testScope.runTest {
+ val state = displayState()
+
+ deviceStateManagerListener.value.onStateChanged(TEST_FOLDED)
+
+ assertThat(state()).isEqualTo(DeviceState.FOLDED)
+ }
+
+ @Test
+ fun halfFolded_receivesHalfFoldedState() =
+ testScope.runTest {
+ val state = displayState()
+
+ deviceStateManagerListener.value.onStateChanged(TEST_HALF_FOLDED)
+
+ assertThat(state()).isEqualTo(DeviceState.HALF_FOLDED)
+ }
+
+ @Test
+ fun unfolded_receivesUnfoldedState() =
+ testScope.runTest {
+ val state = displayState()
+
+ deviceStateManagerListener.value.onStateChanged(TEST_UNFOLDED)
+
+ assertThat(state()).isEqualTo(DeviceState.UNFOLDED)
+ }
+
+ @Test
+ fun rearDisplay_receivesRearDisplayState() =
+ testScope.runTest {
+ val state = displayState()
+
+ deviceStateManagerListener.value.onStateChanged(TEST_REAR_DISPLAY)
+
+ assertThat(state()).isEqualTo(DeviceState.REAR_DISPLAY)
+ }
+
+ @Test
+ fun concurrentDisplay_receivesConcurrentDisplayState() =
+ testScope.runTest {
+ val state = displayState()
+
+ deviceStateManagerListener.value.onStateChanged(TEST_CONCURRENT_DISPLAY)
+
+ assertThat(state()).isEqualTo(DeviceState.CONCURRENT_DISPLAY)
+ }
+
+ @Test
+ fun unknownState_receivesUnknownState() =
+ testScope.runTest {
+ val state = displayState()
+
+ deviceStateManagerListener.value.onStateChanged(123456)
+
+ assertThat(state()).isEqualTo(DeviceState.UNKNOWN)
+ }
+
+ private fun TestScope.displayState(): FlowValue<DeviceState?> {
+ val flowValue = collectLastValue(deviceStateRepository.state)
+ verify(deviceStateManager)
+ .registerCallback(
+ any(),
+ deviceStateManagerListener.capture(),
+ )
+ return flowValue
+ }
+
+ private fun Int.toIntArray() = listOf(this).toIntArray()
+
+ private companion object {
+ // Used to fake the ids in the test. Note that there is no guarantees different devices will
+ // have the same ids (that's why the ones in this test start from 41)
+ const val TEST_FOLDED = 41
+ const val TEST_HALF_FOLDED = 42
+ const val TEST_UNFOLDED = 43
+ const val TEST_REAR_DISPLAY = 44
+ const val TEST_CONCURRENT_DISPLAY = 45
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractorTest.kt
index 1f18705edfdb..42b0f5097cad 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/display/domain/interactor/ConnectedDisplayInteractorTest.kt
@@ -28,6 +28,9 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.FlowValue
import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.display.data.repository.DeviceStateRepository
+import com.android.systemui.display.data.repository.DeviceStateRepository.DeviceState.CONCURRENT_DISPLAY
+import com.android.systemui.display.data.repository.FakeDeviceStateRepository
import com.android.systemui.display.data.repository.FakeDisplayRepository
import com.android.systemui.display.data.repository.createPendingDisplay
import com.android.systemui.display.data.repository.display
@@ -59,11 +62,13 @@ class ConnectedDisplayInteractorTest : SysuiTestCase() {
private val fakeDisplayRepository = FakeDisplayRepository()
private val fakeKeyguardRepository = FakeKeyguardRepository()
+ private val fakeDeviceStateRepository = FakeDeviceStateRepository()
private val connectedDisplayStateProvider: ConnectedDisplayInteractor =
ConnectedDisplayInteractorImpl(
virtualDeviceManager,
fakeKeyguardRepository,
fakeDisplayRepository,
+ fakeDeviceStateRepository,
UnconfinedTestDispatcher(),
)
private val testScope = TestScope(UnconfinedTestDispatcher())
@@ -283,6 +288,44 @@ class ConnectedDisplayInteractorTest : SysuiTestCase() {
assertThat(pendingDisplay).isNull()
}
+ @Test
+ fun concurrentDisplaysInProgress_started_returnsTrue() =
+ testScope.runTest {
+ val concurrentDisplaysInProgress =
+ collectLastValue(connectedDisplayStateProvider.concurrentDisplaysInProgress)
+
+ fakeDeviceStateRepository.emit(CONCURRENT_DISPLAY)
+
+ assertThat(concurrentDisplaysInProgress()).isTrue()
+ }
+
+ @Test
+ fun concurrentDisplaysInProgress_stopped_returnsFalse() =
+ testScope.runTest {
+ val concurrentDisplaysInProgress =
+ collectLastValue(connectedDisplayStateProvider.concurrentDisplaysInProgress)
+
+ fakeDeviceStateRepository.emit(CONCURRENT_DISPLAY)
+ fakeDeviceStateRepository.emit(DeviceStateRepository.DeviceState.UNKNOWN)
+
+ assertThat(concurrentDisplaysInProgress()).isFalse()
+ }
+
+ @Test
+ fun concurrentDisplaysInProgress_otherStates_returnsFalse() =
+ testScope.runTest {
+ val concurrentDisplaysInProgress =
+ collectLastValue(connectedDisplayStateProvider.concurrentDisplaysInProgress)
+
+ DeviceStateRepository.DeviceState.entries
+ .filter { it != CONCURRENT_DISPLAY }
+ .forEach { deviceState ->
+ fakeDeviceStateRepository.emit(deviceState)
+
+ assertThat(concurrentDisplaysInProgress()).isFalse()
+ }
+ }
+
private fun TestScope.lastValue(): FlowValue<State?> =
collectLastValue(connectedDisplayStateProvider.connectedDisplayState)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/events/SystemEventCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/events/SystemEventCoordinatorTest.kt
index bbc63f2009b9..ae84df55e113 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/events/SystemEventCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/events/SystemEventCoordinatorTest.kt
@@ -21,7 +21,6 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractor
import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractor.PendingDisplay
-import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractor.State.CONNECTED
import com.android.systemui.privacy.PrivacyItemController
import com.android.systemui.statusbar.policy.BatteryController
import com.android.systemui.util.mockito.any
@@ -107,5 +106,7 @@ class SystemEventCoordinatorTest : SysuiTestCase() {
get() = flow
override val pendingDisplay: Flow<PendingDisplay?>
get() = MutableSharedFlow<PendingDisplay>()
+ override val concurrentDisplaysInProgress: Flow<Boolean>
+ get() = TODO("Not yet implemented")
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt
index da6c28ad9af4..7deee5a70809 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicyTest.kt
@@ -321,5 +321,7 @@ class PhoneStatusBarPolicyTest : SysuiTestCase() {
get() = TODO("Not yet implemented")
override val pendingDisplay: Flow<PendingDisplay?>
get() = TODO("Not yet implemented")
+ override val concurrentDisplaysInProgress: Flow<Boolean>
+ get() = TODO("Not yet implemented")
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModelTest.kt
index 8405fb43e16a..22dce3a2ff64 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/InternetTileViewModelTest.kt
@@ -337,12 +337,12 @@ class InternetTileViewModelTest : SysuiTestCase() {
networkName.value = NetworkNameModel.Default("test network")
}
- assertThat(latest?.secondaryTitle).contains("test network")
+ assertThat(latest?.secondaryTitle.toString()).contains("test network")
assertThat(latest?.secondaryLabel).isNull()
assertThat(latest?.icon).isInstanceOf(SignalIcon::class.java)
assertThat(latest?.iconId).isNull()
assertThat(latest?.stateDescription.loadContentDescription(context))
- .isEqualTo(latest?.secondaryTitle)
+ .isEqualTo(latest?.secondaryTitle.toString())
assertThat(latest?.contentDescription.loadContentDescription(context))
.isEqualTo(internet)
}
diff --git a/packages/SystemUI/tests/utils/src/android/view/accessibility/AccessibilityManagerKosmos.kt b/packages/SystemUI/tests/utils/src/android/view/accessibility/AccessibilityManagerKosmos.kt
new file mode 100644
index 000000000000..a11bf6a5e79c
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/android/view/accessibility/AccessibilityManagerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view.accessibility
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.accessibilityManager by Fixture { mock<AccessibilityManager>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/internal/logging/MetricsLoggerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/internal/logging/MetricsLoggerKosmos.kt
new file mode 100644
index 000000000000..a1815c527b35
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/internal/logging/MetricsLoggerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.logging
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.metricsLogger by Fixture { mock<MetricsLogger>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/internal/statusbar/StatusBarServiceKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/internal/statusbar/StatusBarServiceKosmos.kt
new file mode 100644
index 000000000000..b1d67b8fa36d
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/internal/statusbar/StatusBarServiceKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.statusbar
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.statusBarService by Fixture { mock<IStatusBarService>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/data/repository/AccessibilityRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/data/repository/AccessibilityRepositoryKosmos.kt
new file mode 100644
index 000000000000..a464fa80d629
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/data/repository/AccessibilityRepositoryKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.accessibility.data.repository
+
+import android.view.accessibility.accessibilityManager
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.accessibilityRepository by Fixture {
+ AccessibilityRepository.invoke(a11yManager = accessibilityManager)
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/domain/interactor/AccessibilityInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/domain/interactor/AccessibilityInteractorKosmos.kt
new file mode 100644
index 000000000000..a48fe0ae1bc6
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/domain/interactor/AccessibilityInteractorKosmos.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.accessibility.domain.interactor
+
+import com.android.systemui.accessibility.data.repository.accessibilityRepository
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.accessibilityInteractor by Fixture {
+ AccessibilityInteractor(
+ a11yRepo = accessibilityRepository,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerFakeKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerFakeKosmos.kt
new file mode 100644
index 000000000000..72e1e8ee21e2
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerFakeKosmos.kt
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.classifier
+
+import com.android.systemui.kosmos.Kosmos
+
+val Kosmos.fakeFalsingManager by Kosmos.Fixture { FalsingManagerFake() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerKosmos.kt
new file mode 100644
index 000000000000..366db9cdbf03
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/classifier/FalsingManagerKosmos.kt
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.classifier
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.falsingManager by Fixture { fakeFalsingManager }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/common/domain/interactor/ConfigurationInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/common/domain/interactor/ConfigurationInteractorKosmos.kt
new file mode 100644
index 000000000000..94d9a72f0215
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/common/domain/interactor/ConfigurationInteractorKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.common.domain.interactor
+
+import com.android.systemui.common.ui.data.repository.configurationRepository
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.configurationInteractor by Fixture {
+ ConfigurationInteractorImpl(repository = configurationRepository)
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/concurrency/FakeExecutorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/concurrency/FakeExecutorKosmos.kt
new file mode 100644
index 000000000000..ea887ea791bd
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/concurrency/FakeExecutorKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.concurrency
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.time.fakeSystemClock
+
+var Kosmos.fakeExecutor by Kosmos.Fixture { FakeExecutor(fakeSystemClock) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDeviceStateRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDeviceStateRepository.kt
new file mode 100644
index 000000000000..5f6dc6e7d429
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/display/data/repository/FakeDeviceStateRepository.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.display.data.repository
+
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.StateFlow
+
+/** Fake [DeviceStateRepository] implementation for testing. */
+class FakeDeviceStateRepository : DeviceStateRepository {
+ private val flow = MutableStateFlow(DeviceStateRepository.DeviceState.UNKNOWN)
+
+ /** Emits [value] as [displays] flow value. */
+ suspend fun emit(value: DeviceStateRepository.DeviceState) = flow.emit(value)
+
+ override val state: StateFlow<DeviceStateRepository.DeviceState>
+ get() = flow
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/dump/DumpManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/dump/DumpManagerKosmos.kt
new file mode 100644
index 000000000000..7a6edd0bf0b8
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/dump/DumpManagerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.dump
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.dumpManager by Fixture { mock<DumpManager>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/WakefulnessLifecycleKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/WakefulnessLifecycleKosmos.kt
new file mode 100644
index 000000000000..934ea5f77245
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/WakefulnessLifecycleKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.keyguard
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.wakefulnessLifecycle by Fixture { mock<WakefulnessLifecycle>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
index 81a7bec52bb5..0e7c6625264c 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
@@ -119,6 +119,8 @@ class FakeKeyguardRepository @Inject constructor() : KeyguardRepository {
private val _keyguardAlpha = MutableStateFlow(1f)
override val keyguardAlpha: StateFlow<Float> = _keyguardAlpha
+ override val lastRootViewTapPosition: MutableStateFlow<Point?> = MutableStateFlow(null)
+
override fun setQuickSettingsVisible(isVisible: Boolean) {
_isQuickSettingsVisible.value = isVisible
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserverKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserverKosmos.kt
new file mode 100644
index 000000000000..61fc6c73248b
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserverKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.keyguard.domain.interactor
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.naturalScrollingSettingObserver by Fixture { mock<NaturalScrollingSettingObserver>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileKosmos.kt
new file mode 100644
index 000000000000..f0e5807ca515
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileKosmos.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.qs.qsEventLogger
+import com.android.systemui.statusbar.policy.PolicyModule
+
+val Kosmos.qsUiModeNightTileConfig by
+ Kosmos.Fixture { PolicyModule.provideUiModeNightTileConfig(qsEventLogger) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileModelHelper.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileModelHelper.kt
new file mode 100644
index 000000000000..1fe18e3f4d8e
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/tiles/impl/uimodenight/UiModeNightTileModelHelper.kt
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.qs.tiles.impl.uimodenight
+
+import android.content.res.Configuration
+import com.android.systemui.qs.tiles.impl.uimodenight.domain.model.UiModeNightTileModel
+import java.time.LocalTime
+
+object UiModeNightTileModelHelper {
+
+ const val DEFAULT_NIGHT_MODE_CUSTOM_TYPE = 0
+ val defaultCustomNightEnd: LocalTime = LocalTime.MAX
+ val defaultCustomNightStart: LocalTime = LocalTime.MIN
+
+ fun createModel(
+ nightMode: Boolean = false,
+ powerSave: Boolean = false,
+ uiMode: Int = Configuration.UI_MODE_NIGHT_NO,
+ isLocationEnabled: Boolean = true,
+ nighModeCustomType: Int = DEFAULT_NIGHT_MODE_CUSTOM_TYPE,
+ is24HourFormat: Boolean = false,
+ customNightModeEnd: LocalTime = defaultCustomNightEnd,
+ customNightModeStart: LocalTime = defaultCustomNightStart
+ ): UiModeNightTileModel {
+ return UiModeNightTileModel(
+ uiMode,
+ nightMode,
+ powerSave,
+ isLocationEnabled,
+ nighModeCustomType,
+ is24HourFormat,
+ customNightModeEnd,
+ customNightModeStart
+ )
+ }
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/data/repository/WindowRootViewVisibilityRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/data/repository/WindowRootViewVisibilityRepositoryKosmos.kt
new file mode 100644
index 000000000000..11871d552277
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/data/repository/WindowRootViewVisibilityRepositoryKosmos.kt
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.scene.data.repository
+
+import com.android.internal.statusbar.statusBarService
+import com.android.systemui.concurrency.fakeExecutor
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.windowRootViewVisibilityRepository by Fixture {
+ WindowRootViewVisibilityRepository(
+ statusBarService = statusBarService,
+ uiBgExecutor = fakeExecutor,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorKosmos.kt
new file mode 100644
index 000000000000..e50d59e9857f
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/transition/LargeScreenShadeInterpolatorKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.shade.transition
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.largeScreenShadeInterpolator by Fixture { mock<LargeScreenShadeInterpolator>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionControllerKosmos.kt
new file mode 100644
index 000000000000..e5a75d59468d
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeKeyguardTransitionControllerKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.lockscreenShadeKeyguardTransitionControllerFactory by Fixture {
+ mock<LockscreenShadeKeyguardTransitionController.Factory>()
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerKosmos.kt
new file mode 100644
index 000000000000..27679804d11f
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeQsTransitionControllerKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.lockscreenShadeQsTransitionControllerFactory by Fixture {
+ mock<LockscreenShadeQsTransitionController.Factory>()
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionControllerKosmos.kt
new file mode 100644
index 000000000000..93a7adf620d2
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeScrimTransitionControllerKosmos.kt
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import android.content.testableContext
+import com.android.systemui.dump.dumpManager
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.statusbar.phone.scrimController
+import com.android.systemui.statusbar.policy.configurationController
+import com.android.systemui.statusbar.policy.splitShadeStateController
+
+val Kosmos.lockscreenShadeScrimTransitionController by Fixture {
+ LockscreenShadeScrimTransitionController(
+ scrimController = scrimController,
+ context = testableContext,
+ configurationController = configurationController,
+ dumpManager = dumpManager,
+ splitShadeStateController = splitShadeStateController,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerKosmos.kt
new file mode 100644
index 000000000000..2752cc23f88b
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerKosmos.kt
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import android.content.testableContext
+import com.android.systemui.classifier.falsingCollector
+import com.android.systemui.classifier.falsingManager
+import com.android.systemui.dump.dumpManager
+import com.android.systemui.keyguard.domain.interactor.naturalScrollingSettingObserver
+import com.android.systemui.keyguard.wakefulnessLifecycle
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.media.controls.ui.mediaHierarchyManager
+import com.android.systemui.plugins.activityStarter
+import com.android.systemui.power.domain.interactor.powerInteractor
+import com.android.systemui.shade.data.repository.shadeRepository
+import com.android.systemui.shade.domain.interactor.shadeInteractor
+import com.android.systemui.statusbar.notification.stack.ambientState
+import com.android.systemui.statusbar.phone.keyguardBypassController
+import com.android.systemui.statusbar.phone.lsShadeTransitionLogger
+import com.android.systemui.statusbar.policy.configurationController
+import com.android.systemui.statusbar.policy.splitShadeStateController
+
+val Kosmos.lockscreenShadeTransitionController by Fixture {
+ LockscreenShadeTransitionController(
+ statusBarStateController = sysuiStatusBarStateController,
+ logger = lsShadeTransitionLogger,
+ keyguardBypassController = keyguardBypassController,
+ lockScreenUserManager = notificationLockscreenUserManager,
+ falsingCollector = falsingCollector,
+ ambientState = ambientState,
+ mediaHierarchyManager = mediaHierarchyManager,
+ scrimTransitionController = lockscreenShadeScrimTransitionController,
+ keyguardTransitionControllerFactory = lockscreenShadeKeyguardTransitionControllerFactory,
+ depthController = notificationShadeDepthController,
+ context = testableContext,
+ splitShadeOverScrollerFactory = splitShadeLockScreenOverScrollerFactory,
+ singleShadeOverScrollerFactory = singleShadeLockScreenOverScrollerFactory,
+ activityStarter = activityStarter,
+ wakefulnessLifecycle = wakefulnessLifecycle,
+ configurationController = configurationController,
+ falsingManager = falsingManager,
+ dumpManager = dumpManager,
+ qsTransitionControllerFactory = lockscreenShadeQsTransitionControllerFactory,
+ shadeRepository = shadeRepository,
+ shadeInteractor = shadeInteractor,
+ powerInteractor = powerInteractor,
+ splitShadeStateController = splitShadeStateController,
+ naturalScrollingSettingObserver = naturalScrollingSettingObserver,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/MediaHierarchyManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/MediaHierarchyManagerKosmos.kt
new file mode 100644
index 000000000000..db2cdfa58f8d
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/MediaHierarchyManagerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.media.controls.ui
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.mediaHierarchyManager by Fixture { mock<MediaHierarchyManager>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerKosmos.kt
new file mode 100644
index 000000000000..374381265cfb
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.notificationLockscreenUserManager by Fixture {
+ mock<NotificationLockscreenUserManager>()
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationShadeDepthControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationShadeDepthControllerKosmos.kt
new file mode 100644
index 000000000000..3960cd144b2d
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/NotificationShadeDepthControllerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.notificationShadeDepthController by Fixture { mock<NotificationShadeDepthController>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SingleShadeLockScreenOverScrollerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SingleShadeLockScreenOverScrollerKosmos.kt
new file mode 100644
index 000000000000..43e39c05f6e9
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SingleShadeLockScreenOverScrollerKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.singleShadeLockScreenOverScrollerFactory by Fixture {
+ mock<SingleShadeLockScreenOverScroller.Factory>()
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SplitShadeLockScreenOverScrollerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SplitShadeLockScreenOverScrollerKosmos.kt
new file mode 100644
index 000000000000..017371a6cba8
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/SplitShadeLockScreenOverScrollerKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.splitShadeLockScreenOverScrollerFactory by Fixture {
+ mock<SplitShadeLockScreenOverScroller.Factory>()
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractorKosmos.kt
new file mode 100644
index 000000000000..c1e0419e5609
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractorKosmos.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.domain.interactor
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository
+
+val Kosmos.seenNotificationsInteractor by Fixture {
+ SeenNotificationsInteractor(
+ notificationListRepository = activeNotificationListRepository,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/footer/ui/viewmodel/FooterViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/footer/ui/viewmodel/FooterViewModelKosmos.kt
new file mode 100644
index 000000000000..ff22ca00a0a6
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/footer/ui/viewmodel/FooterViewModelKosmos.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.footer.ui.viewmodel
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.shade.domain.interactor.shadeInteractor
+import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor
+import com.android.systemui.statusbar.notification.domain.interactor.seenNotificationsInteractor
+
+val Kosmos.footerViewModel by Fixture {
+ FooterViewModel(
+ activeNotificationsInteractor = activeNotificationsInteractor,
+ seenNotificationsInteractor = seenNotificationsInteractor,
+ shadeInteractor = shadeInteractor,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorKosmos.kt
index e7bd5ea2b174..5c8fe0d5a81e 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorKosmos.kt
@@ -20,31 +20,29 @@ package com.android.systemui.statusbar.notification.icon.domain.interactor
import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
import com.android.systemui.statusbar.data.repository.notificationListenerSettingsRepository
import com.android.systemui.statusbar.notification.data.repository.notificationsKeyguardViewStateRepository
import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor
import com.android.wm.shell.bubbles.bubblesOptional
import kotlinx.coroutines.ExperimentalCoroutinesApi
-val Kosmos.alwaysOnDisplayNotificationIconsInteractor by
- Kosmos.Fixture {
- AlwaysOnDisplayNotificationIconsInteractor(
- deviceEntryInteractor = deviceEntryInteractor,
- iconsInteractor = notificationIconsInteractor,
- )
- }
-val Kosmos.statusBarNotificationIconsInteractor by
- Kosmos.Fixture {
- StatusBarNotificationIconsInteractor(
- iconsInteractor = notificationIconsInteractor,
- settingsRepository = notificationListenerSettingsRepository,
- )
- }
-val Kosmos.notificationIconsInteractor by
- Kosmos.Fixture {
- NotificationIconsInteractor(
- activeNotificationsInteractor = activeNotificationsInteractor,
- bubbles = bubblesOptional,
- keyguardViewStateRepository = notificationsKeyguardViewStateRepository,
- )
- }
+val Kosmos.alwaysOnDisplayNotificationIconsInteractor by Fixture {
+ AlwaysOnDisplayNotificationIconsInteractor(
+ deviceEntryInteractor = deviceEntryInteractor,
+ iconsInteractor = notificationIconsInteractor,
+ )
+}
+val Kosmos.statusBarNotificationIconsInteractor by Fixture {
+ StatusBarNotificationIconsInteractor(
+ iconsInteractor = notificationIconsInteractor,
+ settingsRepository = notificationListenerSettingsRepository,
+ )
+}
+val Kosmos.notificationIconsInteractor by Fixture {
+ NotificationIconsInteractor(
+ activeNotificationsInteractor = activeNotificationsInteractor,
+ bubbles = bubblesOptional,
+ keyguardViewStateRepository = notificationsKeyguardViewStateRepository,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/ShelfNotificationIconViewStoreKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/ShelfNotificationIconViewStoreKosmos.kt
new file mode 100644
index 000000000000..f7f16a4671f9
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/ShelfNotificationIconViewStoreKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.icon.ui.viewbinder
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.statusbar.notification.stack.ui.viewbinder.notifCollection
+
+val Kosmos.shelfNotificationIconViewStore by Fixture {
+ ShelfNotificationIconViewStore(notifCollection = notifCollection)
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/StatusBarIconViewBindingFailureTrackerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/StatusBarIconViewBindingFailureTrackerKosmos.kt
new file mode 100644
index 000000000000..dbd7c6b7d0c7
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/StatusBarIconViewBindingFailureTrackerKosmos.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.icon.ui.viewbinder
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.statusBarIconViewBindingFailureTracker by Fixture {
+ StatusBarIconViewBindingFailureTracker()
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerShelfViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerShelfViewModelKosmos.kt
new file mode 100644
index 000000000000..d679bb696ce6
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerShelfViewModelKosmos.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.icon.ui.viewmodel
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.statusbar.notification.icon.domain.interactor.notificationIconsInteractor
+
+val Kosmos.notificationIconContainerShelfViewModel by
+ Kosmos.Fixture {
+ NotificationIconContainerShelfViewModel(
+ interactor = notificationIconsInteractor,
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/ActivatableNotificationViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/ActivatableNotificationViewModelKosmos.kt
new file mode 100644
index 000000000000..2523975c182c
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/ActivatableNotificationViewModelKosmos.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.row.ui.viewmodel
+
+import com.android.systemui.accessibility.domain.interactor.accessibilityInteractor
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.activatableNotificationViewModel by Fixture {
+ ActivatableNotificationViewModel.invoke(
+ a11yInteractor = accessibilityInteractor,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/domain/interactor/NotificationShelfInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/domain/interactor/NotificationShelfInteractorKosmos.kt
new file mode 100644
index 000000000000..2057b849c069
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/domain/interactor/NotificationShelfInteractorKosmos.kt
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.shelf.domain.interactor
+
+import com.android.systemui.keyguard.data.repository.deviceEntryFaceAuthRepository
+import com.android.systemui.keyguard.data.repository.keyguardRepository
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.power.domain.interactor.powerInteractor
+import com.android.systemui.statusbar.lockscreenShadeTransitionController
+
+val Kosmos.notificationShelfInteractor by Fixture {
+ NotificationShelfInteractor(
+ keyguardRepository = keyguardRepository,
+ deviceEntryFaceAuthRepository = deviceEntryFaceAuthRepository,
+ powerInteractor = powerInteractor,
+ keyguardTransitionController = lockscreenShadeTransitionController,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelKosmos.kt
new file mode 100644
index 000000000000..988172c7bb13
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelKosmos.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.shelf.ui.viewmodel
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.statusbar.notification.icon.ui.viewmodel.notificationIconContainerShelfViewModel
+import com.android.systemui.statusbar.notification.row.ui.viewmodel.activatableNotificationViewModel
+import com.android.systemui.statusbar.notification.shelf.domain.interactor.notificationShelfInteractor
+
+val Kosmos.notificationShelfViewModel by Fixture {
+ NotificationShelfViewModel(
+ interactor = notificationShelfInteractor,
+ activatableViewModel = activatableNotificationViewModel,
+ icons = notificationIconContainerShelfViewModel,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/AmbientStateKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/AmbientStateKosmos.kt
new file mode 100644
index 000000000000..83ac330ee3b4
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/AmbientStateKosmos.kt
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack
+
+import android.content.testableContext
+import com.android.systemui.dump.dumpManager
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.shade.transition.largeScreenShadeInterpolator
+import com.android.systemui.statusbar.phone.statusBarKeyguardViewManager
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+
+@OptIn(ExperimentalCoroutinesApi::class)
+val Kosmos.ambientState by Fixture {
+ AmbientState(
+ /*context=*/ testableContext,
+ /*dumpManager=*/ dumpManager,
+ /*sectionProvider=*/ stackScrollAlgorithmSectionProvider,
+ /*bypassController=*/ stackScrollAlgorithmBypassController,
+ /*statusBarKeyguardViewManager=*/ statusBarKeyguardViewManager,
+ /*largeScreenShadeInterpolator=*/ largeScreenShadeInterpolator,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmKosmos.kt
new file mode 100644
index 000000000000..67343c95f6e1
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmKosmos.kt
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.stackScrollAlgorithmSectionProvider by Fixture {
+ mock<StackScrollAlgorithm.SectionProvider>()
+}
+
+var Kosmos.stackScrollAlgorithmBypassController by Fixture {
+ mock<StackScrollAlgorithm.BypassController>()
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/domain/interactor/HideNotificationsInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/domain/interactor/HideNotificationsInteractorKosmos.kt
new file mode 100644
index 000000000000..baca8b2ef476
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/domain/interactor/HideNotificationsInteractorKosmos.kt
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack.domain.interactor
+
+import com.android.systemui.common.domain.interactor.configurationInteractor
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.power.domain.interactor.powerInteractor
+import com.android.systemui.unfold.domain.interactor.unfoldTransitionInteractor
+import com.android.systemui.util.animation.data.repository.animationStatusRepository
+
+val Kosmos.hideNotificationsInteractor by Fixture {
+ HideNotificationsInteractor(
+ unfoldTransitionInteractor = unfoldTransitionInteractor,
+ configurationInteractor = configurationInteractor,
+ animationsStatus = animationStatusRepository,
+ powerInteractor = powerInteractor,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotifCollectionKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotifCollectionKosmos.kt
new file mode 100644
index 000000000000..d98f49684999
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotifCollectionKosmos.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack.ui.viewbinder
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.statusbar.notification.collection.NotifCollection
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.notifCollection by Fixture { mock<NotifCollection>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationListViewBinderKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationListViewBinderKosmos.kt
new file mode 100644
index 000000000000..75e5aeafd52d
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationListViewBinderKosmos.kt
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack.ui.viewbinder
+
+import com.android.internal.logging.metricsLogger
+import com.android.systemui.classifier.falsingManager
+import com.android.systemui.common.ui.configurationState
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.statusbar.notification.icon.ui.viewbinder.shelfNotificationIconViewStore
+import com.android.systemui.statusbar.notification.icon.ui.viewbinder.statusBarIconViewBindingFailureTracker
+import com.android.systemui.statusbar.notification.stack.ui.viewmodel.notificationListViewModel
+import com.android.systemui.statusbar.phone.notificationIconAreaController
+import com.android.systemui.statusbar.policy.configurationController
+
+val Kosmos.notificationListViewBinder by Fixture {
+ NotificationListViewBinder(
+ viewModel = notificationListViewModel,
+ backgroundDispatcher = testDispatcher,
+ configuration = configurationState,
+ configurationController = configurationController,
+ falsingManager = falsingManager,
+ iconAreaController = notificationIconAreaController,
+ iconViewBindingFailureTracker = statusBarIconViewBindingFailureTracker,
+ metricsLogger = metricsLogger,
+ shelfIconViewStore = shelfNotificationIconViewStore,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/HideListViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/HideListViewModelKosmos.kt
new file mode 100644
index 000000000000..0dc62bfdd3e1
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/HideListViewModelKosmos.kt
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack.ui.viewmodel
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.statusbar.notification.stack.domain.interactor.hideNotificationsInteractor
+import javax.inject.Provider
+
+val Kosmos.hideListViewModel by Fixture {
+ HideListViewModel(hideNotificationsInteractor = Provider { hideNotificationsInteractor })
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelKosmos.kt
new file mode 100644
index 000000000000..44f31343b06d
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelKosmos.kt
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack.ui.viewmodel
+
+import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.shade.domain.interactor.shadeInteractor
+import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor
+import com.android.systemui.statusbar.notification.domain.interactor.seenNotificationsInteractor
+import com.android.systemui.statusbar.notification.footer.ui.viewmodel.footerViewModel
+import com.android.systemui.statusbar.notification.shelf.ui.viewmodel.notificationShelfViewModel
+import com.android.systemui.statusbar.policy.domain.interactor.zenModeInteractor
+import java.util.Optional
+
+val Kosmos.notificationListViewModel by Fixture {
+ NotificationListViewModel(
+ shelf = notificationShelfViewModel,
+ hideListViewModel = hideListViewModel,
+ footer = Optional.of(footerViewModel),
+ activeNotificationsInteractor = activeNotificationsInteractor,
+ keyguardTransitionInteractor = keyguardTransitionInteractor,
+ seenNotificationsInteractor = seenNotificationsInteractor,
+ shadeInteractor = shadeInteractor,
+ zenModeInteractor = zenModeInteractor,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt
new file mode 100644
index 000000000000..e4313bb168b8
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.stack.ui.viewmodel
+
+import com.android.systemui.keyguard.data.repository.keyguardRepository
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.power.domain.interactor.powerInteractor
+import com.android.systemui.scene.data.repository.windowRootViewVisibilityRepository
+import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor
+import com.android.systemui.statusbar.policy.headsUpManager
+
+val Kosmos.windowRootViewVisibilityInteractor by Fixture {
+ WindowRootViewVisibilityInteractor(
+ scope = testScope,
+ windowRootViewVisibilityRepository = windowRootViewVisibilityRepository,
+ keyguardRepository = keyguardRepository,
+ headsUpManager = headsUpManager,
+ powerInteractor = powerInteractor,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/KeyguardBypassControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/KeyguardBypassControllerKosmos.kt
new file mode 100644
index 000000000000..f4a1da037b2e
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/KeyguardBypassControllerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.phone
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.keyguardBypassController by Fixture { mock<KeyguardBypassController>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/LSShadeTransitionLoggerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/LSShadeTransitionLoggerKosmos.kt
new file mode 100644
index 000000000000..496102f9a2cf
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/LSShadeTransitionLoggerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.phone
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.lsShadeTransitionLogger by Fixture { mock<LSShadeTransitionLogger>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/NotificationIconAreaControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/NotificationIconAreaControllerKosmos.kt
new file mode 100644
index 000000000000..d44e061a95ea
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/NotificationIconAreaControllerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.phone
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.notificationIconAreaController by Fixture { mock<NotificationIconAreaController>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/ScrimControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/ScrimControllerKosmos.kt
new file mode 100644
index 000000000000..3ff57022d336
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/ScrimControllerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.phone
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.scrimController by Fixture { mock<ScrimController>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerKosmos.kt
index 4e15ea2d9377..ddce4c896c14 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerKosmos.kt
@@ -18,5 +18,7 @@ package com.android.systemui.statusbar.phone
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.util.mockito.mock
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+@OptIn(ExperimentalCoroutinesApi::class)
var Kosmos.statusBarKeyguardViewManager by Kosmos.Fixture { mock<StatusBarKeyguardViewManager>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/HeadsUpManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/HeadsUpManagerKosmos.kt
new file mode 100644
index 000000000000..a4db00c9b6ae
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/HeadsUpManagerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.headsUpManager by Fixture { mock<HeadsUpManager>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/ZenModeRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/ZenModeRepositoryKosmos.kt
new file mode 100644
index 000000000000..1ec751193747
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/ZenModeRepositoryKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy.data.repository
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.zenModeRepository by Fixture { fakeZenModeRepository }
+val Kosmos.fakeZenModeRepository by Fixture { FakeZenModeRepository() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorKosmos.kt
new file mode 100644
index 000000000000..78242b69854b
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorKosmos.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy.domain.interactor
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.statusbar.policy.data.repository.zenModeRepository
+
+val Kosmos.zenModeInteractor by Fixture {
+ ZenModeInteractor(
+ repository = zenModeRepository,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/UnfoldTransitionProgressProviderKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/UnfoldTransitionProgressProviderKosmos.kt
new file mode 100644
index 000000000000..7c54a5707bf4
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/UnfoldTransitionProgressProviderKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.unfold
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.unfoldTransitionProgressProvider by Fixture { mock<UnfoldTransitionProgressProvider>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/data/repository/UnfoldTransitionRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/data/repository/UnfoldTransitionRepositoryKosmos.kt
new file mode 100644
index 000000000000..2a250c886473
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/data/repository/UnfoldTransitionRepositoryKosmos.kt
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.unfold.data.repository
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.unfold.unfoldTransitionProgressProvider
+import java.util.Optional
+
+val Kosmos.unfoldTransitionRepository by Fixture {
+ UnfoldTransitionRepositoryImpl(
+ unfoldProgressProvider = Optional.of(unfoldTransitionProgressProvider),
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/domain/interactor/UnfoldTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/domain/interactor/UnfoldTransitionInteractorKosmos.kt
new file mode 100644
index 000000000000..d03616ab98e8
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/domain/interactor/UnfoldTransitionInteractorKosmos.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.unfold.domain.interactor
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.unfold.data.repository.unfoldTransitionRepository
+
+val Kosmos.unfoldTransitionInteractor by Fixture {
+ UnfoldTransitionInteractorImpl(repository = unfoldTransitionRepository)
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/util/animation/data/repository/AnimationStatusRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/util/animation/data/repository/AnimationStatusRepositoryKosmos.kt
new file mode 100644
index 000000000000..63ea085b572c
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/util/animation/data/repository/AnimationStatusRepositoryKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.util.animation.data.repository
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+
+val Kosmos.animationStatusRepository by Fixture { fakeAnimationStatusRepository }
+val Kosmos.fakeAnimationStatusRepository by Fixture { FakeAnimationStatusRepository() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeBatteryController.java b/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeBatteryController.java
index 209cac6688a2..5ae033c9870d 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeBatteryController.java
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeBatteryController.java
@@ -22,11 +22,16 @@ import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
public class FakeBatteryController extends BaseLeakChecker<BatteryStateChangeCallback>
implements BatteryController {
private boolean mIsAodPowerSave = false;
private boolean mWirelessCharging;
+ private boolean mPowerSaveMode = false;
+
+ private final List<BatteryStateChangeCallback> mCallbacks = new ArrayList<>();
public FakeBatteryController(LeakCheck test) {
super(test, "battery");
@@ -44,12 +49,18 @@ public class FakeBatteryController extends BaseLeakChecker<BatteryStateChangeCal
@Override
public void setPowerSaveMode(boolean powerSave) {
-
+ mPowerSaveMode = powerSave;
+ for (BatteryStateChangeCallback callback: mCallbacks) {
+ callback.onPowerSaveChanged(powerSave);
+ }
}
+ /**
+ * Note: this method ignores the View argument
+ */
@Override
public void setPowerSaveMode(boolean powerSave, View view) {
-
+ setPowerSaveMode(powerSave);
}
@Override
@@ -59,7 +70,7 @@ public class FakeBatteryController extends BaseLeakChecker<BatteryStateChangeCal
@Override
public boolean isPowerSave() {
- return false;
+ return mPowerSaveMode;
}
@Override
@@ -79,4 +90,14 @@ public class FakeBatteryController extends BaseLeakChecker<BatteryStateChangeCal
public void setWirelessCharging(boolean wirelessCharging) {
mWirelessCharging = wirelessCharging;
}
+
+ @Override
+ public void addCallback(BatteryStateChangeCallback listener) {
+ mCallbacks.add(listener);
+ }
+
+ @Override
+ public void removeCallback(BatteryStateChangeCallback listener) {
+ mCallbacks.remove(listener);
+ }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeLocationController.java b/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeLocationController.java
index 3c6327514f24..442d15b7bc95 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeLocationController.java
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/FakeLocationController.java
@@ -26,6 +26,7 @@ public class FakeLocationController extends BaseLeakChecker<LocationChangeCallba
implements LocationController {
private final List<LocationChangeCallback> mCallbacks = new ArrayList<>();
+ private boolean mLocationEnabled = false;
public FakeLocationController(LeakCheck test) {
super(test, "location");
@@ -38,13 +39,14 @@ public class FakeLocationController extends BaseLeakChecker<LocationChangeCallba
@Override
public boolean isLocationEnabled() {
- return false;
+ return mLocationEnabled;
}
@Override
public boolean setLocationEnabled(boolean enabled) {
+ mLocationEnabled = enabled;
mCallbacks.forEach(callback -> callback.onLocationSettingsChanged(enabled));
- return false;
+ return true;
}
@Override
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 5bffe80a5c69..440e99632c86 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -4406,6 +4406,28 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
}
@Override
+ public boolean isAccessibilityServiceWarningRequired(AccessibilityServiceInfo info) {
+ mSecurityPolicy.enforceCallingOrSelfPermission(Manifest.permission.MANAGE_ACCESSIBILITY);
+
+ // Warning is not required if the service is already enabled.
+ synchronized (mLock) {
+ final AccessibilityUserState userState = getCurrentUserStateLocked();
+ if (userState.getEnabledServicesLocked().contains(info.getComponentName())) {
+ return false;
+ }
+ }
+ // Warning is not required if the service is already assigned to a shortcut.
+ for (int shortcutType : AccessibilityManager.SHORTCUT_TYPES) {
+ if (getAccessibilityShortcutTargets(shortcutType).contains(
+ info.getComponentName().flattenToString())) {
+ return false;
+ }
+ }
+ // Warning is required by default.
+ return true;
+ }
+
+ @Override
public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
if (!DumpUtils.checkDumpPermission(mContext, LOG_TAG, pw)) return;
synchronized (mLock) {
diff --git a/services/core/Android.bp b/services/core/Android.bp
index 8ed3fd696bda..b4cf34e00c53 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -201,6 +201,7 @@ java_library_static {
"biometrics_flags_lib",
"am_flags_lib",
"com_android_wm_shell_flags_lib",
+ "com.android.server.utils_aconfig-java",
"service-jobscheduler-deviceidle.flags-aconfig-java",
],
javac_shard_size: 50,
diff --git a/services/core/java/com/android/server/BinaryTransparencyService.java b/services/core/java/com/android/server/BinaryTransparencyService.java
index eb3ec2444210..05d07ae761c1 100644
--- a/services/core/java/com/android/server/BinaryTransparencyService.java
+++ b/services/core/java/com/android/server/BinaryTransparencyService.java
@@ -1464,15 +1464,17 @@ public class BinaryTransparencyService extends SystemService {
FrameworkStatsLog.write(FrameworkStatsLog.VBMETA_DIGEST_REPORTED, mVbmetaDigest);
if (android.security.Flags.binaryTransparencySepolicyHash()) {
- byte[] sepolicyHash = PackageUtils.computeSha256DigestForLargeFileAsBytes(
- "/sys/fs/selinux/policy", PackageUtils.createLargeFileBuffer());
- String sepolicyHashEncoded = null;
- if (sepolicyHash != null) {
- sepolicyHashEncoded = HexEncoding.encodeToString(sepolicyHash, false);
- Slog.d(TAG, "sepolicy hash: " + sepolicyHashEncoded);
- }
- FrameworkStatsLog.write(FrameworkStatsLog.BOOT_INTEGRITY_INFO_REPORTED,
- sepolicyHashEncoded, mVbmetaDigest);
+ IoThread.getExecutor().execute(() -> {
+ byte[] sepolicyHash = PackageUtils.computeSha256DigestForLargeFileAsBytes(
+ "/sys/fs/selinux/policy", PackageUtils.createLargeFileBuffer());
+ String sepolicyHashEncoded = null;
+ if (sepolicyHash != null) {
+ sepolicyHashEncoded = HexEncoding.encodeToString(sepolicyHash, false);
+ Slog.d(TAG, "sepolicy hash: " + sepolicyHashEncoded);
+ }
+ FrameworkStatsLog.write(FrameworkStatsLog.BOOT_INTEGRITY_INFO_REPORTED,
+ sepolicyHashEncoded, mVbmetaDigest);
+ });
}
}
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index 382ee6e0c0a6..4bb9f4f27b64 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -103,7 +103,7 @@ public class Watchdog implements Dumpable {
// will be half the full timeout).
//
// The pre-watchdog event is similar to a full watchdog except it does not crash system server.
- private static final int PRE_WATCHDOG_TIMEOUT_RATIO = 3;
+ private static final int PRE_WATCHDOG_TIMEOUT_RATIO = 4;
// These are temporally ordered: larger values as lateness increases
static final int COMPLETED = 0;
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 5f1a7e7e8123..71916843fe0b 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -241,6 +241,7 @@ import com.android.server.am.LowMemDetector.MemFactor;
import com.android.server.am.ServiceRecord.ShortFgsInfo;
import com.android.server.pm.KnownPackages;
import com.android.server.uri.NeededUriGrants;
+import com.android.server.utils.AnrTimer;
import com.android.server.wm.ActivityServiceConnectionsHolder;
import java.io.FileDescriptor;
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 469f209eb9b5..3e533a6ce601 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -475,6 +475,7 @@ import com.android.server.sdksandbox.SdkSandboxManagerLocal;
import com.android.server.uri.GrantUri;
import com.android.server.uri.NeededUriGrants;
import com.android.server.uri.UriGrantsManagerInternal;
+import com.android.server.utils.AnrTimer;
import com.android.server.utils.PriorityDump;
import com.android.server.utils.Slogf;
import com.android.server.utils.TimingsTraceAndSlog;
@@ -1709,19 +1710,23 @@ public class ActivityManagerService extends IActivityManager.Stub
private static final int INDEX_NATIVE_PSS = 0;
private static final int INDEX_NATIVE_SWAP_PSS = 1;
private static final int INDEX_NATIVE_RSS = 2;
- private static final int INDEX_DALVIK_PSS = 3;
- private static final int INDEX_DALVIK_SWAP_PSS = 4;
- private static final int INDEX_DALVIK_RSS = 5;
- private static final int INDEX_OTHER_PSS = 6;
- private static final int INDEX_OTHER_SWAP_PSS = 7;
- private static final int INDEX_OTHER_RSS = 8;
- private static final int INDEX_TOTAL_PSS = 9;
- private static final int INDEX_TOTAL_SWAP_PSS = 10;
- private static final int INDEX_TOTAL_RSS = 11;
- private static final int INDEX_TOTAL_NATIVE_PSS = 12;
- private static final int INDEX_TOTAL_MEMTRACK_GRAPHICS = 13;
- private static final int INDEX_TOTAL_MEMTRACK_GL = 14;
- private static final int INDEX_LAST = 15;
+ private static final int INDEX_NATIVE_PRIVATE_DIRTY = 3;
+ private static final int INDEX_DALVIK_PSS = 4;
+ private static final int INDEX_DALVIK_SWAP_PSS = 5;
+ private static final int INDEX_DALVIK_RSS = 6;
+ private static final int INDEX_DALVIK_PRIVATE_DIRTY = 7;
+ private static final int INDEX_OTHER_PSS = 8;
+ private static final int INDEX_OTHER_SWAP_PSS = 9;
+ private static final int INDEX_OTHER_RSS = 10;
+ private static final int INDEX_OTHER_PRIVATE_DIRTY = 11;
+ private static final int INDEX_TOTAL_PSS = 12;
+ private static final int INDEX_TOTAL_SWAP_PSS = 13;
+ private static final int INDEX_TOTAL_RSS = 14;
+ private static final int INDEX_TOTAL_PRIVATE_DIRTY = 15;
+ private static final int INDEX_TOTAL_NATIVE_PSS = 16;
+ private static final int INDEX_TOTAL_MEMTRACK_GRAPHICS = 17;
+ private static final int INDEX_TOTAL_MEMTRACK_GL = 18;
+ private static final int INDEX_LAST = 19;
/**
* Used to notify activity lifecycle events.
@@ -11711,13 +11716,14 @@ public class ActivityManagerService extends IActivityManager.Stub
final long pss;
final long swapPss;
final long mRss;
+ final long mPrivateDirty;
final int id; // pid
final int userId;
final boolean hasActivities;
ArrayList<MemItem> subitems;
- MemItem(String label, String shortLabel, long pss, long swapPss, long rss, int id,
- @UserIdInt int userId,
+ MemItem(String label, String shortLabel, long pss, long swapPss, long rss,
+ long privateDirty, int id, @UserIdInt int userId,
boolean hasActivities) {
this.isProc = true;
this.label = label;
@@ -11725,18 +11731,21 @@ public class ActivityManagerService extends IActivityManager.Stub
this.pss = pss;
this.swapPss = swapPss;
this.mRss = rss;
+ this.mPrivateDirty = privateDirty;
this.id = id;
this.userId = userId;
this.hasActivities = hasActivities;
}
- MemItem(String label, String shortLabel, long pss, long swapPss, long rss, int id) {
+ MemItem(String label, String shortLabel, long pss, long swapPss, long rss,
+ long privateDirty, int id) {
this.isProc = false;
this.label = label;
this.shortLabel = shortLabel;
this.pss = pss;
this.swapPss = swapPss;
this.mRss = rss;
+ this.mPrivateDirty = privateDirty;
this.id = id;
this.userId = UserHandle.USER_SYSTEM;
this.hasActivities = false;
@@ -11761,7 +11770,7 @@ public class ActivityManagerService extends IActivityManager.Stub
static final void dumpMemItems(PrintWriter pw, String prefix, String tag,
ArrayList<MemItem> items, boolean sort, boolean isCompact, boolean dumpPss,
- boolean dumpSwapPss) {
+ boolean dumpSwapPss, boolean dumpPrivateDirty) {
if (sort && !isCompact) {
sortMemItems(items, dumpPss);
}
@@ -11769,14 +11778,18 @@ public class ActivityManagerService extends IActivityManager.Stub
for (int i=0; i<items.size(); i++) {
MemItem mi = items.get(i);
if (!isCompact) {
- if (dumpPss && dumpSwapPss) {
- pw.printf("%s%s: %-60s (%s in swap)\n", prefix, stringifyKBSize(mi.pss),
- mi.label, stringifyKBSize(mi.swapPss));
- } else {
- pw.printf("%s%s: %s%s\n", prefix, stringifyKBSize(dumpPss ? mi.pss : mi.mRss),
+ pw.printf("%s%s: %s%s\n", prefix, stringifyKBSize(dumpPss ? mi.pss : mi.mRss),
mi.label,
mi.userId != UserHandle.USER_SYSTEM ? " (user " + mi.userId + ")" : "");
+ if (dumpPss && dumpSwapPss) {
+ pw.printf("(%s in swap%s", stringifyKBSize(mi.swapPss),
+ dumpPrivateDirty ? ", " : ")");
}
+ if (dumpPrivateDirty) {
+ pw.printf("%s%s private dirty)", dumpSwapPss ? "" : "(",
+ stringifyKBSize(mi.mPrivateDirty));
+ }
+ pw.printf("\n");
} else if (mi.isProc) {
pw.print("proc,"); pw.print(tag); pw.print(","); pw.print(mi.shortLabel);
pw.print(","); pw.print(mi.id); pw.print(",");
@@ -11790,7 +11803,7 @@ public class ActivityManagerService extends IActivityManager.Stub
}
if (mi.subitems != null) {
dumpMemItems(pw, prefix + " ", mi.shortLabel, mi.subitems,
- true, isCompact, dumpPss, dumpSwapPss);
+ true, isCompact, dumpPss, dumpSwapPss, dumpPrivateDirty);
}
}
}
@@ -11958,6 +11971,7 @@ public class ActivityManagerService extends IActivityManager.Stub
boolean isCheckinRequest;
boolean dumpSwapPss;
boolean dumpProto;
+ boolean mDumpPrivateDirty;
}
@NeverCompile // Avoid size overhead of debugging code.
@@ -11976,6 +11990,7 @@ public class ActivityManagerService extends IActivityManager.Stub
opts.isCheckinRequest = false;
opts.dumpSwapPss = false;
opts.dumpProto = asProto;
+ opts.mDumpPrivateDirty = false;
int opti = 0;
while (opti < args.length) {
@@ -11998,6 +12013,8 @@ public class ActivityManagerService extends IActivityManager.Stub
opts.dumpSummaryOnly = true;
} else if ("-S".equals(opt)) {
opts.dumpSwapPss = true;
+ } else if ("-p".equals(opt)) {
+ opts.mDumpPrivateDirty = true;
} else if ("--unreachable".equals(opt)) {
opts.dumpUnreachable = true;
} else if ("--oom".equals(opt)) {
@@ -12018,6 +12035,7 @@ public class ActivityManagerService extends IActivityManager.Stub
pw.println(" -c: dump in a compact machine-parseable representation.");
pw.println(" -s: dump only summary of application memory usage.");
pw.println(" -S: dump also SwapPss.");
+ pw.println(" -p: dump also private dirty memory usage.");
pw.println(" --oom: only show processes organized by oom adj.");
pw.println(" --local: only collect details locally, don't call process.");
pw.println(" --package: interpret process arg as package, dumping all");
@@ -12136,14 +12154,18 @@ public class ActivityManagerService extends IActivityManager.Stub
EmptyArray.LONG;
long[] dalvikSubitemRss = opts.dumpDalvik ? new long[Debug.MemoryInfo.NUM_DVK_STATS] :
EmptyArray.LONG;
+ long[] dalvikSubitemPrivateDirty = opts.dumpDalvik
+ ? new long[Debug.MemoryInfo.NUM_DVK_STATS] : EmptyArray.LONG;
long[] miscPss = new long[Debug.MemoryInfo.NUM_OTHER_STATS];
long[] miscSwapPss = new long[Debug.MemoryInfo.NUM_OTHER_STATS];
long[] miscRss = new long[Debug.MemoryInfo.NUM_OTHER_STATS];
+ long[] miscPrivateDirty = new long[Debug.MemoryInfo.NUM_OTHER_STATS];
long[] memtrackTmp = new long[4];
long oomPss[] = new long[DUMP_MEM_OOM_LABEL.length];
long oomSwapPss[] = new long[DUMP_MEM_OOM_LABEL.length];
long[] oomRss = new long[DUMP_MEM_OOM_LABEL.length];
+ long[] oomPrivateDirty = new long[DUMP_MEM_OOM_LABEL.length];
ArrayList<MemItem>[] oomProcs = (ArrayList<MemItem>[])
new ArrayList[DUMP_MEM_OOM_LABEL.length];
@@ -12239,6 +12261,7 @@ public class ActivityManagerService extends IActivityManager.Stub
final long myTotalUss = mi.getTotalUss();
final long myTotalRss = mi.getTotalRss();
final long myTotalSwapPss = mi.getTotalSwappedOutPss();
+ final long myTotalPrivateDirty = mi.getTotalPrivateDirty();
synchronized (mProcLock) {
if (r.getThread() != null && oomAdj == r.mState.getSetAdjWithServices()) {
@@ -12252,29 +12275,36 @@ public class ActivityManagerService extends IActivityManager.Stub
ss[INDEX_TOTAL_PSS] += myTotalPss;
ss[INDEX_TOTAL_SWAP_PSS] += myTotalSwapPss;
ss[INDEX_TOTAL_RSS] += myTotalRss;
+ ss[INDEX_TOTAL_PRIVATE_DIRTY] += myTotalPrivateDirty;
ss[INDEX_TOTAL_MEMTRACK_GRAPHICS] += memtrackGraphics;
ss[INDEX_TOTAL_MEMTRACK_GL] += memtrackGl;
MemItem pssItem = new MemItem(r.processName + " (pid " + pid +
(hasActivities ? " / activities)" : ")"), r.processName, myTotalPss,
- myTotalSwapPss, myTotalRss, pid, r.userId, hasActivities);
+ myTotalSwapPss, myTotalRss, myTotalPrivateDirty,
+ pid, r.userId, hasActivities);
procMems.add(pssItem);
procMemsMap.put(pid, pssItem);
ss[INDEX_NATIVE_PSS] += mi.nativePss;
ss[INDEX_NATIVE_SWAP_PSS] += mi.nativeSwappedOutPss;
ss[INDEX_NATIVE_RSS] += mi.nativeRss;
+ ss[INDEX_NATIVE_PRIVATE_DIRTY] += mi.nativePrivateDirty;
ss[INDEX_DALVIK_PSS] += mi.dalvikPss;
ss[INDEX_DALVIK_SWAP_PSS] += mi.dalvikSwappedOutPss;
ss[INDEX_DALVIK_RSS] += mi.dalvikRss;
+ ss[INDEX_DALVIK_PRIVATE_DIRTY] += mi.dalvikPrivateDirty;
for (int j=0; j<dalvikSubitemPss.length; j++) {
dalvikSubitemPss[j] += mi.getOtherPss(Debug.MemoryInfo.NUM_OTHER_STATS + j);
dalvikSubitemSwapPss[j] +=
mi.getOtherSwappedOutPss(Debug.MemoryInfo.NUM_OTHER_STATS + j);
+ dalvikSubitemPrivateDirty[j] +=
+ mi.getOtherPrivateDirty(Debug.MemoryInfo.NUM_OTHER_STATS + j);
dalvikSubitemRss[j] += mi.getOtherRss(Debug.MemoryInfo.NUM_OTHER_STATS + j);
}
ss[INDEX_OTHER_PSS] += mi.otherPss;
ss[INDEX_OTHER_RSS] += mi.otherRss;
ss[INDEX_OTHER_SWAP_PSS] += mi.otherSwappedOutPss;
+ ss[INDEX_OTHER_PRIVATE_DIRTY] += mi.otherPrivateDirty;
for (int j=0; j<Debug.MemoryInfo.NUM_OTHER_STATS; j++) {
long mem = mi.getOtherPss(j);
miscPss[j] += mem;
@@ -12282,6 +12312,9 @@ public class ActivityManagerService extends IActivityManager.Stub
mem = mi.getOtherSwappedOutPss(j);
miscSwapPss[j] += mem;
ss[INDEX_OTHER_SWAP_PSS] -= mem;
+ mem = mi.getOtherPrivateDirty(j);
+ miscPrivateDirty[j] += mem;
+ ss[INDEX_OTHER_PRIVATE_DIRTY] -= mem;
mem = mi.getOtherRss(j);
miscRss[j] += mem;
ss[INDEX_OTHER_RSS] -= mem;
@@ -12298,6 +12331,7 @@ public class ActivityManagerService extends IActivityManager.Stub
&& oomAdj < DUMP_MEM_OOM_ADJ[oomIndex + 1])) {
oomPss[oomIndex] += myTotalPss;
oomSwapPss[oomIndex] += myTotalSwapPss;
+ oomPrivateDirty[oomIndex] += myTotalPrivateDirty;
if (oomProcs[oomIndex] == null) {
oomProcs[oomIndex] = new ArrayList<MemItem>();
}
@@ -12344,6 +12378,7 @@ public class ActivityManagerService extends IActivityManager.Stub
final long myTotalPss = info.getTotalPss();
final long myTotalSwapPss = info.getTotalSwappedOutPss();
final long myTotalRss = info.getTotalRss();
+ final long myTotalPrivateDirty = info.getTotalPrivateDirty();
ss[INDEX_TOTAL_PSS] += myTotalPss;
ss[INDEX_TOTAL_SWAP_PSS] += myTotalSwapPss;
ss[INDEX_TOTAL_RSS] += myTotalRss;
@@ -12353,15 +12388,17 @@ public class ActivityManagerService extends IActivityManager.Stub
MemItem pssItem = new MemItem(st.name + " (pid " + st.pid + ")",
st.name, myTotalPss, info.getSummaryTotalSwapPss(), myTotalRss,
- st.pid, UserHandle.getUserId(st.uid), false);
+ myTotalPrivateDirty, st.pid, UserHandle.getUserId(st.uid), false);
procMems.add(pssItem);
ss[INDEX_NATIVE_PSS] += info.nativePss;
ss[INDEX_NATIVE_SWAP_PSS] += info.nativeSwappedOutPss;
ss[INDEX_NATIVE_RSS] += info.nativeRss;
+ ss[INDEX_NATIVE_PRIVATE_DIRTY] += info.nativePrivateDirty;
ss[INDEX_DALVIK_PSS] += info.dalvikPss;
ss[INDEX_DALVIK_SWAP_PSS] += info.dalvikSwappedOutPss;
ss[INDEX_DALVIK_RSS] += info.dalvikRss;
+ ss[INDEX_DALVIK_PRIVATE_DIRTY] += info.dalvikPrivateDirty;
for (int j = 0; j < dalvikSubitemPss.length; j++) {
dalvikSubitemPss[j] += info.getOtherPss(
Debug.MemoryInfo.NUM_OTHER_STATS + j);
@@ -12369,10 +12406,13 @@ public class ActivityManagerService extends IActivityManager.Stub
info.getOtherSwappedOutPss(Debug.MemoryInfo.NUM_OTHER_STATS + j);
dalvikSubitemRss[j] += info.getOtherRss(Debug.MemoryInfo.NUM_OTHER_STATS
+ j);
+ dalvikSubitemPrivateDirty[j] +=
+ info.getOtherPrivateDirty(Debug.MemoryInfo.NUM_OTHER_STATS + j);
}
ss[INDEX_OTHER_PSS] += info.otherPss;
ss[INDEX_OTHER_SWAP_PSS] += info.otherSwappedOutPss;
ss[INDEX_OTHER_RSS] += info.otherRss;
+ ss[INDEX_OTHER_PRIVATE_DIRTY] += info.otherPrivateDirty;
for (int j = 0; j < Debug.MemoryInfo.NUM_OTHER_STATS; j++) {
long mem = info.getOtherPss(j);
miscPss[j] += mem;
@@ -12383,6 +12423,9 @@ public class ActivityManagerService extends IActivityManager.Stub
mem = info.getOtherRss(j);
miscRss[j] += mem;
ss[INDEX_OTHER_RSS] -= mem;
+ mem = info.getOtherPrivateDirty(j);
+ miscPrivateDirty[j] += mem;
+ ss[INDEX_OTHER_PRIVATE_DIRTY] -= mem;
}
oomPss[0] += myTotalPss;
oomSwapPss[0] += myTotalSwapPss;
@@ -12391,21 +12434,26 @@ public class ActivityManagerService extends IActivityManager.Stub
}
oomProcs[0].add(pssItem);
oomRss[0] += myTotalRss;
+ oomPrivateDirty[0] += myTotalPrivateDirty;
}
});
ArrayList<MemItem> catMems = new ArrayList<MemItem>();
catMems.add(new MemItem("Native", "Native",
- ss[INDEX_NATIVE_PSS], ss[INDEX_NATIVE_SWAP_PSS], ss[INDEX_NATIVE_RSS], -1));
+ ss[INDEX_NATIVE_PSS], ss[INDEX_NATIVE_SWAP_PSS],
+ ss[INDEX_NATIVE_RSS], ss[INDEX_NATIVE_PRIVATE_DIRTY], -1));
final int dalvikId = -2;
catMems.add(new MemItem("Dalvik", "Dalvik", ss[INDEX_DALVIK_PSS],
- ss[INDEX_DALVIK_SWAP_PSS], ss[INDEX_DALVIK_RSS], dalvikId));
+ ss[INDEX_DALVIK_SWAP_PSS], ss[INDEX_DALVIK_RSS],
+ ss[INDEX_DALVIK_PRIVATE_DIRTY], dalvikId));
catMems.add(new MemItem("Unknown", "Unknown", ss[INDEX_OTHER_PSS],
- ss[INDEX_OTHER_SWAP_PSS], ss[INDEX_OTHER_RSS], -3));
+ ss[INDEX_OTHER_SWAP_PSS], ss[INDEX_OTHER_RSS],
+ ss[INDEX_OTHER_PRIVATE_DIRTY], -3));
for (int j=0; j<Debug.MemoryInfo.NUM_OTHER_STATS; j++) {
String label = Debug.MemoryInfo.getOtherLabel(j);
- catMems.add(new MemItem(label, label, miscPss[j], miscSwapPss[j], miscRss[j], j));
+ catMems.add(new MemItem(label, label, miscPss[j], miscSwapPss[j], miscRss[j],
+ miscPrivateDirty[j], j));
}
if (dalvikSubitemPss.length > 0) {
// Add dalvik subitems.
@@ -12431,7 +12479,8 @@ public class ActivityManagerService extends IActivityManager.Stub
final String name = Debug.MemoryInfo.getOtherLabel(
Debug.MemoryInfo.NUM_OTHER_STATS + j);
memItem.subitems.add(new MemItem(name, name, dalvikSubitemPss[j],
- dalvikSubitemSwapPss[j], dalvikSubitemRss[j], j));
+ dalvikSubitemSwapPss[j], dalvikSubitemRss[j],
+ dalvikSubitemPrivateDirty[j], j));
}
}
}
@@ -12442,7 +12491,7 @@ public class ActivityManagerService extends IActivityManager.Stub
String label = opts.isCompact ? DUMP_MEM_OOM_COMPACT_LABEL[j]
: DUMP_MEM_OOM_LABEL[j];
MemItem item = new MemItem(label, label, oomPss[j], oomSwapPss[j], oomRss[j],
- DUMP_MEM_OOM_ADJ[j]);
+ oomPrivateDirty[j], DUMP_MEM_OOM_ADJ[j]);
item.subitems = oomProcs[j];
oomMems.add(item);
}
@@ -12453,33 +12502,34 @@ public class ActivityManagerService extends IActivityManager.Stub
if (!brief && !opts.oomOnly && !opts.isCompact) {
pw.println();
pw.println("Total RSS by process:");
- dumpMemItems(pw, " ", "proc", procMems, true, opts.isCompact, false, false);
+ dumpMemItems(pw, " ", "proc", procMems, true, opts.isCompact, false, false, false);
pw.println();
}
if (!opts.isCompact) {
pw.println("Total RSS by OOM adjustment:");
}
- dumpMemItems(pw, " ", "oom", oomMems, false, opts.isCompact, false, false);
+ dumpMemItems(pw, " ", "oom", oomMems, false, opts.isCompact, false, false, false);
if (!brief && !opts.oomOnly) {
PrintWriter out = categoryPw != null ? categoryPw : pw;
if (!opts.isCompact) {
out.println();
out.println("Total RSS by category:");
}
- dumpMemItems(out, " ", "cat", catMems, true, opts.isCompact, false, false);
+ dumpMemItems(out, " ", "cat", catMems, true, opts.isCompact, false, false, false);
}
opts.dumpSwapPss = opts.dumpSwapPss && hasSwapPss && ss[INDEX_TOTAL_SWAP_PSS] != 0;
if (!brief && !opts.oomOnly && !opts.isCompact) {
pw.println();
pw.println("Total PSS by process:");
dumpMemItems(pw, " ", "proc", procMems, true, opts.isCompact, true,
- opts.dumpSwapPss);
+ opts.dumpSwapPss, opts.mDumpPrivateDirty);
pw.println();
}
if (!opts.isCompact) {
pw.println("Total PSS by OOM adjustment:");
}
- dumpMemItems(pw, " ", "oom", oomMems, false, opts.isCompact, true, opts.dumpSwapPss);
+ dumpMemItems(pw, " ", "oom", oomMems, false, opts.isCompact, true, opts.dumpSwapPss,
+ opts.mDumpPrivateDirty);
if (!brief && !opts.oomOnly) {
PrintWriter out = categoryPw != null ? categoryPw : pw;
if (!opts.isCompact) {
@@ -12487,7 +12537,7 @@ public class ActivityManagerService extends IActivityManager.Stub
out.println("Total PSS by category:");
}
dumpMemItems(out, " ", "cat", catMems, true, opts.isCompact, true,
- opts.dumpSwapPss);
+ opts.dumpSwapPss, opts.mDumpPrivateDirty);
}
if (!opts.isCompact) {
pw.println();
@@ -12889,7 +12939,7 @@ public class ActivityManagerService extends IActivityManager.Stub
ss[INDEX_TOTAL_RSS] += myTotalRss;
MemItem pssItem = new MemItem(r.processName + " (pid " + pid +
(hasActivities ? " / activities)" : ")"), r.processName, myTotalPss,
- myTotalSwapPss, myTotalRss, pid, r.userId, hasActivities);
+ myTotalSwapPss, myTotalRss, 0, pid, r.userId, hasActivities);
procMems.add(pssItem);
procMemsMap.put(pid, pssItem);
@@ -12976,7 +13026,7 @@ public class ActivityManagerService extends IActivityManager.Stub
ss[INDEX_TOTAL_NATIVE_PSS] += myTotalPss;
MemItem pssItem = new MemItem(st.name + " (pid " + st.pid + ")",
- st.name, myTotalPss, info.getSummaryTotalSwapPss(), myTotalRss,
+ st.name, myTotalPss, info.getSummaryTotalSwapPss(), myTotalRss, 0,
st.pid, UserHandle.getUserId(st.uid), false);
procMems.add(pssItem);
@@ -13021,15 +13071,16 @@ public class ActivityManagerService extends IActivityManager.Stub
ArrayList<MemItem> catMems = new ArrayList<MemItem>();
catMems.add(new MemItem("Native", "Native", ss[INDEX_NATIVE_PSS],
- ss[INDEX_NATIVE_SWAP_PSS], ss[INDEX_NATIVE_RSS], -1));
+ ss[INDEX_NATIVE_SWAP_PSS], ss[INDEX_NATIVE_RSS], 0, -1));
final int dalvikId = -2;
catMems.add(new MemItem("Dalvik", "Dalvik", ss[INDEX_DALVIK_PSS],
- ss[INDEX_DALVIK_SWAP_PSS], ss[INDEX_DALVIK_RSS], dalvikId));
+ ss[INDEX_DALVIK_SWAP_PSS], ss[INDEX_DALVIK_RSS], 0, dalvikId));
catMems.add(new MemItem("Unknown", "Unknown", ss[INDEX_OTHER_PSS],
- ss[INDEX_OTHER_SWAP_PSS], ss[INDEX_OTHER_RSS], -3));
+ ss[INDEX_OTHER_SWAP_PSS], ss[INDEX_OTHER_RSS], 0, -3));
for (int j=0; j<Debug.MemoryInfo.NUM_OTHER_STATS; j++) {
String label = Debug.MemoryInfo.getOtherLabel(j);
- catMems.add(new MemItem(label, label, miscPss[j], miscSwapPss[j], miscRss[j], j));
+ catMems.add(new MemItem(label, label, miscPss[j], miscSwapPss[j],
+ miscRss[j], 0, j));
}
if (dalvikSubitemPss.length > 0) {
// Add dalvik subitems.
@@ -13055,7 +13106,7 @@ public class ActivityManagerService extends IActivityManager.Stub
final String name = Debug.MemoryInfo.getOtherLabel(
Debug.MemoryInfo.NUM_OTHER_STATS + j);
memItem.subitems.add(new MemItem(name, name, dalvikSubitemPss[j],
- dalvikSubitemSwapPss[j], dalvikSubitemRss[j], j));
+ dalvikSubitemSwapPss[j], dalvikSubitemRss[j], 0, j));
}
}
}
@@ -13065,7 +13116,7 @@ public class ActivityManagerService extends IActivityManager.Stub
if (oomPss[j] != 0) {
String label = opts.isCompact ? DUMP_MEM_OOM_COMPACT_LABEL[j]
: DUMP_MEM_OOM_LABEL[j];
- MemItem item = new MemItem(label, label, oomPss[j], oomSwapPss[j], oomRss[j],
+ MemItem item = new MemItem(label, label, oomPss[j], oomSwapPss[j], oomRss[j], 0,
DUMP_MEM_OOM_ADJ[j]);
item.subitems = oomProcs[j];
oomMems.add(item);
diff --git a/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java b/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
index ad499911f84a..2cac7a020005 100644
--- a/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
+++ b/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
@@ -88,6 +88,7 @@ import com.android.internal.util.FrameworkStatsLog;
import com.android.server.am.BroadcastProcessQueue.BroadcastConsumer;
import com.android.server.am.BroadcastProcessQueue.BroadcastPredicate;
import com.android.server.am.BroadcastRecord.DeliveryState;
+import com.android.server.utils.AnrTimer;
import dalvik.annotation.optimization.NeverCompile;
diff --git a/services/core/java/com/android/server/am/flags.aconfig b/services/core/java/com/android/server/am/flags.aconfig
index 2ed079ab0c62..d9e8dddddae4 100644
--- a/services/core/java/com/android/server/am/flags.aconfig
+++ b/services/core/java/com/android/server/am/flags.aconfig
@@ -9,14 +9,6 @@ flag {
}
flag {
- name: "anr_timer_service_enabled"
- namespace: "system_performance"
- is_fixed_read_only: true
- description: "Feature flag for the ANR timer service"
- bug: "282428924"
-}
-
-flag {
name: "fgs_abuse_detection"
namespace: "backstage_power"
description: "Detect abusive FGS behavior for certain types (camera, mic, media, location)."
diff --git a/services/core/java/com/android/server/audio/AdiDeviceState.java b/services/core/java/com/android/server/audio/AdiDeviceState.java
index b91e633bd3de..ffdab7dfbfa4 100644
--- a/services/core/java/com/android/server/audio/AdiDeviceState.java
+++ b/services/core/java/com/android/server/audio/AdiDeviceState.java
@@ -21,6 +21,8 @@ import static android.media.AudioSystem.DEVICE_NONE;
import static android.media.AudioSystem.isBluetoothDevice;
import static android.media.audio.Flags.automaticBtDeviceType;
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.media.AudioDeviceAttributes;
@@ -31,13 +33,16 @@ import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
+import com.android.internal.annotations.VisibleForTesting;
+
import java.util.Objects;
/**
* Class representing all devices that were previously or are currently connected. Data is
* persisted in {@link android.provider.Settings.Secure}
*/
-/*package*/ final class AdiDeviceState {
+@VisibleForTesting(visibility = PACKAGE)
+public final class AdiDeviceState {
private static final String TAG = "AS.AdiDeviceState";
private static final String SETTING_FIELD_SEPARATOR = ",";
diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
index 98b210f29db4..e54bf64df09e 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
@@ -31,6 +31,8 @@ import static android.media.AudioSystem.isBluetoothScoOutDevice;
import static android.media.audio.Flags.automaticBtDeviceType;
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.bluetooth.BluetoothAdapter;
@@ -347,7 +349,8 @@ public class AudioDeviceInventory {
* @return the found {@link AdiDeviceState} or {@code null} otherwise.
*/
@Nullable
- AdiDeviceState findBtDeviceStateForAddress(String address, int deviceType) {
+ @VisibleForTesting(visibility = PACKAGE)
+ public AdiDeviceState findBtDeviceStateForAddress(String address, int deviceType) {
Set<Integer> deviceSet;
if (isBluetoothA2dpOutDevice(deviceType)) {
deviceSet = DEVICE_OUT_ALL_A2DP_SET;
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 8cec24d1bbb5..f7b7aaa60a35 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -39,6 +39,7 @@ import static android.provider.Settings.Secure.VOLUME_HUSH_MUTE;
import static android.provider.Settings.Secure.VOLUME_HUSH_OFF;
import static android.provider.Settings.Secure.VOLUME_HUSH_VIBRATE;
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
import static com.android.media.audio.Flags.alarmMinVolumeZero;
import static com.android.media.audio.Flags.bluetoothMacAddressAnonymization;
import static com.android.media.audio.Flags.disablePrescaleAbsoluteVolume;
@@ -6785,7 +6786,8 @@ public class AudioService extends IAudioService.Stub
return mContentResolver;
}
- /*package*/ SettingsAdapter getSettings() {
+ @VisibleForTesting(visibility = PACKAGE)
+ public SettingsAdapter getSettings() {
return mSettings;
}
@@ -11250,7 +11252,9 @@ public class AudioService extends IAudioService.Stub
return mDeviceBroker.isBluetoothAudioDeviceCategoryFixed(address);
}
- /*package*/void onUpdatedAdiDeviceState(AdiDeviceState deviceState) {
+ /** Update the sound dose and spatializer state based on the new AdiDeviceState. */
+ @VisibleForTesting(visibility = PACKAGE)
+ public void onUpdatedAdiDeviceState(AdiDeviceState deviceState) {
if (deviceState == null) {
return;
}
diff --git a/services/core/java/com/android/server/content/SyncJobService.java b/services/core/java/com/android/server/content/SyncJobService.java
index cd3f0f0ca5b2..1da7f0c059b0 100644
--- a/services/core/java/com/android/server/content/SyncJobService.java
+++ b/services/core/java/com/android/server/content/SyncJobService.java
@@ -19,7 +19,6 @@ package com.android.server.content;
import android.annotation.Nullable;
import android.app.job.JobParameters;
import android.app.job.JobService;
-import android.content.pm.PackageManagerInternal;
import android.os.Message;
import android.os.SystemClock;
import android.util.Log;
@@ -29,7 +28,6 @@ import android.util.SparseBooleanArray;
import android.util.SparseLongArray;
import com.android.internal.annotations.GuardedBy;
-import com.android.server.LocalServices;
public class SyncJobService extends JobService {
private static final String TAG = "SyncManager";
@@ -99,20 +97,6 @@ public class SyncJobService extends JobService {
return true;
}
- // TODO(b/209852664): remove this logic from here once it's added within JobScheduler.
- // JobScheduler should not call onStartJob for syncs whose source packages are stopped.
- // Until JS adds the relevant logic, this is a temporary solution to keep deferring syncs
- // for packages in the stopped state.
- if (android.content.pm.Flags.stayStopped()) {
- if (LocalServices.getService(PackageManagerInternal.class)
- .isPackageStopped(op.owningPackage, op.target.userId)) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Slog.d(TAG, "Skipping sync for force-stopped package: " + op.owningPackage);
- }
- return false;
- }
- }
-
boolean isLoggable = Log.isLoggable(TAG, Log.VERBOSE);
synchronized (sLock) {
final int jobId = params.getJobId();
diff --git a/services/core/java/com/android/server/display/color/ColorDisplayService.java b/services/core/java/com/android/server/display/color/ColorDisplayService.java
index e3aa161f001a..a313bcf1f7af 100644
--- a/services/core/java/com/android/server/display/color/ColorDisplayService.java
+++ b/services/core/java/com/android/server/display/color/ColorDisplayService.java
@@ -1745,8 +1745,8 @@ public final class ColorDisplayService extends SystemService {
@Override
public boolean setSaturationLevel(int level) {
- final boolean hasTransformsPermission = getContext()
- .checkCallingPermission(Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS)
+ final boolean hasTransformsPermission = getContext().checkCallingOrSelfPermission(
+ Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS)
== PackageManager.PERMISSION_GRANTED;
final boolean hasLegacyPermission = getContext()
.checkCallingPermission(Manifest.permission.CONTROL_DISPLAY_SATURATION)
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
index 952af69f0e1a..64abb81d0e7a 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
@@ -566,7 +566,9 @@ abstract class HdmiCecLocalDevice extends HdmiLocalDevice {
HdmiDeviceInfo cecDeviceInfo = mService.getHdmiCecNetwork().getCecDeviceInfo(address);
// If no non-default display name is available for the device, request the devices OSD name.
- if (cecDeviceInfo != null && cecDeviceInfo.getDisplayName().equals(
+ // On TV devices, the OSD name is queried in NewDeviceAction instead.
+ if (!mService.isTvDevice() && cecDeviceInfo != null
+ && cecDeviceInfo.getDisplayName().equals(
HdmiUtils.getDefaultDeviceName(address))) {
mService.sendCecCommand(
HdmiCecMessageBuilder.buildGiveOsdNameCommand(
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
index 14daf62a9ed2..ffd714b26b08 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
@@ -159,9 +159,12 @@ public abstract class InputMethodManagerInternal {
/**
* Updates the IME visibility, back disposition and show IME picker status for SystemUI.
* TODO(b/189923292): Making SystemUI to be true IME icon controller vs. presenter that
- * controlled by IMMS.
+ * controlled by IMMS.
+ *
+ * @param disableImeIcon indicates whether IME icon should be enabled or not
+ * @param displayId the display for which to update the IME window status
*/
- public abstract void updateImeWindowStatus(boolean disableImeIcon);
+ public abstract void updateImeWindowStatus(boolean disableImeIcon, int displayId);
/**
* Finish stylus handwriting by calling {@link InputMethodService#finishStylusHandwriting()} if
@@ -269,7 +272,7 @@ public abstract class InputMethodManagerInternal {
}
@Override
- public void updateImeWindowStatus(boolean disableImeIcon) {
+ public void updateImeWindowStatus(boolean disableImeIcon, int displayId) {
}
@Override
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index b7007854dab8..b1a362d09f16 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -5674,7 +5674,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub
}
@Override
- public void updateImeWindowStatus(boolean disableImeIcon) {
+ public void updateImeWindowStatus(boolean disableImeIcon, int displayId) {
mHandler.obtainMessage(MSG_UPDATE_IME_WINDOW_STATUS, disableImeIcon ? 1 : 0, 0)
.sendToTarget();
}
diff --git a/services/core/java/com/android/server/inputmethod/OWNERS b/services/core/java/com/android/server/inputmethod/OWNERS
index 6e5eb5631112..aa638aa49fb3 100644
--- a/services/core/java/com/android/server/inputmethod/OWNERS
+++ b/services/core/java/com/android/server/inputmethod/OWNERS
@@ -3,6 +3,8 @@ set noparent
roosa@google.com
yukawa@google.com
tarandeep@google.com
+fstern@google.com
+cosminbaies@google.com
ogunwale@google.com #{LAST_RESORT_SUGGESTION}
jjaggi@google.com #{LAST_RESORT_SUGGESTION}
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index 90c406357fd8..df9e7417054b 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -2908,46 +2908,69 @@ class MediaRouter2ServiceImpl {
if (service == null) {
return;
}
- List<RouterRecord> activeRouterRecords = Collections.emptyList();
+ List<RouterRecord> activeRouterRecords;
List<RouterRecord> allRouterRecords = getRouterRecords();
- List<ManagerRecord> managerRecords = getManagerRecords();
-
- boolean isManagerScanning = false;
- if (Flags.disableScreenOffBroadcastReceiver()
- || service.mPowerManager.isInteractive()) {
- isManagerScanning = managerRecords.stream().anyMatch(manager ->
- manager.mIsScanning && service.mActivityManager
- .getPackageImportance(manager.mOwnerPackageName)
- <= sPackageImportanceForScanning);
-
- if (isManagerScanning) {
- activeRouterRecords = allRouterRecords;
- } else {
- activeRouterRecords =
- allRouterRecords.stream()
- .filter(
- record ->
- service.mActivityManager.getPackageImportance(
- record.mPackageName)
- <= sPackageImportanceForScanning)
- .collect(Collectors.toList());
- }
+
+ boolean areManagersScanning = areManagersScanning(service, getManagerRecords());
+
+ if (areManagersScanning) {
+ activeRouterRecords = allRouterRecords;
+ } else {
+ activeRouterRecords = getIndividuallyActiveRouters(service, allRouterRecords);
+ }
+
+ updateManagerScanningForProviders(areManagersScanning);
+
+ Set<String> activelyScanningPackages = new HashSet<>();
+ RouteDiscoveryPreference newPreference =
+ buildCompositeDiscoveryPreference(
+ activeRouterRecords, areManagersScanning, activelyScanningPackages);
+
+ if (updateScanningOnUserRecord(service, activelyScanningPackages, newPreference)) {
+ updateDiscoveryPreferenceForProviders(activelyScanningPackages);
}
+ }
+ private void updateDiscoveryPreferenceForProviders(Set<String> activelyScanningPackages) {
for (MediaRoute2Provider provider : mRouteProviders) {
- if (provider instanceof MediaRoute2ProviderServiceProxy) {
- ((MediaRoute2ProviderServiceProxy) provider)
- .setManagerScanning(isManagerScanning);
+ provider.updateDiscoveryPreference(
+ activelyScanningPackages, mUserRecord.mCompositeDiscoveryPreference);
+ }
+ }
+
+ private boolean updateScanningOnUserRecord(
+ MediaRouter2ServiceImpl service,
+ Set<String> activelyScanningPackages,
+ RouteDiscoveryPreference newPreference) {
+ synchronized (service.mLock) {
+ if (newPreference.equals(mUserRecord.mCompositeDiscoveryPreference)
+ && activelyScanningPackages.equals(mUserRecord.mActivelyScanningPackages)) {
+ return false;
}
+ mUserRecord.mCompositeDiscoveryPreference = newPreference;
+ mUserRecord.mActivelyScanningPackages = activelyScanningPackages;
}
+ return true;
+ }
- // Build a composite RouteDiscoveryPreference that matches all of the routes
- // that match one or more of the individual discovery preferences. It may also
- // match additional routes. The composite RouteDiscoveryPreference can be used
- // to query route providers once to obtain all of the routes of interest, which
- // can be subsequently filtered for the individual discovery preferences.
+ /**
+ * Returns a composite {@link RouteDiscoveryPreference} that aggregates every router
+ * record's individual discovery preference.
+ *
+ * <p>The {@link RouteDiscoveryPreference#shouldPerformActiveScan() active scan value} of
+ * the composite discovery preference is true if one of the router records is actively
+ * scanning or if {@code shouldForceActiveScan} is true.
+ *
+ * <p>The composite RouteDiscoveryPreference is used to query route providers once to obtain
+ * all the routes of interest, which can be subsequently filtered for the individual
+ * discovery preferences.
+ */
+ @NonNull
+ private static RouteDiscoveryPreference buildCompositeDiscoveryPreference(
+ List<RouterRecord> activeRouterRecords,
+ boolean shouldForceActiveScan,
+ Set<String> activelyScanningPackages) {
Set<String> preferredFeatures = new HashSet<>();
- Set<String> activelyScanningPackages = new HashSet<>();
boolean activeScan = false;
for (RouterRecord activeRouterRecord : activeRouterRecords) {
RouteDiscoveryPreference preference = activeRouterRecord.mDiscoveryPreference;
@@ -2957,21 +2980,51 @@ class MediaRouter2ServiceImpl {
activelyScanningPackages.add(activeRouterRecord.mPackageName);
}
}
- RouteDiscoveryPreference newPreference = new RouteDiscoveryPreference.Builder(
- List.copyOf(preferredFeatures), activeScan || isManagerScanning).build();
+ return new RouteDiscoveryPreference.Builder(
+ List.copyOf(preferredFeatures), activeScan || shouldForceActiveScan)
+ .build();
+ }
- synchronized (service.mLock) {
- if (newPreference.equals(mUserRecord.mCompositeDiscoveryPreference)
- && activelyScanningPackages.equals(mUserRecord.mActivelyScanningPackages)) {
- return;
+ private void updateManagerScanningForProviders(boolean isManagerScanning) {
+ for (MediaRoute2Provider provider : mRouteProviders) {
+ if (provider instanceof MediaRoute2ProviderServiceProxy) {
+ ((MediaRoute2ProviderServiceProxy) provider)
+ .setManagerScanning(isManagerScanning);
}
- mUserRecord.mCompositeDiscoveryPreference = newPreference;
- mUserRecord.mActivelyScanningPackages = activelyScanningPackages;
}
- for (MediaRoute2Provider provider : mRouteProviders) {
- provider.updateDiscoveryPreference(
- activelyScanningPackages, mUserRecord.mCompositeDiscoveryPreference);
+ }
+
+ @NonNull
+ private static List<RouterRecord> getIndividuallyActiveRouters(
+ MediaRouter2ServiceImpl service, List<RouterRecord> allRouterRecords) {
+ if (!Flags.disableScreenOffBroadcastReceiver()
+ && !service.mPowerManager.isInteractive()) {
+ return Collections.emptyList();
}
+
+ return allRouterRecords.stream()
+ .filter(
+ record ->
+ service.mActivityManager.getPackageImportance(
+ record.mPackageName)
+ <= sPackageImportanceForScanning)
+ .collect(Collectors.toList());
+ }
+
+ private static boolean areManagersScanning(
+ MediaRouter2ServiceImpl service, List<ManagerRecord> managerRecords) {
+ if (!Flags.disableScreenOffBroadcastReceiver()
+ && !service.mPowerManager.isInteractive()) {
+ return false;
+ }
+
+ return managerRecords.stream()
+ .anyMatch(
+ manager ->
+ manager.mIsScanning
+ && service.mActivityManager.getPackageImportance(
+ manager.mOwnerPackageName)
+ <= sPackageImportanceForScanning);
}
private MediaRoute2Provider findProvider(@Nullable String providerId) {
diff --git a/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java b/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
new file mode 100644
index 000000000000..9fdeda4b4bd0
--- /dev/null
+++ b/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.notification;
+
+import android.app.UiModeManager;
+import android.app.WallpaperManager;
+import android.content.Context;
+import android.hardware.display.ColorDisplayManager;
+import android.os.Binder;
+import android.os.PowerManager;
+import android.service.notification.DeviceEffectsApplier;
+import android.service.notification.ZenDeviceEffects;
+
+/** Default implementation for {@link DeviceEffectsApplier}. */
+class DefaultDeviceEffectsApplier implements DeviceEffectsApplier {
+
+ private static final String SUPPRESS_AMBIENT_DISPLAY_TOKEN =
+ "DefaultDeviceEffectsApplier:SuppressAmbientDisplay";
+ private static final int SATURATION_LEVEL_GRAYSCALE = 0;
+ private static final int SATURATION_LEVEL_FULL_COLOR = 100;
+ private static final float WALLPAPER_DIM_AMOUNT_DIMMED = 0.6f;
+ private static final float WALLPAPER_DIM_AMOUNT_NORMAL = 0f;
+
+ private final ColorDisplayManager mColorDisplayManager;
+ private final PowerManager mPowerManager;
+ private final UiModeManager mUiModeManager;
+ private final WallpaperManager mWallpaperManager;
+
+ DefaultDeviceEffectsApplier(Context context) {
+ mColorDisplayManager = context.getSystemService(ColorDisplayManager.class);
+ mPowerManager = context.getSystemService(PowerManager.class);
+ mUiModeManager = context.getSystemService(UiModeManager.class);
+ mWallpaperManager = context.getSystemService(WallpaperManager.class);
+ }
+
+ @Override
+ public void apply(ZenDeviceEffects effects) {
+ Binder.withCleanCallingIdentity(() -> {
+ mPowerManager.suppressAmbientDisplay(SUPPRESS_AMBIENT_DISPLAY_TOKEN,
+ effects.shouldSuppressAmbientDisplay());
+
+ if (mColorDisplayManager != null) {
+ mColorDisplayManager.setSaturationLevel(
+ effects.shouldDisplayGrayscale() ? SATURATION_LEVEL_GRAYSCALE
+ : SATURATION_LEVEL_FULL_COLOR);
+ }
+
+ if (mWallpaperManager != null) {
+ mWallpaperManager.setWallpaperDimAmount(
+ effects.shouldDimWallpaper() ? WALLPAPER_DIM_AMOUNT_DIMMED
+ : WALLPAPER_DIM_AMOUNT_NORMAL);
+ }
+
+ // TODO: b/308673343 - Apply dark theme (via UiModeManager) when screen is off.
+ });
+ }
+}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 3c6887c17e97..02845fb03119 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -2941,6 +2941,12 @@ public class NotificationManagerService extends SystemService {
registerDeviceConfigChange();
migrateDefaultNAS();
maybeShowInitialReviewPermissionsNotification();
+
+ if (android.app.Flags.modesApi()) {
+ // Cannot be done earlier, as some services aren't ready until this point.
+ mZenModeHelper.setDeviceEffectsApplier(
+ new DefaultDeviceEffectsApplier(getContext()));
+ }
} else if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) {
mSnoozeHelper.scheduleRepostsForPersistedNotifications(System.currentTimeMillis());
} else if (phase == SystemService.PHASE_DEVICE_SPECIFIC_SERVICES_READY) {
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 5c37eeaba180..218519fef68b 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -27,8 +27,8 @@ import static android.service.notification.NotificationServiceProto.ROOT_CONFIG;
import static com.android.internal.util.FrameworkStatsLog.DND_MODE_RULE;
-import android.annotation.IntDef;
import android.annotation.DrawableRes;
+import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SuppressLint;
@@ -76,6 +76,7 @@ import android.provider.Settings;
import android.provider.Settings.Global;
import android.service.notification.Condition;
import android.service.notification.ConditionProviderService;
+import android.service.notification.DeviceEffectsApplier;
import android.service.notification.ZenDeviceEffects;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeConfig.ZenRule;
@@ -175,6 +176,8 @@ public class ZenModeHelper {
@VisibleForTesting protected int mZenMode;
@VisibleForTesting protected NotificationManager.Policy mConsolidatedPolicy;
+ @GuardedBy("mConfigLock")
+ private ZenDeviceEffects mConsolidatedDeviceEffects = new ZenDeviceEffects.Builder().build();
private int mUser = UserHandle.USER_SYSTEM;
private final Object mConfigLock = new Object();
@@ -182,6 +185,8 @@ public class ZenModeHelper {
@VisibleForTesting protected ZenModeConfig mConfig;
@VisibleForTesting protected AudioManagerInternal mAudioManager;
protected PackageManager mPm;
+ @GuardedBy("mConfigLock")
+ private DeviceEffectsApplier mDeviceEffectsApplier;
private long mSuppressedEffects;
public static final long SUPPRESSED_EFFECT_NOTIFICATIONS = 1;
@@ -189,7 +194,7 @@ public class ZenModeHelper {
public static final long SUPPRESSED_EFFECT_ALL = SUPPRESSED_EFFECT_CALLS
| SUPPRESSED_EFFECT_NOTIFICATIONS;
- @VisibleForTesting protected boolean mIsBootComplete;
+ @VisibleForTesting protected boolean mIsSystemServicesReady;
private String[] mPriorityOnlyDndExemptPackages;
@@ -285,10 +290,33 @@ public class ZenModeHelper {
mPm = mContext.getPackageManager();
mHandler.postMetricsTimer();
cleanUpZenRules();
- mIsBootComplete = true;
+ mIsSystemServicesReady = true;
showZenUpgradeNotification(mZenMode);
}
+ /**
+ * Set the {@link DeviceEffectsApplier} used to apply the consolidated effects.
+ *
+ * <p>If effects were calculated previously (for example, when we loaded a {@link ZenModeConfig}
+ * that includes activated rules), they will be applied immediately.
+ */
+ void setDeviceEffectsApplier(@NonNull DeviceEffectsApplier deviceEffectsApplier) {
+ if (!Flags.modesApi()) {
+ return;
+ }
+ ZenDeviceEffects consolidatedDeviceEffects;
+ synchronized (mConfigLock) {
+ if (mDeviceEffectsApplier != null) {
+ throw new IllegalStateException("Already set up a DeviceEffectsApplier!");
+ }
+ mDeviceEffectsApplier = deviceEffectsApplier;
+ consolidatedDeviceEffects = mConsolidatedDeviceEffects;
+ }
+ if (consolidatedDeviceEffects.hasEffects()) {
+ applyConsolidatedDeviceEffects();
+ }
+ }
+
public void onUserSwitched(int user) {
loadConfigForUser(user, "onUserSwitched");
}
@@ -1349,7 +1377,7 @@ public class ZenModeHelper {
mConfig = config;
dispatchOnConfigChanged();
- updateConsolidatedPolicy(reason);
+ updateAndApplyConsolidatedPolicyAndDeviceEffects(reason);
}
final String val = Integer.toString(config.hashCode());
Global.putString(mContext.getContentResolver(), Global.ZEN_MODE_CONFIG_ETAG, val);
@@ -1398,7 +1426,7 @@ public class ZenModeHelper {
ZenLog.traceSetZenMode(zen, reason);
mZenMode = zen;
setZenModeSetting(mZenMode);
- updateConsolidatedPolicy(reason);
+ updateAndApplyConsolidatedPolicyAndDeviceEffects(reason);
boolean shouldApplyToRinger = setRingerMode && (zen != zenBefore || (
zen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
&& policyHashBefore != mConsolidatedPolicy.hashCode()));
@@ -1459,25 +1487,56 @@ public class ZenModeHelper {
}
}
- private void updateConsolidatedPolicy(String reason) {
+ private void updateAndApplyConsolidatedPolicyAndDeviceEffects(String reason) {
synchronized (mConfigLock) {
if (mConfig == null) return;
ZenPolicy policy = new ZenPolicy();
+ ZenDeviceEffects.Builder deviceEffectsBuilder = new ZenDeviceEffects.Builder();
if (mConfig.manualRule != null) {
applyCustomPolicy(policy, mConfig.manualRule);
+ if (Flags.modesApi()) {
+ deviceEffectsBuilder.add(mConfig.manualRule.zenDeviceEffects);
+ }
}
for (ZenRule automaticRule : mConfig.automaticRules.values()) {
if (automaticRule.isAutomaticActive()) {
applyCustomPolicy(policy, automaticRule);
+ if (Flags.modesApi()) {
+ deviceEffectsBuilder.add(automaticRule.zenDeviceEffects);
+ }
}
}
+
Policy newPolicy = mConfig.toNotificationPolicy(policy);
if (!Objects.equals(mConsolidatedPolicy, newPolicy)) {
mConsolidatedPolicy = newPolicy;
dispatchOnConsolidatedPolicyChanged();
ZenLog.traceSetConsolidatedZenPolicy(mConsolidatedPolicy, reason);
}
+
+ if (Flags.modesApi()) {
+ ZenDeviceEffects deviceEffects = deviceEffectsBuilder.build();
+ if (!deviceEffects.equals(mConsolidatedDeviceEffects)) {
+ mConsolidatedDeviceEffects = deviceEffects;
+ mHandler.postApplyDeviceEffects();
+ }
+ }
+ }
+ }
+
+ private void applyConsolidatedDeviceEffects() {
+ if (!Flags.modesApi()) {
+ return;
+ }
+ DeviceEffectsApplier applier;
+ ZenDeviceEffects effects;
+ synchronized (mConfigLock) {
+ applier = mDeviceEffectsApplier;
+ effects = mConsolidatedDeviceEffects;
+ }
+ if (applier != null) {
+ applier.apply(effects);
}
}
@@ -1893,7 +1952,7 @@ public class ZenModeHelper {
private void showZenUpgradeNotification(int zen) {
final boolean isWatch = mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_WATCH);
- final boolean showNotification = mIsBootComplete
+ final boolean showNotification = mIsSystemServicesReady
&& zen != Global.ZEN_MODE_OFF
&& !isWatch
&& Settings.Secure.getInt(mContext.getContentResolver(),
@@ -2067,6 +2126,7 @@ public class ZenModeHelper {
private static final int MSG_DISPATCH = 1;
private static final int MSG_METRICS = 2;
private static final int MSG_RINGER_AUDIO = 5;
+ private static final int MSG_APPLY_EFFECTS = 6;
private static final long METRICS_PERIOD_MS = 6 * 60 * 60 * 1000;
@@ -2089,6 +2149,11 @@ public class ZenModeHelper {
sendMessage(obtainMessage(MSG_RINGER_AUDIO, shouldApplyToRinger));
}
+ private void postApplyDeviceEffects() {
+ removeMessages(MSG_APPLY_EFFECTS);
+ sendEmptyMessage(MSG_APPLY_EFFECTS);
+ }
+
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
@@ -2101,6 +2166,10 @@ public class ZenModeHelper {
case MSG_RINGER_AUDIO:
boolean shouldApplyToRinger = (boolean) msg.obj;
updateRingerAndAudio(shouldApplyToRinger);
+ break;
+ case MSG_APPLY_EFFECTS:
+ applyConsolidatedDeviceEffects();
+ break;
}
}
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index c0c98dedfae3..968ea6688328 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -1379,9 +1379,9 @@ public class PackageManagerService implements PackageSender, TestUtilityService
final InstallSourceInfo installSourceInfo = snapshot.getInstallSourceInfo(packageName,
userId);
- final String initiatingPackageName = installSourceInfo.getInitiatingPackageName();
final String installerPackageName;
if (installSourceInfo != null) {
+ final String initiatingPackageName = installSourceInfo.getInitiatingPackageName();
if (!isInstalledByAdb(initiatingPackageName)) {
installerPackageName = initiatingPackageName;
} else {
diff --git a/services/core/java/com/android/server/utils/Android.bp b/services/core/java/com/android/server/utils/Android.bp
new file mode 100644
index 000000000000..3a334bee93ff
--- /dev/null
+++ b/services/core/java/com/android/server/utils/Android.bp
@@ -0,0 +1,10 @@
+aconfig_declarations {
+ name: "com.android.server.utils-aconfig",
+ package: "com.android.server.utils",
+ srcs: ["*.aconfig"],
+}
+
+java_aconfig_library {
+ name: "com.android.server.utils_aconfig-java",
+ aconfig_declarations: "com.android.server.utils-aconfig",
+}
diff --git a/services/core/java/com/android/server/am/AnrTimer.java b/services/core/java/com/android/server/utils/AnrTimer.java
index 3e17930e3cb9..2b6dffb2b271 100644
--- a/services/core/java/com/android/server/am/AnrTimer.java
+++ b/services/core/java/com/android/server/utils/AnrTimer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.server.am;
+package com.android.server.utils;
import static android.text.TextUtils.formatSimple;
@@ -77,7 +77,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*
* @hide
*/
-class AnrTimer<V> {
+public class AnrTimer<V> {
/**
* The log tag.
@@ -568,7 +568,7 @@ class AnrTimer<V> {
* @param label A name for this instance.
* @param extend A flag to indicate if expired timers can be granted extensions.
*/
- AnrTimer(@NonNull Handler handler, int what, @NonNull String label, boolean extend) {
+ public AnrTimer(@NonNull Handler handler, int what, @NonNull String label, boolean extend) {
this(handler, what, label, extend, new Injector(handler));
}
@@ -580,7 +580,7 @@ class AnrTimer<V> {
* @param what The "what" parameter for the expiration message.
* @param label A name for this instance.
*/
- AnrTimer(@NonNull Handler handler, int what, @NonNull String label) {
+ public AnrTimer(@NonNull Handler handler, int what, @NonNull String label) {
this(handler, what, label, false);
}
@@ -591,7 +591,7 @@ class AnrTimer<V> {
*
* @return true if the service is flag-enabled.
*/
- boolean serviceEnabled() {
+ public boolean serviceEnabled() {
return mFeature.enabled();
}
@@ -856,7 +856,7 @@ class AnrTimer<V> {
* @param timeoutMs The timer timeout, in milliseconds.
* @return true if the timer was successfully created.
*/
- boolean start(@NonNull V arg, int pid, int uid, long timeoutMs) {
+ public boolean start(@NonNull V arg, int pid, int uid, long timeoutMs) {
return mFeature.start(arg, pid, uid, timeoutMs);
}
@@ -867,7 +867,7 @@ class AnrTimer<V> {
*
* @return true if the timer was found and was running.
*/
- boolean cancel(@NonNull V arg) {
+ public boolean cancel(@NonNull V arg) {
return mFeature.cancel(arg);
}
@@ -878,7 +878,7 @@ class AnrTimer<V> {
*
* @return true if the timer was found and was expired.
*/
- boolean accept(@NonNull V arg) {
+ public boolean accept(@NonNull V arg) {
return mFeature.accept(arg);
}
@@ -892,7 +892,7 @@ class AnrTimer<V> {
*
* @return true if the timer was found and was expired.
*/
- boolean discard(@NonNull V arg) {
+ public boolean discard(@NonNull V arg) {
return mFeature.discard(arg);
}
@@ -1010,7 +1010,7 @@ class AnrTimer<V> {
/**
* Dumpsys output.
*/
- static void dump(@NonNull PrintWriter pw, boolean verbose) {
+ public static void dump(@NonNull PrintWriter pw, boolean verbose) {
final IndentingPrintWriter ipw = new IndentingPrintWriter(pw);
ipw.println("AnrTimer statistics");
ipw.increaseIndent();
diff --git a/services/core/java/com/android/server/utils/flags.aconfig b/services/core/java/com/android/server/utils/flags.aconfig
new file mode 100644
index 000000000000..489e21ab06ca
--- /dev/null
+++ b/services/core/java/com/android/server/utils/flags.aconfig
@@ -0,0 +1,9 @@
+package: "com.android.server.utils"
+
+flag {
+ name: "anr_timer_service_enabled"
+ namespace: "system_performance"
+ is_fixed_read_only: true
+ description: "Feature flag for the ANR timer service"
+ bug: "282428924"
+}
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index e088d9afd67d..1485b961789c 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -40,6 +40,7 @@ import static com.android.server.wallpaper.WallpaperUtils.WALLPAPER_INFO;
import static com.android.server.wallpaper.WallpaperUtils.WALLPAPER_LOCK_ORIG;
import static com.android.server.wallpaper.WallpaperUtils.getWallpaperDir;
import static com.android.server.wallpaper.WallpaperUtils.makeWallpaperIdLocked;
+import static com.android.window.flags.Flags.multiCrop;
import android.annotation.NonNull;
import android.app.ActivityManager;
@@ -93,7 +94,6 @@ import android.os.ResultReceiver;
import android.os.SELinux;
import android.os.ShellCallback;
import android.os.SystemClock;
-import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
@@ -1516,8 +1516,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
mColorsChangedListeners = new SparseArray<>();
mWallpaperDataParser = new WallpaperDataParser(mContext, mWallpaperDisplayHelper,
mWallpaperCropper);
- mIsMultiCropEnabled =
- SystemProperties.getBoolean("persist.wm.debug.wallpaper_multi_crop", false);
+ mIsMultiCropEnabled = multiCrop();
LocalServices.addService(WallpaperManagerInternal.class, new LocalService());
}
diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
index 4625b4fe07ef..f8b22c97e218 100644
--- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
+++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
@@ -614,6 +614,15 @@ public class BackgroundActivityStartController {
== ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
if (callerCanAllow && realCallerCanAllow) {
// Both caller and real caller allow with system defined behavior
+ if (state.mBalAllowedByPiCreatorWithHardening.allowsBackgroundActivityStarts()) {
+ // Will be allowed even with BAL hardening.
+ if (DEBUG_ACTIVITY_STARTS) {
+ Slog.d(TAG, "Activity start allowed by caller. "
+ + state.dump(resultForCaller, resultForRealCaller));
+ }
+ // return the realCaller result for backwards compatibility
+ return statsLog(resultForRealCaller, state);
+ }
if (state.mBalAllowedByPiCreator.allowsBackgroundActivityStarts()) {
Slog.wtf(TAG,
"With Android 15 BAL hardening this activity start may be blocked"
@@ -632,6 +641,14 @@ public class BackgroundActivityStartController {
}
if (callerCanAllow) {
// Allowed before V by creator
+ if (state.mBalAllowedByPiCreatorWithHardening.allowsBackgroundActivityStarts()) {
+ // Will be allowed even with BAL hardening.
+ if (DEBUG_ACTIVITY_STARTS) {
+ Slog.d(TAG, "Activity start allowed by caller. "
+ + state.dump(resultForCaller, resultForRealCaller));
+ }
+ return statsLog(resultForCaller, state);
+ }
if (state.mBalAllowedByPiCreator.allowsBackgroundActivityStarts()) {
Slog.wtf(TAG,
"With Android 15 BAL hardening this activity start may be blocked"
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 14912d041127..bf30af3e8596 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -461,7 +461,7 @@ final class InputMonitor {
// in animating before the next app window focused, or IME icon
// persists on the bottom when swiping the task to recents.
InputMethodManagerInternal.get().updateImeWindowStatus(
- true /* disableImeIcon */);
+ true /* disableImeIcon */, mDisplayContent.getDisplayId());
}
}
return;
diff --git a/services/core/java/com/android/server/wm/KeyguardController.java b/services/core/java/com/android/server/wm/KeyguardController.java
index ccaa3b07aaaa..cbc7b836d250 100644
--- a/services/core/java/com/android/server/wm/KeyguardController.java
+++ b/services/core/java/com/android/server/wm/KeyguardController.java
@@ -240,7 +240,8 @@ class KeyguardController {
// state when evaluating visibilities.
updateKeyguardSleepToken();
mRootWindowContainer.ensureActivitiesVisible(null, 0, !PRESERVE_WINDOWS);
- InputMethodManagerInternal.get().updateImeWindowStatus(false /* disableImeIcon */);
+ InputMethodManagerInternal.get().updateImeWindowStatus(false /* disableImeIcon */,
+ displayId);
setWakeTransitionReady();
if (aodChanged) {
// Ensure the new state takes effect.
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index ef2572665281..dd538deee5cd 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -967,7 +967,8 @@ public class RecentsAnimationController implements DeathRecipient {
// Restore IME icon only when moving the original app task to front from recents, in case
// IME icon may missing if the moving task has already been the current focused task.
if (reorderMode == REORDER_MOVE_TO_ORIGINAL_POSITION && !mIsAddingTaskToTargets) {
- InputMethodManagerInternal.get().updateImeWindowStatus(false /* disableImeIcon */);
+ InputMethodManagerInternal.get().updateImeWindowStatus(
+ false /* disableImeIcon */, mDisplayId);
}
// Update the input windows after the animation is complete
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index 424394872821..76c4a0ee438b 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -1390,7 +1390,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
// recents, in case IME icon may missing if the moving task has already been
// the current focused task.
InputMethodManagerInternal.get().updateImeWindowStatus(
- false /* disableImeIcon */);
+ false /* disableImeIcon */, dc.getDisplayId());
}
// An uncommitted transient launch can leave incomplete lifecycles if visibilities
// didn't change (eg. re-ordering with translucent tasks will leave launcher
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 81a547290d5e..a8e6f689b424 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -910,7 +910,7 @@ void IncrementalService::disallowReadLogs(StorageId storageId) {
constants().readLogsDisabledMarkerName),
0777, idFromMetadata(metadata), {})) {
//{.metadata = {metadata.data(), (IncFsSize)metadata.size()}})) {
- LOG(ERROR) << "Failed to make marker file for storageId: " << storageId;
+ LOG(ERROR) << "Failed to make marker file for storageId: " << storageId << " err: " << -err;
return;
}
diff --git a/services/tests/mockingservicestests/src/com/android/server/job/controllers/BackgroundJobsControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/job/controllers/BackgroundJobsControllerTest.java
new file mode 100644
index 000000000000..cdae8c6ab004
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/job/controllers/BackgroundJobsControllerTest.java
@@ -0,0 +1,291 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.server.job.controllers;
+
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
+import static com.android.server.job.JobSchedulerService.FREQUENT_INDEX;
+import static com.android.server.job.controllers.JobStatus.CONSTRAINT_BACKGROUND_NOT_RESTRICTED;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+
+import android.app.ActivityManagerInternal;
+import android.app.AppGlobals;
+import android.app.job.JobInfo;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManagerInternal;
+import android.net.Uri;
+import android.os.UserHandle;
+import android.platform.test.flag.junit.SetFlagsRule;
+import android.util.ArraySet;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.AppStateTracker;
+import com.android.server.AppStateTrackerImpl;
+import com.android.server.LocalServices;
+import com.android.server.job.JobSchedulerService;
+import com.android.server.job.JobStore;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.ArgumentMatchers;
+import org.mockito.Mock;
+import org.mockito.MockitoSession;
+import org.mockito.quality.Strictness;
+
+@RunWith(AndroidJUnit4.class)
+public class BackgroundJobsControllerTest {
+ private static final int CALLING_UID = 1000;
+ private static final String CALLING_PACKAGE = "com.test.calling.package";
+ private static final String SOURCE_PACKAGE = "com.android.frameworks.mockingservicestests";
+ private static final int SOURCE_UID = 10001;
+ private static final int ALTERNATE_UID = 12345;
+ private static final String ALTERNATE_SOURCE_PACKAGE = "com.test.alternate.package";
+ private static final int SOURCE_USER_ID = 0;
+
+ private BackgroundJobsController mBackgroundJobsController;
+ private BroadcastReceiver mStoppedReceiver;
+ private JobStore mJobStore;
+
+ private MockitoSession mMockingSession;
+ @Mock
+ private Context mContext;
+ @Mock
+ private AppStateTrackerImpl mAppStateTrackerImpl;
+ @Mock
+ private IPackageManager mIPackageManager;
+ @Mock
+ private JobSchedulerService mJobSchedulerService;
+ @Mock
+ private PackageManagerInternal mPackageManagerInternal;
+ @Mock
+ private PackageManager mPackageManager;
+
+ @Rule
+ public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
+
+ @Before
+ public void setUp() throws Exception {
+ mMockingSession = mockitoSession()
+ .initMocks(this)
+ .mockStatic(AppGlobals.class)
+ .mockStatic(LocalServices.class)
+ .strictness(Strictness.LENIENT)
+ .startMocking();
+
+ // Called in StateController constructor.
+ when(mJobSchedulerService.getTestableContext()).thenReturn(mContext);
+ when(mJobSchedulerService.getLock()).thenReturn(mJobSchedulerService);
+ // Called in BackgroundJobsController constructor.
+ doReturn(mock(ActivityManagerInternal.class))
+ .when(() -> LocalServices.getService(ActivityManagerInternal.class));
+ doReturn(mAppStateTrackerImpl)
+ .when(() -> LocalServices.getService(AppStateTracker.class));
+ doReturn(mPackageManagerInternal)
+ .when(() -> LocalServices.getService(PackageManagerInternal.class));
+ mJobStore = JobStore.initAndGetForTesting(mContext, mContext.getFilesDir());
+ when(mJobSchedulerService.getJobStore()).thenReturn(mJobStore);
+ // Called in JobStatus constructor.
+ doReturn(mIPackageManager).when(AppGlobals::getPackageManager);
+
+ doReturn(false).when(mAppStateTrackerImpl)
+ .areJobsRestricted(anyInt(), anyString(), anyBoolean());
+ doReturn(true).when(mAppStateTrackerImpl)
+ .isRunAnyInBackgroundAppOpsAllowed(anyInt(), anyString());
+
+ // Initialize real objects.
+ // Capture the listeners.
+ ArgumentCaptor<BroadcastReceiver> receiverCaptor =
+ ArgumentCaptor.forClass(BroadcastReceiver.class);
+
+ when(mContext.getPackageManager()).thenReturn(mPackageManager);
+ mBackgroundJobsController = new BackgroundJobsController(mJobSchedulerService);
+ mBackgroundJobsController.startTrackingLocked();
+
+ verify(mContext).registerReceiverAsUser(receiverCaptor.capture(), any(),
+ ArgumentMatchers.argThat(filter ->
+ filter.hasAction(Intent.ACTION_PACKAGE_RESTARTED)
+ && filter.hasAction(Intent.ACTION_PACKAGE_UNSTOPPED)),
+ any(), any());
+ mStoppedReceiver = receiverCaptor.getValue();
+
+ // Need to do this since we're using a mock JS and not a real object.
+ doReturn(new ArraySet<>(new String[]{SOURCE_PACKAGE}))
+ .when(mJobSchedulerService).getPackagesForUidLocked(SOURCE_UID);
+ doReturn(new ArraySet<>(new String[]{ALTERNATE_SOURCE_PACKAGE}))
+ .when(mJobSchedulerService).getPackagesForUidLocked(ALTERNATE_UID);
+ setPackageUid(ALTERNATE_UID, ALTERNATE_SOURCE_PACKAGE);
+ setPackageUid(SOURCE_UID, SOURCE_PACKAGE);
+ }
+
+ @After
+ public void tearDown() {
+ if (mMockingSession != null) {
+ mMockingSession.finishMocking();
+ }
+ }
+
+ private void setPackageUid(final int uid, final String pkgName) throws Exception {
+ doReturn(uid).when(mIPackageManager)
+ .getPackageUid(eq(pkgName), anyLong(), eq(UserHandle.getUserId(uid)));
+ }
+
+ private void setStoppedState(int uid, String pkgName, boolean stopped) {
+ Intent intent = new Intent(
+ stopped ? Intent.ACTION_PACKAGE_RESTARTED : Intent.ACTION_PACKAGE_UNSTOPPED);
+ intent.putExtra(Intent.EXTRA_UID, uid);
+ intent.setData(Uri.fromParts(IntentFilter.SCHEME_PACKAGE, pkgName, null));
+ mStoppedReceiver.onReceive(mContext, intent);
+ }
+
+ private void setUidBias(int uid, int bias) {
+ int prevBias = mJobSchedulerService.getUidBias(uid);
+ doReturn(bias).when(mJobSchedulerService).getUidBias(uid);
+ synchronized (mBackgroundJobsController.mLock) {
+ mBackgroundJobsController.onUidBiasChangedLocked(uid, prevBias, bias);
+ }
+ }
+
+ private void trackJobs(JobStatus... jobs) {
+ for (JobStatus job : jobs) {
+ mJobStore.add(job);
+ synchronized (mBackgroundJobsController.mLock) {
+ mBackgroundJobsController.maybeStartTrackingJobLocked(job, null);
+ }
+ }
+ }
+
+ private JobInfo.Builder createBaseJobInfoBuilder(String pkgName, int jobId) {
+ final ComponentName cn = spy(new ComponentName(pkgName, "TestBJCJobService"));
+ doReturn("TestBJCJobService").when(cn).flattenToShortString();
+ return new JobInfo.Builder(jobId, cn);
+ }
+
+ private JobStatus createJobStatus(String testTag, String packageName, int callingUid,
+ JobInfo jobInfo) {
+ JobStatus js = JobStatus.createFromJobInfo(
+ jobInfo, callingUid, packageName, SOURCE_USER_ID, "BJCTest", testTag);
+ js.serviceProcessName = "testProcess";
+ // Make sure tests aren't passing just because the default bucket is likely ACTIVE.
+ js.setStandbyBucket(FREQUENT_INDEX);
+ return js;
+ }
+
+ @Test
+ public void testStopped_disabled() {
+ mSetFlagsRule.disableFlags(android.content.pm.Flags.FLAG_STAY_STOPPED);
+ // Scheduled by SOURCE_UID:SOURCE_PACKAGE for itself.
+ JobStatus directJob1 = createJobStatus("testStopped", SOURCE_PACKAGE, SOURCE_UID,
+ createBaseJobInfoBuilder(SOURCE_PACKAGE, 1).build());
+ // Scheduled by ALTERNATE_UID:ALTERNATE_SOURCE_PACKAGE for itself.
+ JobStatus directJob2 = createJobStatus("testStopped",
+ ALTERNATE_SOURCE_PACKAGE, ALTERNATE_UID,
+ createBaseJobInfoBuilder(ALTERNATE_SOURCE_PACKAGE, 2).build());
+ // Scheduled by CALLING_PACKAGE for SOURCE_PACKAGE.
+ JobStatus proxyJob1 = createJobStatus("testStopped", SOURCE_PACKAGE, CALLING_UID,
+ createBaseJobInfoBuilder(CALLING_PACKAGE, 3).build());
+ // Scheduled by CALLING_PACKAGE for ALTERNATE_SOURCE_PACKAGE.
+ JobStatus proxyJob2 = createJobStatus("testStopped",
+ ALTERNATE_SOURCE_PACKAGE, CALLING_UID,
+ createBaseJobInfoBuilder(CALLING_PACKAGE, 4).build());
+
+ trackJobs(directJob1, directJob2, proxyJob1, proxyJob2);
+
+ setStoppedState(ALTERNATE_UID, ALTERNATE_SOURCE_PACKAGE, true);
+ assertTrue(directJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(directJob1.isUserBgRestricted());
+ assertTrue(directJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(directJob2.isUserBgRestricted());
+ assertTrue(proxyJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(proxyJob1.isUserBgRestricted());
+ assertTrue(proxyJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(proxyJob2.isUserBgRestricted());
+
+ setStoppedState(ALTERNATE_UID, ALTERNATE_SOURCE_PACKAGE, false);
+ assertTrue(directJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(directJob1.isUserBgRestricted());
+ assertTrue(directJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(directJob2.isUserBgRestricted());
+ assertTrue(proxyJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(proxyJob1.isUserBgRestricted());
+ assertTrue(proxyJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(proxyJob2.isUserBgRestricted());
+ }
+
+ @Test
+ public void testStopped_enabled() {
+ mSetFlagsRule.enableFlags(android.content.pm.Flags.FLAG_STAY_STOPPED);
+ // Scheduled by SOURCE_UID:SOURCE_PACKAGE for itself.
+ JobStatus directJob1 = createJobStatus("testStopped", SOURCE_PACKAGE, SOURCE_UID,
+ createBaseJobInfoBuilder(SOURCE_PACKAGE, 1).build());
+ // Scheduled by ALTERNATE_UID:ALTERNATE_SOURCE_PACKAGE for itself.
+ JobStatus directJob2 = createJobStatus("testStopped",
+ ALTERNATE_SOURCE_PACKAGE, ALTERNATE_UID,
+ createBaseJobInfoBuilder(ALTERNATE_SOURCE_PACKAGE, 2).build());
+ // Scheduled by CALLING_PACKAGE for SOURCE_PACKAGE.
+ JobStatus proxyJob1 = createJobStatus("testStopped", SOURCE_PACKAGE, CALLING_UID,
+ createBaseJobInfoBuilder(CALLING_PACKAGE, 3).build());
+ // Scheduled by CALLING_PACKAGE for ALTERNATE_SOURCE_PACKAGE.
+ JobStatus proxyJob2 = createJobStatus("testStopped",
+ ALTERNATE_SOURCE_PACKAGE, CALLING_UID,
+ createBaseJobInfoBuilder(CALLING_PACKAGE, 4).build());
+
+ trackJobs(directJob1, directJob2, proxyJob1, proxyJob2);
+
+ setStoppedState(ALTERNATE_UID, ALTERNATE_SOURCE_PACKAGE, true);
+ assertTrue(directJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(directJob1.isUserBgRestricted());
+ assertFalse(directJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertTrue(directJob2.isUserBgRestricted());
+ assertTrue(proxyJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(proxyJob1.isUserBgRestricted());
+ assertFalse(proxyJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertTrue(proxyJob2.isUserBgRestricted());
+
+ setStoppedState(ALTERNATE_UID, ALTERNATE_SOURCE_PACKAGE, false);
+ assertTrue(directJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(directJob1.isUserBgRestricted());
+ assertTrue(directJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(directJob2.isUserBgRestricted());
+ assertTrue(proxyJob1.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(proxyJob1.isUserBgRestricted());
+ assertTrue(proxyJob2.isConstraintSatisfied(CONSTRAINT_BACKGROUND_NOT_RESTRICTED));
+ assertFalse(proxyJob2.isUserBgRestricted());
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
index 800350a7d326..57c3a1d5f364 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityManagerServiceTest.java
@@ -21,6 +21,7 @@ import static android.provider.Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_
import static android.provider.Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN;
import static android.provider.Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_NONE;
import static android.provider.Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW;
+import static android.view.accessibility.Flags.FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG;
import static com.android.internal.accessibility.AccessibilityShortcutController.ACCESSIBILITY_HEARING_AIDS_COMPONENT_NAME;
import static com.android.internal.accessibility.AccessibilityShortcutController.MAGNIFICATION_CONTROLLER_NAME;
@@ -852,6 +853,53 @@ public class AccessibilityManagerServiceTest {
assertThat(lockState.get()).containsExactly(false);
}
+ @Test
+ @RequiresFlagsEnabled(FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
+ public void testIsAccessibilityServiceWarningRequired_requiredByDefault() {
+ mockManageAccessibilityGranted(mTestableContext);
+ final AccessibilityServiceInfo info = new AccessibilityServiceInfo();
+ info.setComponentName(COMPONENT_NAME);
+
+ assertThat(mA11yms.isAccessibilityServiceWarningRequired(info)).isTrue();
+ }
+
+ @Test
+ @RequiresFlagsEnabled(FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
+ public void testIsAccessibilityServiceWarningRequired_notRequiredIfAlreadyEnabled() {
+ mockManageAccessibilityGranted(mTestableContext);
+ final AccessibilityServiceInfo info_a = new AccessibilityServiceInfo();
+ info_a.setComponentName(COMPONENT_NAME);
+ final AccessibilityServiceInfo info_b = new AccessibilityServiceInfo();
+ info_b.setComponentName(new ComponentName("package_b", "class_b"));
+ final AccessibilityUserState userState = mA11yms.getCurrentUserState();
+ userState.mEnabledServices.clear();
+ userState.mEnabledServices.add(info_b.getComponentName());
+
+ assertThat(mA11yms.isAccessibilityServiceWarningRequired(info_a)).isTrue();
+ assertThat(mA11yms.isAccessibilityServiceWarningRequired(info_b)).isFalse();
+ }
+
+ @Test
+ @RequiresFlagsEnabled(FLAG_CLEANUP_ACCESSIBILITY_WARNING_DIALOG)
+ public void testIsAccessibilityServiceWarningRequired_notRequiredIfExistingShortcut() {
+ mockManageAccessibilityGranted(mTestableContext);
+ final AccessibilityServiceInfo info_a = new AccessibilityServiceInfo();
+ info_a.setComponentName(new ComponentName("package_a", "class_a"));
+ final AccessibilityServiceInfo info_b = new AccessibilityServiceInfo();
+ info_b.setComponentName(new ComponentName("package_b", "class_b"));
+ final AccessibilityServiceInfo info_c = new AccessibilityServiceInfo();
+ info_c.setComponentName(new ComponentName("package_c", "class_c"));
+ final AccessibilityUserState userState = mA11yms.getCurrentUserState();
+ userState.mAccessibilityButtonTargets.clear();
+ userState.mAccessibilityButtonTargets.add(info_b.getComponentName().flattenToString());
+ userState.mAccessibilityShortcutKeyTargets.clear();
+ userState.mAccessibilityShortcutKeyTargets.add(info_c.getComponentName().flattenToString());
+
+ assertThat(mA11yms.isAccessibilityServiceWarningRequired(info_a)).isTrue();
+ assertThat(mA11yms.isAccessibilityServiceWarningRequired(info_b)).isFalse();
+ assertThat(mA11yms.isAccessibilityServiceWarningRequired(info_c)).isFalse();
+ }
+
// Single package intents can trigger multiple PackageMonitor callbacks.
// Collect the state of the lock in a set, since tests only care if calls
// were all locked or all unlocked.
diff --git a/services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java b/services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java
deleted file mode 100644
index 44d676052352..000000000000
--- a/services/tests/servicestests/src/com/android/server/am/AnrTimerTest.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.am;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import android.platform.test.annotations.Presubmit;
-
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.SystemClock;
-
-import android.util.Log;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Build/Install/Run:
- * atest FrameworksServicesTests:AnrTimerTest
- */
-@SmallTest
-@Presubmit
-public class AnrTimerTest {
-
- /**
- * A handler that allows control over when to dispatch messages and callbacks. Because most
- * Handler methods are final, the only thing this handler can intercept is sending messages.
- * This handler allows unit tests to be written without a need to sleep (which leads to flaky
- * tests).
- *
- * This code was cloned from {@link com.android.systemui.utils.os.FakeHandler}.
- */
- static class TestHandler extends Handler {
-
- private boolean mImmediate = true;
- private ArrayList<Message> mQueuedMessages = new ArrayList<>();
-
- ArrayList<Long> mDelays = new ArrayList<>();
-
- TestHandler(Looper looper, Callback callback, boolean immediate) {
- super(looper, callback);
- mImmediate = immediate;
- }
-
- TestHandler(Looper looper, Callback callback) {
- this(looper, callback, true);
- }
-
- /**
- * Override sendMessageAtTime. In immediate mode, the message is immediately dispatched.
- * In non-immediate mode, the message is enqueued to the real handler. In both cases, the
- * original delay is computed by comparing the target dispatch time with 'now'. This
- * computation is prone to errors if the code experiences delays. The computed time is
- * captured in the mDelays list.
- */
- @Override
- public boolean sendMessageAtTime(Message msg, long uptimeMillis) {
- long delay = uptimeMillis - SystemClock.uptimeMillis();
- mDelays.add(delay);
- if (mImmediate) {
- mQueuedMessages.add(msg);
- dispatchQueuedMessages();
- } else {
- super.sendMessageAtTime(msg, uptimeMillis);
- }
- return true;
- }
-
- void setImmediate(boolean immediate) {
- mImmediate = immediate;
- }
-
- /** Dispatch any messages that have been queued on the calling thread. */
- void dispatchQueuedMessages() {
- ArrayList<Message> messages = new ArrayList<>(mQueuedMessages);
- mQueuedMessages.clear();
- for (Message msg : messages) {
- dispatchMessage(msg);
- }
- }
-
- /**
- * Compare the captured delays with the input array. The comparison is fuzzy because the
- * captured delay (see sendMessageAtTime) is affected by process delays.
- */
- void verifyDelays(long[] r) {
- final long FUZZ = 10;
- assertEquals(r.length, mDelays.size());
- for (int i = 0; i < mDelays.size(); i++) {
- long t = r[i];
- long v = mDelays.get(i);
- assertTrue(v >= t - FUZZ && v <= t + FUZZ);
- }
- }
- }
-
- private Handler mHandler;
- private CountDownLatch mLatch = null;
- private ArrayList<Message> mMessages;
-
- // The commonly used message timeout key.
- private static final int MSG_TIMEOUT = 1;
-
- @Before
- public void setUp() {
- mHandler = new Handler(Looper.getMainLooper(), this::expirationHandler);
- mMessages = new ArrayList<>();
- mLatch = new CountDownLatch(1);
- AnrTimer.resetTimerListForHermeticTest();
- }
-
- @After
- public void tearDown() {
- mHandler = null;
- mMessages = null;
- }
-
- // When a timer expires, set the expiration time in the message and add it to the queue.
- private boolean expirationHandler(Message msg) {
- mMessages.add(Message.obtain(msg));
- mLatch.countDown();
- return false;
- }
-
- // The test argument includes a pid and uid, and a tag. The tag is used to distinguish
- // different message instances.
- private static class TestArg {
- final int pid;
- final int uid;
- final int tag;
-
- TestArg(int pid, int uid, int tag) {
- this.pid = pid;
- this.uid = uid;
- this.tag = tag;
- }
- @Override
- public String toString() {
- return String.format("pid=%d uid=%d tag=%d", pid, uid, tag);
- }
- }
-
- /**
- * An instrumented AnrTimer.
- */
- private class TestAnrTimer extends AnrTimer {
- // A local copy of 'what'. The field in AnrTimer is private.
- final int mWhat;
-
- TestAnrTimer(Handler h, int key, String tag) {
- super(h, key, tag);
- mWhat = key;
- }
-
- TestAnrTimer() {
- this(mHandler, MSG_TIMEOUT, caller());
- }
-
- TestAnrTimer(Handler h, int key, String tag, boolean extend, TestInjector injector) {
- super(h, key, tag, extend, injector);
- mWhat = key;
- }
-
- TestAnrTimer(boolean extend, TestInjector injector) {
- this(mHandler, MSG_TIMEOUT, caller(), extend, injector);
- }
-
- // Return the name of method that called the constructor, assuming that this function is
- // called from inside the constructor. The calling method is used to name the AnrTimer
- // instance so that logs are easier to understand.
- private static String caller() {
- final int n = 4;
- StackTraceElement[] stack = Thread.currentThread().getStackTrace();
- if (stack.length < n+1) return "test";
- return stack[n].getMethodName();
- }
-
- boolean start(TestArg arg, long millis) {
- return start(arg, arg.pid, arg.uid, millis);
- }
-
- int what() {
- return mWhat;
- }
- }
-
- private static class TestTracker extends AnrTimer.CpuTracker {
- long index = 0;
- final int skip;
- TestTracker(int skip) {
- this.skip = skip;
- }
- long delay(int pid) {
- return index++ * skip;
- }
- }
-
- private class TestInjector extends AnrTimer.Injector {
- final boolean mImmediate;
- final AnrTimer.CpuTracker mTracker;
- TestHandler mTestHandler;
-
- TestInjector(int skip, boolean immediate) {
- super(mHandler);
- mTracker = new TestTracker(skip);
- mImmediate = immediate;
- }
-
- TestInjector(int skip) {
- this(skip, true);
- }
-
- @Override
- Handler newHandler(Handler.Callback callback) {
- if (mTestHandler == null) {
- mTestHandler = new TestHandler(mHandler.getLooper(), callback, mImmediate);
- }
- return mTestHandler;
- }
-
- /** Fetch the allocated handle. This does not check for nulls. */
- TestHandler getHandler() {
- return mTestHandler;
- }
-
- /**
- * This override returns the tracker supplied in the constructor. It does not create a
- * new one.
- */
- @Override
- AnrTimer.CpuTracker newTracker() {
- return mTracker;
- }
-
- /** For test purposes, always enable the feature. */
- @Override
- boolean isFeatureEnabled() {
- return true;
- }
- }
-
- // Tests
- // 1. Start a timer and wait for expiration.
- // 2. Start a timer and cancel it. Verify no expiration.
- // 3. Start a timer. Shortly thereafter, restart it. Verify only one expiration.
- // 4. Start a couple of timers. Verify max active timers. Discard one and verify the active
- // count drops by 1. Accept one and verify the active count drops by 1.
-
- @Test
- public void testSimpleTimeout() throws Exception {
- // Create an immediate TestHandler.
- TestInjector injector = new TestInjector(0);
- TestAnrTimer timer = new TestAnrTimer(false, injector);
- TestArg t = new TestArg(1, 1, 3);
- assertTrue(timer.start(t, 10));
- // Delivery is immediate but occurs on a different thread.
- assertTrue(mLatch.await(100, TimeUnit.MILLISECONDS));
- assertEquals(1, mMessages.size());
- Message m = mMessages.get(0);
- assertEquals(timer.what(), m.what);
- assertEquals(t, m.obj);
-
- // Verify that the timer is still present.
- assertEquals(1, AnrTimer.sizeOfTimerList());
- assertTrue(timer.accept(t));
- assertEquals(0, AnrTimer.sizeOfTimerList());
-
- // Verify that the timer no longer exists.
- assertFalse(timer.accept(t));
- }
-
- @Test
- public void testCancel() throws Exception {
- // Create an non-immediate TestHandler.
- TestInjector injector = new TestInjector(0, false);
- TestAnrTimer timer = new TestAnrTimer(false, injector);
-
- Handler handler = injector.getHandler();
- assertNotNull(handler);
- assertTrue(handler instanceof TestHandler);
-
- // The tests that follow check for a 'what' of 0 (zero), which is the message key used
- // by AnrTimer internally.
- TestArg t = new TestArg(1, 1, 3);
- assertFalse(handler.hasMessages(0));
- assertTrue(timer.start(t, 100));
- assertTrue(handler.hasMessages(0));
- assertTrue(timer.cancel(t));
- assertFalse(handler.hasMessages(0));
-
- // Verify that no expiration messages were delivered.
- assertEquals(0, mMessages.size());
- assertEquals(0, AnrTimer.sizeOfTimerList());
- }
-
- @Test
- public void testRestart() throws Exception {
- // Create an non-immediate TestHandler.
- TestInjector injector = new TestInjector(0, false);
- TestAnrTimer timer = new TestAnrTimer(false, injector);
-
- TestArg t = new TestArg(1, 1, 3);
- assertTrue(timer.start(t, 2500));
- assertTrue(timer.start(t, 1000));
-
- // Verify that the test handler saw two timeouts.
- injector.getHandler().verifyDelays(new long[] { 2500, 1000 });
-
- // Verify that there is a single timer. Then cancel it.
- assertEquals(1, AnrTimer.sizeOfTimerList());
- assertTrue(timer.cancel(t));
- assertEquals(0, AnrTimer.sizeOfTimerList());
- }
-
- @Test
- public void testExtendNormal() throws Exception {
- // Create an immediate TestHandler.
- TestInjector injector = new TestInjector(5);
- TestAnrTimer timer = new TestAnrTimer(true, injector);
- TestArg t = new TestArg(1, 1, 3);
- assertTrue(timer.start(t, 10));
-
- assertTrue(mLatch.await(100, TimeUnit.MILLISECONDS));
- assertEquals(1, mMessages.size());
- Message m = mMessages.get(0);
- assertEquals(timer.what(), m.what);
- assertEquals(t, m.obj);
-
- // Verify that the test handler saw two timeouts: one of 10ms and one of 5ms.
- injector.getHandler().verifyDelays(new long[] { 10, 5 });
-
- // Verify that the timer is still present. Then remove it and verify that the list is
- // empty.
- assertEquals(1, AnrTimer.sizeOfTimerList());
- assertTrue(timer.accept(t));
- assertEquals(0, AnrTimer.sizeOfTimerList());
- }
-
- @Test
- public void testExtendOversize() throws Exception {
- // Create an immediate TestHandler.
- TestInjector injector = new TestInjector(25);
- TestAnrTimer timer = new TestAnrTimer(true, injector);
- TestArg t = new TestArg(1, 1, 3);
- assertTrue(timer.start(t, 10));
-
- assertTrue(mLatch.await(100, TimeUnit.MILLISECONDS));
- assertEquals(1, mMessages.size());
- Message m = mMessages.get(0);
- assertEquals(timer.what(), m.what);
- assertEquals(t, m.obj);
-
- // Verify that the test handler saw two timeouts: one of 10ms and one of 10ms.
- injector.getHandler().verifyDelays(new long[] { 10, 10 });
-
- // Verify that the timer is still present. Then remove it and verify that the list is
- // empty.
- assertEquals(1, AnrTimer.sizeOfTimerList());
- assertTrue(timer.accept(t));
- assertEquals(0, AnrTimer.sizeOfTimerList());
- }
-}
diff --git a/services/tests/servicestests/src/com/android/server/audio/AudioDeviceBrokerTest.java b/services/tests/servicestests/src/com/android/server/audio/AudioDeviceBrokerTest.java
index 0d58542ab040..cc3c880b8927 100644
--- a/services/tests/servicestests/src/com/android/server/audio/AudioDeviceBrokerTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/AudioDeviceBrokerTest.java
@@ -15,14 +15,28 @@
*/
package com.android.server.audio;
+import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_DEFAULT;
+import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_HEADSET;
+import static android.media.audio.Flags.automaticBtDeviceType;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.Manifest;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
@@ -40,10 +54,10 @@ import androidx.test.filters.MediumTest;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.After;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.mockito.ArgumentMatchers;
import org.mockito.Mock;
import org.mockito.Spy;
@@ -70,6 +84,9 @@ public class AudioDeviceBrokerTest {
Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
mMockAudioService = mock(AudioService.class);
+ SettingsAdapter mockAdapter = mock(SettingsAdapter.class);
+ when(mMockAudioService.getSettings()).thenReturn(mockAdapter);
+ when(mockAdapter.getSecureStringForUser(any(), any(), anyInt())).thenReturn("");
when(mMockAudioService.getBluetoothContextualVolumeStream())
.thenReturn(AudioSystem.STREAM_MUSIC);
@@ -82,7 +99,6 @@ public class AudioDeviceBrokerTest {
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
mFakeBtDevice = adapter.getRemoteDevice("00:01:02:03:04:05");
- Assert.assertNotNull("invalid null BT device", mFakeBtDevice);
}
@After
@@ -100,15 +116,14 @@ public class AudioDeviceBrokerTest {
@Test
public void testPostA2dpDeviceConnectionChange() throws Exception {
Log.i(TAG, "starting testPostA2dpDeviceConnectionChange");
- Assert.assertNotNull("invalid null BT device", mFakeBtDevice);
+ assertNotNull("invalid null BT device", mFakeBtDevice);
mAudioDeviceBroker.queueOnBluetoothActiveDeviceChanged(
new AudioDeviceBroker.BtDeviceChangedData(mFakeBtDevice, null,
BluetoothProfileConnectionInfo.createA2dpInfo(true, 1), "testSource"));
Thread.sleep(2 * MAX_MESSAGE_HANDLING_DELAY_MS);
verify(mSpyDevInventory, times(1)).setBluetoothActiveDevice(
- any(AudioDeviceBroker.BtDeviceInfo.class)
- );
+ any(AudioDeviceBroker.BtDeviceInfo.class));
// verify the connection was reported to AudioSystem
checkSingleSystemConnection(mFakeBtDevice);
@@ -212,7 +227,7 @@ public class AudioDeviceBrokerTest {
AudioManager.DEVICE_OUT_SPEAKER, null);
new AdiDeviceState(AudioDeviceInfo.TYPE_BLUETOOTH_A2DP,
AudioManager.DEVICE_OUT_BLUETOOTH_A2DP, null);
- Assert.fail();
+ fail();
} catch (NullPointerException e) { }
}
@@ -228,11 +243,114 @@ public class AudioDeviceBrokerTest {
final AdiDeviceState result = AdiDeviceState.fromPersistedString(persistString);
Log.i(TAG, "original:" + devState);
Log.i(TAG, "result :" + result);
- Assert.assertEquals(devState, result);
+ assertEquals(devState, result);
+ }
+
+ @Test
+ public void testIsBluetoothAudioDeviceCategoryFixed() throws Exception {
+ Log.i(TAG, "starting testIsBluetoothAudioDeviceCategoryFixed");
+
+ if (!automaticBtDeviceType()) {
+ Log.i(TAG, "Enable automaticBtDeviceType flag to run the test "
+ + "testIsBluetoothAudioDeviceCategoryFixed");
+ return;
+ }
+ assertNotNull("invalid null BT device", mFakeBtDevice);
+
+ final AdiDeviceState devState = new AdiDeviceState(AudioDeviceInfo.TYPE_BLUETOOTH_A2DP,
+ AudioManager.DEVICE_OUT_BLUETOOTH_A2DP, mFakeBtDevice.getAddress());
+ doReturn(devState).when(mSpyDevInventory).findBtDeviceStateForAddress(
+ mFakeBtDevice.getAddress(), AudioManager.DEVICE_OUT_BLUETOOTH_A2DP);
+ try {
+ InstrumentationRegistry.getInstrumentation().getUiAutomation()
+ .adoptShellPermissionIdentity(Manifest.permission.BLUETOOTH_PRIVILEGED);
+
+ // no metadata set
+ assertTrue(mFakeBtDevice.setMetadata(BluetoothDevice.METADATA_DEVICE_TYPE,
+ DEVICE_TYPE_DEFAULT.getBytes()));
+ assertFalse(
+ mAudioDeviceBroker.isBluetoothAudioDeviceCategoryFixed(
+ mFakeBtDevice.getAddress()));
+
+ // metadata set
+ assertTrue(mFakeBtDevice.setMetadata(BluetoothDevice.METADATA_DEVICE_TYPE,
+ DEVICE_TYPE_HEADSET.getBytes()));
+ assertTrue(mAudioDeviceBroker.isBluetoothAudioDeviceCategoryFixed(
+ mFakeBtDevice.getAddress()));
+ } finally {
+ InstrumentationRegistry.getInstrumentation().getUiAutomation()
+ .dropShellPermissionIdentity();
+ }
+ }
+
+ @Test
+ public void testGetAndUpdateBtAdiDeviceStateCategoryForAddress() throws Exception {
+ Log.i(TAG, "starting testGetAndUpdateBtAdiDeviceStateCategoryForAddress");
+
+ if (!automaticBtDeviceType()) {
+ Log.i(TAG, "Enable automaticBtDeviceType flag to run the test "
+ + "testGetAndUpdateBtAdiDeviceStateCategoryForAddress");
+ return;
+ }
+ assertNotNull("invalid null BT device", mFakeBtDevice);
+
+ final AdiDeviceState devState = new AdiDeviceState(AudioDeviceInfo.TYPE_BLUETOOTH_A2DP,
+ AudioManager.DEVICE_OUT_BLUETOOTH_A2DP, mFakeBtDevice.getAddress());
+ devState.setAudioDeviceCategory(AudioManager.AUDIO_DEVICE_CATEGORY_SPEAKER);
+ doReturn(devState).when(mSpyDevInventory).findBtDeviceStateForAddress(
+ eq(mFakeBtDevice.getAddress()), anyInt());
+ try {
+ InstrumentationRegistry.getInstrumentation().getUiAutomation()
+ .adoptShellPermissionIdentity(Manifest.permission.BLUETOOTH_PRIVILEGED);
+
+ // no metadata set
+ assertTrue(mFakeBtDevice.setMetadata(BluetoothDevice.METADATA_DEVICE_TYPE,
+ DEVICE_TYPE_DEFAULT.getBytes()));
+ assertEquals(AudioManager.AUDIO_DEVICE_CATEGORY_SPEAKER,
+ mAudioDeviceBroker.getAndUpdateBtAdiDeviceStateCategoryForAddress(
+ mFakeBtDevice.getAddress()));
+ verify(mMockAudioService,
+ timeout(MAX_MESSAGE_HANDLING_DELAY_MS).times(0)).onUpdatedAdiDeviceState(
+ eq(devState));
+
+ // metadata set
+ assertTrue(mFakeBtDevice.setMetadata(BluetoothDevice.METADATA_DEVICE_TYPE,
+ DEVICE_TYPE_HEADSET.getBytes()));
+ assertEquals(AudioManager.AUDIO_DEVICE_CATEGORY_HEADPHONES,
+ mAudioDeviceBroker.getAndUpdateBtAdiDeviceStateCategoryForAddress(
+ mFakeBtDevice.getAddress()));
+ verify(mMockAudioService,
+ timeout(MAX_MESSAGE_HANDLING_DELAY_MS)).onUpdatedAdiDeviceState(
+ any());
+ } finally {
+ InstrumentationRegistry.getInstrumentation().getUiAutomation()
+ .dropShellPermissionIdentity();
+ }
+ }
+
+ @Test
+ public void testAddAudioDeviceWithCategoryInInventoryIfNeeded() throws Exception {
+ Log.i(TAG, "starting testAddAudioDeviceWithCategoryInInventoryIfNeeded");
+
+ if (!automaticBtDeviceType()) {
+ Log.i(TAG, "Enable automaticBtDeviceType flag to run the test "
+ + "testAddAudioDeviceWithCategoryInInventoryIfNeeded");
+ return;
+ }
+ assertNotNull("invalid null BT device", mFakeBtDevice);
+
+ mAudioDeviceBroker.addAudioDeviceWithCategoryInInventoryIfNeeded(
+ mFakeBtDevice.getAddress(), AudioManager.AUDIO_DEVICE_CATEGORY_OTHER);
+
+ verify(mMockAudioService,
+ timeout(MAX_MESSAGE_HANDLING_DELAY_MS).atLeast(1)).onUpdatedAdiDeviceState(
+ ArgumentMatchers.argThat(devState -> devState.getAudioDeviceCategory()
+ == AudioManager.AUDIO_DEVICE_CATEGORY_OTHER));
}
private void doTestConnectionDisconnectionReconnection(int delayAfterDisconnection,
boolean mockMediaPlayback, boolean guaranteeSingleConnection) throws Exception {
+ assertNotNull("invalid null BT device", mFakeBtDevice);
when(mMockAudioService.getDeviceForStream(AudioManager.STREAM_MUSIC))
.thenReturn(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
when(mMockAudioService.isInCommunication()).thenReturn(false);
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTvTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTvTest.java
index 9e5bea7d135b..5acbe658cf36 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTvTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceTvTest.java
@@ -27,6 +27,8 @@ import static com.android.server.hdmi.HdmiControlService.INITIATED_BY_ENABLE_CEC
import static com.google.common.truth.Truth.assertThat;
+import static junit.framework.Assert.assertEquals;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
@@ -1723,4 +1725,24 @@ public class HdmiCecLocalDeviceTvTest {
assertThat(mNativeWrapper.getResultMessages()).contains(activeSourceFromTv);
}
+
+ @Test
+ public void newDeviceConnectedIfOnlyOneGiveOsdNameSent() {
+ mHdmiControlService.getHdmiCecNetwork().clearDeviceList();
+ assertThat(mHdmiControlService.getHdmiCecNetwork().getDeviceInfoList(false))
+ .isEmpty();
+ HdmiCecMessage reportPhysicalAddress =
+ HdmiCecMessageBuilder.buildReportPhysicalAddressCommand(
+ ADDR_PLAYBACK_2, 0x1000, HdmiDeviceInfo.DEVICE_PLAYBACK);
+ HdmiCecMessage giveOsdName = HdmiCecMessageBuilder.buildGiveOsdNameCommand(
+ ADDR_TV, ADDR_PLAYBACK_2);
+ mNativeWrapper.onCecMessage(reportPhysicalAddress);
+ mTestLooper.dispatchAll();
+
+ // Wait until HdmiCecNetwork or NewDeviceAction is in progress
+ mTestLooper.moveTimeForward(HdmiConfig.TIMEOUT_MS);
+
+ // TV should only send <Give Osd Name> once
+ assertEquals(1, Collections.frequency(mNativeWrapper.getResultMessages(), giveOsdName));
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/utils/AnrTimerTest.java b/services/tests/servicestests/src/com/android/server/utils/AnrTimerTest.java
new file mode 100644
index 000000000000..330dbb83e949
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/utils/AnrTimerTest.java
@@ -0,0 +1,203 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.utils;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+
+import android.platform.test.annotations.Presubmit;
+import androidx.test.filters.SmallTest;
+
+import com.android.internal.annotations.GuardedBy;
+
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+@SmallTest
+@Presubmit
+public class AnrTimerTest {
+
+ // The commonly used message timeout key.
+ private static final int MSG_TIMEOUT = 1;
+
+ // The test argument includes a pid and uid, and a tag. The tag is used to distinguish
+ // different message instances. Additional fields (like what) capture delivery information
+ // that is checked by the test.
+ private static class TestArg {
+ final int pid;
+ final int uid;
+ int what;
+
+ TestArg(int pid, int uid) {
+ this.pid = pid;
+ this.uid = uid;
+ this.what = 0;
+ }
+ }
+
+ /**
+ * The test handler is a self-contained object for a single test.
+ */
+ private static class Helper {
+ final Object mLock = new Object();
+
+ final Handler mHandler;
+ final CountDownLatch mLatch;
+ @GuardedBy("mLock")
+ final ArrayList<TestArg> mMessages;
+
+ Helper(int expect) {
+ mHandler = new Handler(Looper.getMainLooper(), this::expirationHandler);
+ mMessages = new ArrayList<>();
+ mLatch = new CountDownLatch(expect);
+ }
+
+ /**
+ * When a timer expires, the object must be a TestArg. Update the TestArg with
+ * expiration metadata and save it.
+ */
+ private boolean expirationHandler(Message msg) {
+ synchronized (mLock) {
+ TestArg arg = (TestArg) msg.obj;
+ arg.what = msg.what;
+ mMessages.add(arg);
+ mLatch.countDown();
+ return false;
+ }
+ }
+
+ boolean await(long timeout) throws InterruptedException {
+ // No need to synchronize, as the CountDownLatch is already thread-safe.
+ return mLatch.await(timeout, TimeUnit.MILLISECONDS);
+ }
+
+ /**
+ * Fetch the received messages. Fail if the count of received messages is other than the
+ * expected count.
+ */
+ TestArg[] messages(int expected) {
+ synchronized (mLock) {
+ assertEquals(expected, mMessages.size());
+ return mMessages.toArray(new TestArg[expected]);
+ }
+ }
+ }
+
+ /**
+ * An instrumented AnrTimer.
+ */
+ private static class TestAnrTimer extends AnrTimer<TestArg> {
+ private TestAnrTimer(Handler h, int key, String tag) {
+ super(h, key, tag);
+ }
+
+ TestAnrTimer(Helper helper) {
+ this(helper.mHandler, MSG_TIMEOUT, caller());
+ }
+
+ void start(TestArg arg, long millis) {
+ start(arg, arg.pid, arg.uid, millis);
+ }
+
+ // Return the name of method that called the constructor, assuming that this function is
+ // called from inside the constructor. The calling method is used to name the AnrTimer
+ // instance so that logs are easier to understand.
+ private static String caller() {
+ final int n = 4;
+ StackTraceElement[] stack = Thread.currentThread().getStackTrace();
+ if (stack.length < n+1) return "test";
+ return stack[n].getMethodName();
+ }
+ }
+
+ void validate(TestArg expected, TestArg actual) {
+ assertEquals(expected, actual);
+ assertEquals(actual.what, MSG_TIMEOUT);
+ }
+
+
+ /**
+ * Verify that a simple expiration succeeds. The timer is started for 10ms. The test
+ * procedure waits 5s for the expiration message, but under correct operation, the test will
+ * only take 10ms
+ */
+ @Test
+ public void testSimpleTimeout() throws Exception {
+ Helper helper = new Helper(1);
+ TestAnrTimer timer = new TestAnrTimer(helper);
+ TestArg t = new TestArg(1, 1);
+ timer.start(t, 10);
+ // Delivery is immediate but occurs on a different thread.
+ assertTrue(helper.await(5000));
+ TestArg[] result = helper.messages(1);
+ validate(t, result[0]);
+ }
+
+ /**
+ * Verify that if three timers are scheduled, they are delivered in time order.
+ */
+ @Test
+ public void testMultipleTimers() throws Exception {
+ // Expect three messages.
+ Helper helper = new Helper(3);
+ TestAnrTimer timer = new TestAnrTimer(helper);
+ TestArg t1 = new TestArg(1, 1);
+ TestArg t2 = new TestArg(1, 2);
+ TestArg t3 = new TestArg(1, 3);
+ timer.start(t1, 50);
+ timer.start(t2, 60);
+ timer.start(t3, 40);
+ // Delivery is immediate but occurs on a different thread.
+ assertTrue(helper.await(5000));
+ TestArg[] result = helper.messages(3);
+ validate(t3, result[0]);
+ validate(t1, result[1]);
+ validate(t2, result[2]);
+ }
+
+ /**
+ * Verify that a canceled timer is not delivered.
+ */
+ @Test
+ public void testCancelTimer() throws Exception {
+ // Expect two messages.
+ Helper helper = new Helper(2);
+ TestAnrTimer timer = new TestAnrTimer(helper);
+ TestArg t1 = new TestArg(1, 1);
+ TestArg t2 = new TestArg(1, 2);
+ TestArg t3 = new TestArg(1, 3);
+ timer.start(t1, 50);
+ timer.start(t2, 60);
+ timer.start(t3, 40);
+ // Briefly pause.
+ assertFalse(helper.await(10));
+ timer.cancel(t1);
+ // Delivery is immediate but occurs on a different thread.
+ assertTrue(helper.await(5000));
+ TestArg[] result = helper.messages(2);
+ validate(t3, result[0]);
+ validate(t2, result[1]);
+ }
+}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java b/services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java
new file mode 100644
index 000000000000..5febd02a75a8
--- /dev/null
+++ b/services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.notification;
+
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+
+import android.app.UiModeManager;
+import android.app.WallpaperManager;
+import android.hardware.display.ColorDisplayManager;
+import android.os.PowerManager;
+import android.platform.test.flag.junit.SetFlagsRule;
+import android.service.notification.ZenDeviceEffects;
+import android.testing.TestableContext;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(AndroidJUnit4.class)
+public class DefaultDeviceEffectsApplierTest {
+
+ @Rule
+ public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
+
+ private TestableContext mContext;
+ private DefaultDeviceEffectsApplier mApplier;
+ @Mock PowerManager mPowerManager;
+ @Mock ColorDisplayManager mColorDisplayManager;
+ @Mock UiModeManager mUiModeManager;
+ @Mock WallpaperManager mWallpaperManager;
+
+ @Before
+ public void setUp() {
+ MockitoAnnotations.initMocks(this);
+ mContext = new TestableContext(InstrumentationRegistry.getContext(), null);
+ mContext.addMockSystemService(PowerManager.class, mPowerManager);
+ mContext.addMockSystemService(ColorDisplayManager.class, mColorDisplayManager);
+ mContext.addMockSystemService(UiModeManager.class, mUiModeManager);
+ mContext.addMockSystemService(WallpaperManager.class, mWallpaperManager);
+
+ mApplier = new DefaultDeviceEffectsApplier(mContext);
+ }
+
+ @Test
+ public void apply_appliesEffects() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+
+ ZenDeviceEffects effects = new ZenDeviceEffects.Builder()
+ .setShouldSuppressAmbientDisplay(true)
+ .setShouldDimWallpaper(true)
+ .setShouldDisplayGrayscale(true)
+ .setShouldUseNightMode(true)
+ .build();
+ mApplier.apply(effects);
+
+ verify(mPowerManager).suppressAmbientDisplay(anyString(), eq(true));
+ verify(mColorDisplayManager).setSaturationLevel(eq(0));
+ verify(mWallpaperManager).setWallpaperDimAmount(eq(0.6f));
+ verifyZeroInteractions(mUiModeManager); // Coming later; adding now so test fails then. :)
+ }
+
+ @Test
+ public void apply_removesEffects() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+
+ ZenDeviceEffects noEffects = new ZenDeviceEffects.Builder().build();
+ mApplier.apply(noEffects);
+
+ verify(mPowerManager).suppressAmbientDisplay(anyString(), eq(false));
+ verify(mColorDisplayManager).setSaturationLevel(eq(100));
+ verify(mWallpaperManager).setWallpaperDimAmount(eq(0.0f));
+ verifyZeroInteractions(mUiModeManager);
+ }
+
+ @Test
+ public void apply_missingSomeServices_okay() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+ mContext.addMockSystemService(ColorDisplayManager.class, null);
+ mContext.addMockSystemService(WallpaperManager.class, null);
+
+ ZenDeviceEffects effects = new ZenDeviceEffects.Builder()
+ .setShouldSuppressAmbientDisplay(true)
+ .setShouldDimWallpaper(true)
+ .setShouldDisplayGrayscale(true)
+ .setShouldUseNightMode(true)
+ .build();
+ mApplier.apply(effects);
+
+ verify(mPowerManager).suppressAmbientDisplay(anyString(), eq(true));
+ // (And no crash from missing services).
+ }
+}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
index b1fdec911d86..ef6fcedf7339 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
@@ -77,9 +77,9 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.notNull;
import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.withSettings;
@@ -112,6 +112,7 @@ import android.platform.test.flag.junit.SetFlagsRule;
import android.provider.Settings;
import android.provider.Settings.Global;
import android.service.notification.Condition;
+import android.service.notification.DeviceEffectsApplier;
import android.service.notification.ZenDeviceEffects;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeConfig.ScheduleInfo;
@@ -188,8 +189,10 @@ public class ZenModeHelperTest extends UiServiceTestCase {
.appendPath("test")
.build();
- private static final Condition CONDITION = new Condition(CONDITION_ID, "",
+ private static final Condition CONDITION_TRUE = new Condition(CONDITION_ID, "",
Condition.STATE_TRUE);
+ private static final Condition CONDITION_FALSE = new Condition(CONDITION_ID, "",
+ Condition.STATE_FALSE);
private static final String TRIGGER_DESC = "Every Night, 10pm to 6am";
private static final int TYPE = TYPE_BEDTIME;
private static final boolean ALLOW_MANUAL = true;
@@ -201,6 +204,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
= NotificationManager.INTERRUPTION_FILTER_ALARMS;
private static final boolean ENABLED = true;
private static final int CREATION_TIME = 123;
+ private static final ZenDeviceEffects NO_EFFECTS = new ZenDeviceEffects.Builder().build();
@Rule
public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
@@ -212,6 +216,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
private TestableLooper mTestableLooper;
private ZenModeHelper mZenModeHelper;
private ContentResolver mContentResolver;
+ @Mock DeviceEffectsApplier mDeviceEffectsApplier;
@Mock AppOpsManager mAppOps;
TestableFlagResolver mTestFlagResolver = new TestableFlagResolver();
ZenModeEventLoggerFake mZenModeEventLogger;
@@ -238,8 +243,9 @@ public class ZenModeHelperTest extends UiServiceTestCase {
when(mPackageManager.getResourcesForApplication(anyString())).thenReturn(
mResources);
- when(mContext.getSystemService(AppOpsManager.class)).thenReturn(mAppOps);
- when(mContext.getSystemService(NotificationManager.class)).thenReturn(mNotificationManager);
+ mContext.addMockSystemService(AppOpsManager.class, mAppOps);
+ mContext.addMockSystemService(NotificationManager.class, mNotificationManager);
+
mConditionProviders = new ConditionProviders(mContext, new UserProfiles(),
AppGlobals.getPackageManager());
mConditionProviders.addSystemProvider(new CountdownConditionProvider());
@@ -609,7 +615,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// and we're setting zen mode on
Settings.Secure.putInt(mContentResolver, Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 1);
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_SETTINGS_UPDATED, 0);
- mZenModeHelper.mIsBootComplete = true;
+ mZenModeHelper.mIsSystemServicesReady = true;
mZenModeHelper.mConsolidatedPolicy = new Policy(0, 0, 0, 0, 0, 0);
mZenModeHelper.setZenModeSetting(ZEN_MODE_IMPORTANT_INTERRUPTIONS);
@@ -624,7 +630,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// doesn't show upgrade notification if stored settings says don't show
Settings.Secure.putInt(mContentResolver, Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_SETTINGS_UPDATED, 0);
- mZenModeHelper.mIsBootComplete = true;
+ mZenModeHelper.mIsSystemServicesReady = true;
mZenModeHelper.setZenModeSetting(ZEN_MODE_IMPORTANT_INTERRUPTIONS);
verify(mNotificationManager, never()).notify(eq(ZenModeHelper.TAG),
@@ -636,7 +642,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// doesn't show upgrade notification since zen was already updated
Settings.Secure.putInt(mContentResolver, Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_SETTINGS_UPDATED, 1);
- mZenModeHelper.mIsBootComplete = true;
+ mZenModeHelper.mIsSystemServicesReady = true;
mZenModeHelper.setZenModeSetting(ZEN_MODE_IMPORTANT_INTERRUPTIONS);
verify(mNotificationManager, never()).notify(eq(ZenModeHelper.TAG),
@@ -3060,7 +3066,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
rule.configurationActivity = CONFIG_ACTIVITY;
rule.component = OWNER;
rule.conditionId = CONDITION_ID;
- rule.condition = CONDITION;
+ rule.condition = CONDITION_TRUE;
rule.enabled = ENABLED;
rule.creationTime = 123;
rule.id = "id";
@@ -3350,6 +3356,84 @@ public class ZenModeHelperTest extends UiServiceTestCase {
}
@Test
+ public void testDeviceEffects_applied() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+ mZenModeHelper.setDeviceEffectsApplier(mDeviceEffectsApplier);
+
+ ZenDeviceEffects effects = new ZenDeviceEffects.Builder()
+ .setShouldSuppressAmbientDisplay(true)
+ .setShouldDimWallpaper(true)
+ .build();
+ String ruleId = addRuleWithEffects(effects);
+ verify(mDeviceEffectsApplier, never()).apply(any());
+
+ mZenModeHelper.setAutomaticZenRuleState(ruleId, CONDITION_TRUE, CUSTOM_PKG_UID, false);
+ mTestableLooper.processAllMessages();
+
+ verify(mDeviceEffectsApplier).apply(eq(effects));
+ }
+
+ @Test
+ public void testDeviceEffects_onDeactivateRule_applied() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+ mZenModeHelper.setDeviceEffectsApplier(mDeviceEffectsApplier);
+
+ ZenDeviceEffects zde = new ZenDeviceEffects.Builder().setShouldUseNightMode(true).build();
+ String ruleId = addRuleWithEffects(zde);
+ mZenModeHelper.setAutomaticZenRuleState(ruleId, CONDITION_TRUE, CUSTOM_PKG_UID, false);
+ mTestableLooper.processAllMessages();
+ verify(mDeviceEffectsApplier).apply(eq(zde));
+
+ mZenModeHelper.setAutomaticZenRuleState(ruleId, CONDITION_FALSE, CUSTOM_PKG_UID, false);
+ mTestableLooper.processAllMessages();
+
+ verify(mDeviceEffectsApplier).apply(eq(NO_EFFECTS));
+ }
+
+ @Test
+ public void testDeviceEffects_noChangeToConsolidatedEffects_notApplied() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+ mZenModeHelper.setDeviceEffectsApplier(mDeviceEffectsApplier);
+
+ ZenDeviceEffects zde = new ZenDeviceEffects.Builder().setShouldUseNightMode(true).build();
+ String ruleId = addRuleWithEffects(zde);
+ mZenModeHelper.setAutomaticZenRuleState(ruleId, CONDITION_TRUE, CUSTOM_PKG_UID, false);
+ mTestableLooper.processAllMessages();
+ verify(mDeviceEffectsApplier).apply(eq(zde));
+
+ // Now create and activate a second rule that doesn't add any more effects.
+ String secondRuleId = addRuleWithEffects(zde);
+ mZenModeHelper.setAutomaticZenRuleState(secondRuleId, CONDITION_TRUE, CUSTOM_PKG_UID,
+ false);
+ mTestableLooper.processAllMessages();
+
+ verifyNoMoreInteractions(mDeviceEffectsApplier);
+ }
+
+ @Test
+ public void testDeviceEffects_activeBeforeApplierProvided_appliedWhenProvided() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+
+ ZenDeviceEffects zde = new ZenDeviceEffects.Builder().setShouldUseNightMode(true).build();
+ String ruleId = addRuleWithEffects(zde);
+ verify(mDeviceEffectsApplier, never()).apply(any());
+
+ mZenModeHelper.setAutomaticZenRuleState(ruleId, CONDITION_TRUE, CUSTOM_PKG_UID, false);
+ mTestableLooper.processAllMessages();
+ verify(mDeviceEffectsApplier, never()).apply(any());
+
+ mZenModeHelper.setDeviceEffectsApplier(mDeviceEffectsApplier);
+ verify(mDeviceEffectsApplier).apply(eq(zde));
+ }
+
+ private String addRuleWithEffects(ZenDeviceEffects effects) {
+ AutomaticZenRule rule = new AutomaticZenRule.Builder("Test", CONDITION_ID)
+ .setDeviceEffects(effects)
+ .build();
+ return mZenModeHelper.addAutomaticZenRule("pkg", rule, "", CUSTOM_PKG_UID, FROM_APP);
+ }
+
+ @Test
public void applyGlobalZenModeAsImplicitZenRule_createsImplicitRuleAndActivatesIt() {
mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
mZenModeHelper.mConfig.automaticRules.clear();
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
index 7239ba9cd07e..b214591610de 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
@@ -18,6 +18,7 @@ package com.android.server.voiceinteraction;
import android.Manifest;
import android.annotation.CallbackExecutor;
+import android.annotation.EnforcePermission;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
@@ -1567,16 +1568,19 @@ public class VoiceInteractionManagerService extends SystemService {
}
@Override
- public boolean setSandboxedDetectionTrainingDataOp(int opMode) {
- synchronized (this) {
- enforceIsCallerPreinstalledAssistant();
+ @EnforcePermission(android.Manifest.permission.MANAGE_HOTWORD_DETECTION)
+ public void setIsReceiveSandboxedTrainingDataAllowed(boolean allowed) {
+ super.setIsReceiveSandboxedTrainingDataAllowed_enforcePermission();
+ synchronized (this) {
if (mImpl == null) {
- Slog.w(TAG, "setSandboxedDetectionTrainingDataop without running"
- + " voice interaction service");
- return false;
+ throw new IllegalStateException(
+ "setIsReceiveSandboxedTrainingDataAllowed without running voice "
+ + "interaction service");
}
+ enforceIsCallerPreinstalledAssistant();
+
int callingUid = Binder.getCallingUid();
final long caller = Binder.clearCallingIdentity();
try {
@@ -1584,12 +1588,11 @@ public class VoiceInteractionManagerService extends SystemService {
mContext.getSystemService(Context.APP_OPS_SERVICE);
appOpsManager.setUidMode(
AppOpsManager.OP_RECEIVE_SANDBOXED_DETECTION_TRAINING_DATA,
- callingUid, opMode);
+ callingUid, allowed ? AppOpsManager.MODE_ALLOWED :
+ AppOpsManager.MODE_ERRORED);
} finally {
Binder.restoreCallingIdentity(caller);
}
-
- return true;
}
}
diff --git a/tests/FlickerTests/ActivityEmbedding/Android.bp b/tests/FlickerTests/ActivityEmbedding/Android.bp
index 9eeec7c8ddda..2cdf54248ebc 100644
--- a/tests/FlickerTests/ActivityEmbedding/Android.bp
+++ b/tests/FlickerTests/ActivityEmbedding/Android.bp
@@ -29,6 +29,8 @@ android_test {
manifest: "AndroidManifest.xml",
package_name: "com.android.server.wm.flicker",
instrumentation_target_package: "com.android.server.wm.flicker",
+ test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
static_libs: ["FlickerTestsBase"],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/ActivityEmbedding/AndroidManifest.xml b/tests/FlickerTests/ActivityEmbedding/AndroidManifest.xml
index f867ffb679c5..6f8f008cf85b 100644
--- a/tests/FlickerTests/ActivityEmbedding/AndroidManifest.xml
+++ b/tests/FlickerTests/ActivityEmbedding/AndroidManifest.xml
@@ -17,7 +17,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- package="com.android.server.wm.flick">
+ package="com.android.server.wm.flicker">
<uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29"/>
<!-- Read and write traces from external storage -->
diff --git a/tests/FlickerTests/ActivityEmbedding/trace_config/trace_config.textproto b/tests/FlickerTests/ActivityEmbedding/trace_config/trace_config.textproto
index c9a35aca9085..c4edc1a5c0f7 100644
--- a/tests/FlickerTests/ActivityEmbedding/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/ActivityEmbedding/trace_config/trace_config.textproto
@@ -62,12 +62,6 @@ data_sources: {
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
- atrace_apps: "com.android.server.wm.flicker.close"
- atrace_apps: "com.android.server.wm.flicker.ime"
- atrace_apps: "com.android.server.wm.flicker.launch"
- atrace_apps: "com.android.server.wm.flicker.quickswitch"
- atrace_apps: "com.android.server.wm.flicker.rotation"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
atrace_apps: "com.google.android.apps.nexuslauncher"
diff --git a/tests/FlickerTests/Android.bp b/tests/FlickerTests/Android.bp
index 514f89511fb1..1d71f95ef64f 100644
--- a/tests/FlickerTests/Android.bp
+++ b/tests/FlickerTests/Android.bp
@@ -23,13 +23,6 @@ package {
default_applicable_licenses: ["frameworks_base_license"],
}
-filegroup {
- name: "FlickerServiceTests-src",
- srcs: [
- "src/**/*",
- ],
-}
-
java_defaults {
name: "FlickerTestsDefault",
platform_apis: true,
@@ -49,10 +42,7 @@ java_defaults {
"wm-flicker-common-app-helpers",
"wm-shell-flicker-utils",
],
- data: [
- ":FlickerTestApp",
- "trace_config/*",
- ],
+ data: [":FlickerTestApp"],
}
java_library {
diff --git a/tests/FlickerTests/AppClose/Android.bp b/tests/FlickerTests/AppClose/Android.bp
index 151d12f2a8ca..93fdd652510d 100644
--- a/tests/FlickerTests/AppClose/Android.bp
+++ b/tests/FlickerTests/AppClose/Android.bp
@@ -30,4 +30,5 @@ android_test {
test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
static_libs: ["FlickerTestsBase"],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/AppClose/trace_config/trace_config.textproto b/tests/FlickerTests/AppClose/trace_config/trace_config.textproto
index c9a35aca9085..6a0afc60bc95 100644
--- a/tests/FlickerTests/AppClose/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/AppClose/trace_config/trace_config.textproto
@@ -61,13 +61,7 @@ data_sources: {
atrace_categories: "input"
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
- atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
atrace_apps: "com.android.server.wm.flicker.close"
- atrace_apps: "com.android.server.wm.flicker.ime"
- atrace_apps: "com.android.server.wm.flicker.launch"
- atrace_apps: "com.android.server.wm.flicker.quickswitch"
- atrace_apps: "com.android.server.wm.flicker.rotation"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
atrace_apps: "com.google.android.apps.nexuslauncher"
diff --git a/tests/FlickerTests/AppLaunch/Android.bp b/tests/FlickerTests/AppLaunch/Android.bp
index f33384df6e7f..f5e962124b37 100644
--- a/tests/FlickerTests/AppLaunch/Android.bp
+++ b/tests/FlickerTests/AppLaunch/Android.bp
@@ -50,6 +50,7 @@ android_test {
"FlickerTestsBase",
"FlickerTestsAppLaunchCommon",
],
+ data: ["trace_config/*"],
}
android_test {
@@ -66,4 +67,5 @@ android_test {
"FlickerTestsBase",
"FlickerTestsAppLaunchCommon",
],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/AppLaunch/trace_config/trace_config.textproto b/tests/FlickerTests/AppLaunch/trace_config/trace_config.textproto
index c9a35aca9085..f27177ffee3e 100644
--- a/tests/FlickerTests/AppLaunch/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/AppLaunch/trace_config/trace_config.textproto
@@ -61,13 +61,7 @@ data_sources: {
atrace_categories: "input"
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
- atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
- atrace_apps: "com.android.server.wm.flicker.close"
- atrace_apps: "com.android.server.wm.flicker.ime"
atrace_apps: "com.android.server.wm.flicker.launch"
- atrace_apps: "com.android.server.wm.flicker.quickswitch"
- atrace_apps: "com.android.server.wm.flicker.rotation"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
atrace_apps: "com.google.android.apps.nexuslauncher"
diff --git a/tests/FlickerTests/FlickerService/Android.bp b/tests/FlickerTests/FlickerService/Android.bp
index 1a381150dfb0..ef74e942bdba 100644
--- a/tests/FlickerTests/FlickerService/Android.bp
+++ b/tests/FlickerTests/FlickerService/Android.bp
@@ -30,4 +30,5 @@ android_test {
test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
static_libs: ["FlickerTestsBase"],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/FlickerService/trace_config/trace_config.textproto b/tests/FlickerTests/FlickerService/trace_config/trace_config.textproto
index c9a35aca9085..a4f3ecfa8976 100644
--- a/tests/FlickerTests/FlickerService/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/FlickerService/trace_config/trace_config.textproto
@@ -61,13 +61,7 @@ data_sources: {
atrace_categories: "input"
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
- atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
- atrace_apps: "com.android.server.wm.flicker.close"
- atrace_apps: "com.android.server.wm.flicker.ime"
- atrace_apps: "com.android.server.wm.flicker.launch"
- atrace_apps: "com.android.server.wm.flicker.quickswitch"
- atrace_apps: "com.android.server.wm.flicker.rotation"
+ atrace_apps: "com.android.server.wm.flicker.service"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
atrace_apps: "com.google.android.apps.nexuslauncher"
diff --git a/tests/FlickerTests/IME/Android.bp b/tests/FlickerTests/IME/Android.bp
index 057d9fcdb796..1141e5f3ae2f 100644
--- a/tests/FlickerTests/IME/Android.bp
+++ b/tests/FlickerTests/IME/Android.bp
@@ -40,6 +40,7 @@ android_test {
test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
static_libs: ["FlickerTestsBase"],
+ data: ["trace_config/*"],
}
java_library {
@@ -59,6 +60,7 @@ android_test {
"FlickerTestsBase",
"FlickerTestsImeCommon",
],
+ data: ["trace_config/*"],
}
android_test {
@@ -75,4 +77,5 @@ android_test {
"FlickerTestsBase",
"FlickerTestsImeCommon",
],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/IME/trace_config/trace_config.textproto b/tests/FlickerTests/IME/trace_config/trace_config.textproto
index c9a35aca9085..b722fe5bc00a 100644
--- a/tests/FlickerTests/IME/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/IME/trace_config/trace_config.textproto
@@ -61,13 +61,7 @@ data_sources: {
atrace_categories: "input"
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
- atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
- atrace_apps: "com.android.server.wm.flicker.close"
atrace_apps: "com.android.server.wm.flicker.ime"
- atrace_apps: "com.android.server.wm.flicker.launch"
- atrace_apps: "com.android.server.wm.flicker.quickswitch"
- atrace_apps: "com.android.server.wm.flicker.rotation"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
atrace_apps: "com.google.android.apps.nexuslauncher"
diff --git a/tests/FlickerTests/Notification/Android.bp b/tests/FlickerTests/Notification/Android.bp
index 5bed568aacd1..4648383b2771 100644
--- a/tests/FlickerTests/Notification/Android.bp
+++ b/tests/FlickerTests/Notification/Android.bp
@@ -30,4 +30,5 @@ android_test {
test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
static_libs: ["FlickerTestsBase"],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/Notification/trace_config/trace_config.textproto b/tests/FlickerTests/Notification/trace_config/trace_config.textproto
index c9a35aca9085..dc8c88c5b41c 100644
--- a/tests/FlickerTests/Notification/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/Notification/trace_config/trace_config.textproto
@@ -61,13 +61,7 @@ data_sources: {
atrace_categories: "input"
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
- atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
- atrace_apps: "com.android.server.wm.flicker.close"
- atrace_apps: "com.android.server.wm.flicker.ime"
- atrace_apps: "com.android.server.wm.flicker.launch"
- atrace_apps: "com.android.server.wm.flicker.quickswitch"
- atrace_apps: "com.android.server.wm.flicker.rotation"
+ atrace_apps: "com.android.server.wm.flicker.notification"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
atrace_apps: "com.google.android.apps.nexuslauncher"
diff --git a/tests/FlickerTests/QuickSwitch/Android.bp b/tests/FlickerTests/QuickSwitch/Android.bp
index 64f718333a59..8755d0e3b304 100644
--- a/tests/FlickerTests/QuickSwitch/Android.bp
+++ b/tests/FlickerTests/QuickSwitch/Android.bp
@@ -30,4 +30,5 @@ android_test {
test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
static_libs: ["FlickerTestsBase"],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/QuickSwitch/trace_config/trace_config.textproto b/tests/FlickerTests/QuickSwitch/trace_config/trace_config.textproto
index c9a35aca9085..cd70ad59f1ed 100644
--- a/tests/FlickerTests/QuickSwitch/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/QuickSwitch/trace_config/trace_config.textproto
@@ -61,13 +61,7 @@ data_sources: {
atrace_categories: "input"
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
- atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
- atrace_apps: "com.android.server.wm.flicker.close"
- atrace_apps: "com.android.server.wm.flicker.ime"
- atrace_apps: "com.android.server.wm.flicker.launch"
atrace_apps: "com.android.server.wm.flicker.quickswitch"
- atrace_apps: "com.android.server.wm.flicker.rotation"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
atrace_apps: "com.google.android.apps.nexuslauncher"
diff --git a/tests/FlickerTests/Rotation/Android.bp b/tests/FlickerTests/Rotation/Android.bp
index 8e93b5b340c4..233a27691e21 100644
--- a/tests/FlickerTests/Rotation/Android.bp
+++ b/tests/FlickerTests/Rotation/Android.bp
@@ -30,4 +30,5 @@ android_test {
test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
static_libs: ["FlickerTestsBase"],
+ data: ["trace_config/*"],
}
diff --git a/tests/FlickerTests/Rotation/trace_config/trace_config.textproto b/tests/FlickerTests/Rotation/trace_config/trace_config.textproto
index c9a35aca9085..eeb542f2a349 100644
--- a/tests/FlickerTests/Rotation/trace_config/trace_config.textproto
+++ b/tests/FlickerTests/Rotation/trace_config/trace_config.textproto
@@ -61,12 +61,6 @@ data_sources: {
atrace_categories: "input"
atrace_categories: "binder_driver"
atrace_categories: "sched_process_exit"
- atrace_apps: "com.android.server.wm.flicker"
- atrace_apps: "com.android.server.wm.flicker.other"
- atrace_apps: "com.android.server.wm.flicker.close"
- atrace_apps: "com.android.server.wm.flicker.ime"
- atrace_apps: "com.android.server.wm.flicker.launch"
- atrace_apps: "com.android.server.wm.flicker.quickswitch"
atrace_apps: "com.android.server.wm.flicker.rotation"
atrace_apps: "com.android.server.wm.flicker.testapp"
atrace_apps: "com.android.systemui"
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt
index ad272a052220..ce92eac3fc59 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt
@@ -40,10 +40,9 @@ abstract class BaseTest
constructor(
protected val flicker: LegacyFlickerTest,
protected val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation(),
- protected val tapl: LauncherInstrumentation = LauncherInstrumentation()
) {
- init {
- tapl.setExpectedRotationCheckEnabled(true)
+ protected val tapl: LauncherInstrumentation by lazy {
+ LauncherInstrumentation().also { it.expectedRotationCheckEnabled = true }
}
private val logTag = this::class.java.simpleName
diff --git a/tests/SilkFX/OWNERS b/tests/SilkFX/OWNERS
deleted file mode 100644
index c88a9f82c347..000000000000
--- a/tests/SilkFX/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-include /libs/hwui/OWNERS
diff --git a/tests/HwAccelerationTest/.classpath b/tests/graphics/HwAccelerationTest/.classpath
index 609aa00ebc43..609aa00ebc43 100644
--- a/tests/HwAccelerationTest/.classpath
+++ b/tests/graphics/HwAccelerationTest/.classpath
diff --git a/tests/HwAccelerationTest/.gitignore b/tests/graphics/HwAccelerationTest/.gitignore
index f178f174effb..f178f174effb 100644
--- a/tests/HwAccelerationTest/.gitignore
+++ b/tests/graphics/HwAccelerationTest/.gitignore
diff --git a/tests/HwAccelerationTest/Android.bp b/tests/graphics/HwAccelerationTest/Android.bp
index 51848f2857c9..51848f2857c9 100644
--- a/tests/HwAccelerationTest/Android.bp
+++ b/tests/graphics/HwAccelerationTest/Android.bp
diff --git a/tests/HwAccelerationTest/AndroidManifest.xml b/tests/graphics/HwAccelerationTest/AndroidManifest.xml
index db3a992b9c7b..db3a992b9c7b 100644
--- a/tests/HwAccelerationTest/AndroidManifest.xml
+++ b/tests/graphics/HwAccelerationTest/AndroidManifest.xml
diff --git a/tests/HwAccelerationTest/default.properties b/tests/graphics/HwAccelerationTest/default.properties
index da2dcdd13172..da2dcdd13172 100644
--- a/tests/HwAccelerationTest/default.properties
+++ b/tests/graphics/HwAccelerationTest/default.properties
diff --git a/tests/HwAccelerationTest/jni/Android.bp b/tests/graphics/HwAccelerationTest/jni/Android.bp
index 8edddab0ad1f..8edddab0ad1f 100644
--- a/tests/HwAccelerationTest/jni/Android.bp
+++ b/tests/graphics/HwAccelerationTest/jni/Android.bp
diff --git a/tests/HwAccelerationTest/jni/native-lib.cpp b/tests/graphics/HwAccelerationTest/jni/native-lib.cpp
index 407d4bf76336..407d4bf76336 100644
--- a/tests/HwAccelerationTest/jni/native-lib.cpp
+++ b/tests/graphics/HwAccelerationTest/jni/native-lib.cpp
diff --git a/tests/HwAccelerationTest/res/anim/accelerate_interpolator_2.xml b/tests/graphics/HwAccelerationTest/res/anim/accelerate_interpolator_2.xml
index e4a8d480a28b..e4a8d480a28b 100644
--- a/tests/HwAccelerationTest/res/anim/accelerate_interpolator_2.xml
+++ b/tests/graphics/HwAccelerationTest/res/anim/accelerate_interpolator_2.xml
diff --git a/tests/HwAccelerationTest/res/anim/fade_in.xml b/tests/graphics/HwAccelerationTest/res/anim/fade_in.xml
index 34310f53fc54..34310f53fc54 100644
--- a/tests/HwAccelerationTest/res/anim/fade_in.xml
+++ b/tests/graphics/HwAccelerationTest/res/anim/fade_in.xml
diff --git a/tests/HwAccelerationTest/res/anim/fade_out.xml b/tests/graphics/HwAccelerationTest/res/anim/fade_out.xml
index 9832c322ff65..9832c322ff65 100644
--- a/tests/HwAccelerationTest/res/anim/fade_out.xml
+++ b/tests/graphics/HwAccelerationTest/res/anim/fade_out.xml
diff --git a/tests/HwAccelerationTest/res/anim/slide_off_left.xml b/tests/graphics/HwAccelerationTest/res/anim/slide_off_left.xml
index f05de3937586..f05de3937586 100644
--- a/tests/HwAccelerationTest/res/anim/slide_off_left.xml
+++ b/tests/graphics/HwAccelerationTest/res/anim/slide_off_left.xml
diff --git a/tests/HwAccelerationTest/res/drawable-hdpi/appwidget_background.xml b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/appwidget_background.xml
index abbb9e69af94..abbb9e69af94 100644
--- a/tests/HwAccelerationTest/res/drawable-hdpi/appwidget_background.xml
+++ b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/appwidget_background.xml
diff --git a/tests/HwAccelerationTest/res/drawable-hdpi/icon.png b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/icon.png
index 60fbdf5d0403..60fbdf5d0403 100644
--- a/tests/HwAccelerationTest/res/drawable-hdpi/icon.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-hdpi/sunset1.jpg b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset1.jpg
index 086c05542836..086c05542836 100644
--- a/tests/HwAccelerationTest/res/drawable-hdpi/sunset1.jpg
+++ b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset1.jpg
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-hdpi/sunset2.png b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset2.png
index 3258ee745389..3258ee745389 100644
--- a/tests/HwAccelerationTest/res/drawable-hdpi/sunset2.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset2.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-hdpi/sunset3.png b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset3.png
index 6508b27a1452..6508b27a1452 100644
--- a/tests/HwAccelerationTest/res/drawable-hdpi/sunset3.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/sunset3.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-hdpi/widget_header.png b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/widget_header.png
index cd9ec4488486..cd9ec4488486 100644
--- a/tests/HwAccelerationTest/res/drawable-hdpi/widget_header.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-hdpi/widget_header.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-mdpi/expander_ic_maximized.9.png b/tests/graphics/HwAccelerationTest/res/drawable-mdpi/expander_ic_maximized.9.png
index d5c32766cece..d5c32766cece 100644
--- a/tests/HwAccelerationTest/res/drawable-mdpi/expander_ic_maximized.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-mdpi/expander_ic_maximized.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-mdpi/expander_ic_minimized.9.png b/tests/graphics/HwAccelerationTest/res/drawable-mdpi/expander_ic_minimized.9.png
index 4515b42177bb..4515b42177bb 100644
--- a/tests/HwAccelerationTest/res/drawable-mdpi/expander_ic_minimized.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-mdpi/expander_ic_minimized.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg.9.png
index 80491912d80b..80491912d80b 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_focus.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_focus.9.png
index c81f67582110..c81f67582110 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_focus.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_focus.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_press.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_press.9.png
index d060b77556bb..d060b77556bb 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_press.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/appwidget_bg_press.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/green_gradient.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/green_gradient.9.png
index a535678ab531..a535678ab531 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/green_gradient.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/green_gradient.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/large_photo.jpg b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/large_photo.jpg
index e23dbb093f39..e23dbb093f39 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/large_photo.jpg
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/large_photo.jpg
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/patch.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/patch.9.png
index e3b3639e86f2..e3b3639e86f2 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/patch.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/patch.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/patch2.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/patch2.9.png
index f65a35592cd4..f65a35592cd4 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/patch2.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/patch2.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_bg_holo_dark.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_bg_holo_dark.9.png
index 089704e90869..089704e90869 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_bg_holo_dark.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_bg_holo_dark.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_primary_holo_dark.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_primary_holo_dark.9.png
index 385dbc4a62f6..385dbc4a62f6 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_primary_holo_dark.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_primary_holo_dark.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_secondary_holo_dark.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_secondary_holo_dark.9.png
index f1510b247065..f1510b247065 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/progress_vertical_secondary_holo_dark.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/progress_vertical_secondary_holo_dark.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/scratches.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scratches.png
index cc8adf15f4f0..cc8adf15f4f0 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/scratches.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scratches.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_primary_holo.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_primary_holo.9.png
index 4208c6f78fde..4208c6f78fde 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_primary_holo.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_primary_holo.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_secondary_holo.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_secondary_holo.9.png
index b25fb2f18231..b25fb2f18231 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_secondary_holo.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_secondary_holo.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_dark.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_dark.9.png
index 25129c69600b..25129c69600b 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_dark.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_dark.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_light.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_light.9.png
index 1505e0eeefa4..1505e0eeefa4 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_light.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/scrubber_vertical_track_holo_light.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/spot_mask.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/spot_mask.png
index 89537594e1a6..89537594e1a6 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/spot_mask.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/spot_mask.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg
index 6e1a866dfb00..6e1a866dfb00 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/very_large_photo.jpg
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/weather_2.jpg b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/weather_2.jpg
index b5aff104207a..b5aff104207a 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/weather_2.jpg
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/weather_2.jpg
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable-nodpi/widget_title_bg.9.png b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/widget_title_bg.9.png
index 79615c237ffe..79615c237ffe 100644
--- a/tests/HwAccelerationTest/res/drawable-nodpi/widget_title_bg.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable-nodpi/widget_title_bg.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/appwidget_background.xml b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_background.xml
index abbb9e69af94..abbb9e69af94 100644
--- a/tests/HwAccelerationTest/res/drawable/appwidget_background.xml
+++ b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_background.xml
diff --git a/tests/HwAccelerationTest/res/drawable/appwidget_bg.9.png b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg.9.png
index 80491912d80b..80491912d80b 100644
--- a/tests/HwAccelerationTest/res/drawable/appwidget_bg.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/appwidget_bg_focus.9.png b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg_focus.9.png
index c81f67582110..c81f67582110 100644
--- a/tests/HwAccelerationTest/res/drawable/appwidget_bg_focus.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg_focus.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/appwidget_bg_press.9.png b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg_press.9.png
index d060b77556bb..d060b77556bb 100644
--- a/tests/HwAccelerationTest/res/drawable/appwidget_bg_press.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/appwidget_bg_press.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/btn_toggle_off.9.png b/tests/graphics/HwAccelerationTest/res/drawable/btn_toggle_off.9.png
index 26ee1c2e9259..26ee1c2e9259 100644
--- a/tests/HwAccelerationTest/res/drawable/btn_toggle_off.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/btn_toggle_off.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/btn_toggle_on.9.png b/tests/graphics/HwAccelerationTest/res/drawable/btn_toggle_on.9.png
index 53e95af9697d..53e95af9697d 100644
--- a/tests/HwAccelerationTest/res/drawable/btn_toggle_on.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/btn_toggle_on.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/default_wallpaper.png b/tests/graphics/HwAccelerationTest/res/drawable/default_wallpaper.png
index 91ad252507e5..91ad252507e5 100644
--- a/tests/HwAccelerationTest/res/drawable/default_wallpaper.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/default_wallpaper.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/gradient.xml b/tests/graphics/HwAccelerationTest/res/drawable/gradient.xml
index 756db0b23dbf..756db0b23dbf 100644
--- a/tests/HwAccelerationTest/res/drawable/gradient.xml
+++ b/tests/graphics/HwAccelerationTest/res/drawable/gradient.xml
diff --git a/tests/HwAccelerationTest/res/drawable/green_gradient.9.png b/tests/graphics/HwAccelerationTest/res/drawable/green_gradient.9.png
index a535678ab531..a535678ab531 100644
--- a/tests/HwAccelerationTest/res/drawable/green_gradient.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/green_gradient.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/icon.png b/tests/graphics/HwAccelerationTest/res/drawable/icon.png
index cb40a1988b52..cb40a1988b52 100644
--- a/tests/HwAccelerationTest/res/drawable/icon.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/icon.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/progress_vertical_holo_dark.xml b/tests/graphics/HwAccelerationTest/res/drawable/progress_vertical_holo_dark.xml
index 9eb54b729b1d..9eb54b729b1d 100644
--- a/tests/HwAccelerationTest/res/drawable/progress_vertical_holo_dark.xml
+++ b/tests/graphics/HwAccelerationTest/res/drawable/progress_vertical_holo_dark.xml
diff --git a/tests/HwAccelerationTest/res/drawable/robot.png b/tests/graphics/HwAccelerationTest/res/drawable/robot.png
index 8a9e6984be96..8a9e6984be96 100644
--- a/tests/HwAccelerationTest/res/drawable/robot.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/robot.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/robot_repeated.xml b/tests/graphics/HwAccelerationTest/res/drawable/robot_repeated.xml
index bbb15b71c3a5..bbb15b71c3a5 100644
--- a/tests/HwAccelerationTest/res/drawable/robot_repeated.xml
+++ b/tests/graphics/HwAccelerationTest/res/drawable/robot_repeated.xml
diff --git a/tests/HwAccelerationTest/res/drawable/round_rect_background.xml b/tests/graphics/HwAccelerationTest/res/drawable/round_rect_background.xml
index 14d40736b3b9..14d40736b3b9 100644
--- a/tests/HwAccelerationTest/res/drawable/round_rect_background.xml
+++ b/tests/graphics/HwAccelerationTest/res/drawable/round_rect_background.xml
diff --git a/tests/HwAccelerationTest/res/drawable/scrubber_progress_vertical_holo_dark.xml b/tests/graphics/HwAccelerationTest/res/drawable/scrubber_progress_vertical_holo_dark.xml
index 0cc56bfa4260..0cc56bfa4260 100644
--- a/tests/HwAccelerationTest/res/drawable/scrubber_progress_vertical_holo_dark.xml
+++ b/tests/graphics/HwAccelerationTest/res/drawable/scrubber_progress_vertical_holo_dark.xml
diff --git a/tests/HwAccelerationTest/res/drawable/sunset1.jpg b/tests/graphics/HwAccelerationTest/res/drawable/sunset1.jpg
index 3b4e056b70d0..3b4e056b70d0 100644
--- a/tests/HwAccelerationTest/res/drawable/sunset1.jpg
+++ b/tests/graphics/HwAccelerationTest/res/drawable/sunset1.jpg
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/sunset2.png b/tests/graphics/HwAccelerationTest/res/drawable/sunset2.png
index 3258ee745389..3258ee745389 100644
--- a/tests/HwAccelerationTest/res/drawable/sunset2.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/sunset2.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/sunset3.png b/tests/graphics/HwAccelerationTest/res/drawable/sunset3.png
index 6508b27a1452..6508b27a1452 100644
--- a/tests/HwAccelerationTest/res/drawable/sunset3.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/sunset3.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/widget_header.png b/tests/graphics/HwAccelerationTest/res/drawable/widget_header.png
index 0297dd109bdf..0297dd109bdf 100644
--- a/tests/HwAccelerationTest/res/drawable/widget_header.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/widget_header.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/drawable/widget_title_bg.9.png b/tests/graphics/HwAccelerationTest/res/drawable/widget_title_bg.9.png
index 79615c237ffe..79615c237ffe 100644
--- a/tests/HwAccelerationTest/res/drawable/widget_title_bg.9.png
+++ b/tests/graphics/HwAccelerationTest/res/drawable/widget_title_bg.9.png
Binary files differ
diff --git a/tests/HwAccelerationTest/res/layout/_advanced_blend.xml b/tests/graphics/HwAccelerationTest/res/layout/_advanced_blend.xml
index 5b6fd3c2624a..5b6fd3c2624a 100644
--- a/tests/HwAccelerationTest/res/layout/_advanced_blend.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/_advanced_blend.xml
diff --git a/tests/HwAccelerationTest/res/layout/_advanced_gradient.xml b/tests/graphics/HwAccelerationTest/res/layout/_advanced_gradient.xml
index 5e32ed2ec7cb..5e32ed2ec7cb 100644
--- a/tests/HwAccelerationTest/res/layout/_advanced_gradient.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/_advanced_gradient.xml
diff --git a/tests/HwAccelerationTest/res/layout/_layers.xml b/tests/graphics/HwAccelerationTest/res/layout/_layers.xml
index 25c76ac710cf..25c76ac710cf 100644
--- a/tests/HwAccelerationTest/res/layout/_layers.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/_layers.xml
diff --git a/tests/HwAccelerationTest/res/layout/_lines.xml b/tests/graphics/HwAccelerationTest/res/layout/_lines.xml
index c24dc25af9ac..c24dc25af9ac 100644
--- a/tests/HwAccelerationTest/res/layout/_lines.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/_lines.xml
diff --git a/tests/HwAccelerationTest/res/layout/_newlayers.xml b/tests/graphics/HwAccelerationTest/res/layout/_newlayers.xml
index 5c37e371aeff..5c37e371aeff 100644
--- a/tests/HwAccelerationTest/res/layout/_newlayers.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/_newlayers.xml
diff --git a/tests/HwAccelerationTest/res/layout/_paths.xml b/tests/graphics/HwAccelerationTest/res/layout/_paths.xml
index 34baf8474b6c..34baf8474b6c 100644
--- a/tests/HwAccelerationTest/res/layout/_paths.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/_paths.xml
diff --git a/tests/HwAccelerationTest/res/layout/_shaders.xml b/tests/graphics/HwAccelerationTest/res/layout/_shaders.xml
index 070ac1291f2c..070ac1291f2c 100644
--- a/tests/HwAccelerationTest/res/layout/_shaders.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/_shaders.xml
diff --git a/tests/HwAccelerationTest/res/layout/colored_shadows_activity.xml b/tests/graphics/HwAccelerationTest/res/layout/colored_shadows_activity.xml
index 18633250cfcb..18633250cfcb 100644
--- a/tests/HwAccelerationTest/res/layout/colored_shadows_activity.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/colored_shadows_activity.xml
diff --git a/tests/HwAccelerationTest/res/layout/colored_shadows_row.xml b/tests/graphics/HwAccelerationTest/res/layout/colored_shadows_row.xml
index 61b075974926..61b075974926 100644
--- a/tests/HwAccelerationTest/res/layout/colored_shadows_row.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/colored_shadows_row.xml
diff --git a/tests/HwAccelerationTest/res/layout/date_picker.xml b/tests/graphics/HwAccelerationTest/res/layout/date_picker.xml
index 742a03bfd1c5..742a03bfd1c5 100644
--- a/tests/HwAccelerationTest/res/layout/date_picker.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/date_picker.xml
diff --git a/tests/HwAccelerationTest/res/layout/flipper_item.xml b/tests/graphics/HwAccelerationTest/res/layout/flipper_item.xml
index 43a7bbfc2deb..43a7bbfc2deb 100644
--- a/tests/HwAccelerationTest/res/layout/flipper_item.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/flipper_item.xml
diff --git a/tests/HwAccelerationTest/res/layout/form.xml b/tests/graphics/HwAccelerationTest/res/layout/form.xml
index 0b17db186cd0..0b17db186cd0 100644
--- a/tests/HwAccelerationTest/res/layout/form.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/form.xml
diff --git a/tests/HwAccelerationTest/res/layout/image_filter_activity.xml b/tests/graphics/HwAccelerationTest/res/layout/image_filter_activity.xml
index a0ee67ae0bef..a0ee67ae0bef 100644
--- a/tests/HwAccelerationTest/res/layout/image_filter_activity.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/image_filter_activity.xml
diff --git a/tests/HwAccelerationTest/res/layout/labels.xml b/tests/graphics/HwAccelerationTest/res/layout/labels.xml
index 695a2cc09db5..695a2cc09db5 100644
--- a/tests/HwAccelerationTest/res/layout/labels.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/labels.xml
diff --git a/tests/HwAccelerationTest/res/layout/list_activity.xml b/tests/graphics/HwAccelerationTest/res/layout/list_activity.xml
index 1a5d3d9202e2..1a5d3d9202e2 100644
--- a/tests/HwAccelerationTest/res/layout/list_activity.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/list_activity.xml
diff --git a/tests/HwAccelerationTest/res/layout/pen_stylus.xml b/tests/graphics/HwAccelerationTest/res/layout/pen_stylus.xml
index 37aafed208fb..37aafed208fb 100644
--- a/tests/HwAccelerationTest/res/layout/pen_stylus.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/pen_stylus.xml
diff --git a/tests/HwAccelerationTest/res/layout/projection.xml b/tests/graphics/HwAccelerationTest/res/layout/projection.xml
index b6e4c5ef6ad2..b6e4c5ef6ad2 100644
--- a/tests/HwAccelerationTest/res/layout/projection.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/projection.xml
diff --git a/tests/HwAccelerationTest/res/layout/projection_clipping.xml b/tests/graphics/HwAccelerationTest/res/layout/projection_clipping.xml
index 1ea9f9cd49f6..1ea9f9cd49f6 100644
--- a/tests/HwAccelerationTest/res/layout/projection_clipping.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/projection_clipping.xml
diff --git a/tests/HwAccelerationTest/res/layout/scrolling_stretch_surfaceview.xml b/tests/graphics/HwAccelerationTest/res/layout/scrolling_stretch_surfaceview.xml
index 77f5e60dc091..77f5e60dc091 100644
--- a/tests/HwAccelerationTest/res/layout/scrolling_stretch_surfaceview.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/scrolling_stretch_surfaceview.xml
diff --git a/tests/HwAccelerationTest/res/layout/stack.xml b/tests/graphics/HwAccelerationTest/res/layout/stack.xml
index b4d2d73a1c90..b4d2d73a1c90 100644
--- a/tests/HwAccelerationTest/res/layout/stack.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/stack.xml
diff --git a/tests/HwAccelerationTest/res/layout/stack_item.xml b/tests/graphics/HwAccelerationTest/res/layout/stack_item.xml
index 35040186b0e6..35040186b0e6 100644
--- a/tests/HwAccelerationTest/res/layout/stack_item.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/stack_item.xml
diff --git a/tests/HwAccelerationTest/res/layout/stretch_layout.xml b/tests/graphics/HwAccelerationTest/res/layout/stretch_layout.xml
index 81e0c019490f..81e0c019490f 100644
--- a/tests/HwAccelerationTest/res/layout/stretch_layout.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/stretch_layout.xml
diff --git a/tests/HwAccelerationTest/res/layout/text_fade.xml b/tests/graphics/HwAccelerationTest/res/layout/text_fade.xml
index 08a70b3a3e71..08a70b3a3e71 100644
--- a/tests/HwAccelerationTest/res/layout/text_fade.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/text_fade.xml
diff --git a/tests/HwAccelerationTest/res/layout/text_large.xml b/tests/graphics/HwAccelerationTest/res/layout/text_large.xml
index 85b374ce0c0f..85b374ce0c0f 100644
--- a/tests/HwAccelerationTest/res/layout/text_large.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/text_large.xml
diff --git a/tests/HwAccelerationTest/res/layout/text_medium.xml b/tests/graphics/HwAccelerationTest/res/layout/text_medium.xml
index 8e195e661169..8e195e661169 100644
--- a/tests/HwAccelerationTest/res/layout/text_medium.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/text_medium.xml
diff --git a/tests/HwAccelerationTest/res/layout/text_small.xml b/tests/graphics/HwAccelerationTest/res/layout/text_small.xml
index 45eee609db6b..45eee609db6b 100644
--- a/tests/HwAccelerationTest/res/layout/text_small.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/text_small.xml
diff --git a/tests/HwAccelerationTest/res/layout/transforms_and_animations.xml b/tests/graphics/HwAccelerationTest/res/layout/transforms_and_animations.xml
index 1595502f6db9..1595502f6db9 100644
--- a/tests/HwAccelerationTest/res/layout/transforms_and_animations.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/transforms_and_animations.xml
diff --git a/tests/HwAccelerationTest/res/layout/view_layer_invalidation.xml b/tests/graphics/HwAccelerationTest/res/layout/view_layer_invalidation.xml
index 7df8bb6046b6..7df8bb6046b6 100644
--- a/tests/HwAccelerationTest/res/layout/view_layer_invalidation.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/view_layer_invalidation.xml
diff --git a/tests/HwAccelerationTest/res/layout/view_layers.xml b/tests/graphics/HwAccelerationTest/res/layout/view_layers.xml
index e0cdc78d2ae9..e0cdc78d2ae9 100644
--- a/tests/HwAccelerationTest/res/layout/view_layers.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/view_layers.xml
diff --git a/tests/HwAccelerationTest/res/layout/view_layers_3.xml b/tests/graphics/HwAccelerationTest/res/layout/view_layers_3.xml
index a820f5f2c43f..a820f5f2c43f 100644
--- a/tests/HwAccelerationTest/res/layout/view_layers_3.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/view_layers_3.xml
diff --git a/tests/HwAccelerationTest/res/layout/view_layers_4.xml b/tests/graphics/HwAccelerationTest/res/layout/view_layers_4.xml
index 54367379855a..54367379855a 100644
--- a/tests/HwAccelerationTest/res/layout/view_layers_4.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/view_layers_4.xml
diff --git a/tests/HwAccelerationTest/res/layout/view_layers_5.xml b/tests/graphics/HwAccelerationTest/res/layout/view_layers_5.xml
index 5baf5835dd8b..5baf5835dd8b 100644
--- a/tests/HwAccelerationTest/res/layout/view_layers_5.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/view_layers_5.xml
diff --git a/tests/HwAccelerationTest/res/layout/view_properties.xml b/tests/graphics/HwAccelerationTest/res/layout/view_properties.xml
index d7ed8192b3c4..d7ed8192b3c4 100644
--- a/tests/HwAccelerationTest/res/layout/view_properties.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/view_properties.xml
diff --git a/tests/HwAccelerationTest/res/layout/view_runtime_shader.xml b/tests/graphics/HwAccelerationTest/res/layout/view_runtime_shader.xml
index b91377d1ab49..b91377d1ab49 100644
--- a/tests/HwAccelerationTest/res/layout/view_runtime_shader.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/view_runtime_shader.xml
diff --git a/tests/HwAccelerationTest/res/layout/widget.xml b/tests/graphics/HwAccelerationTest/res/layout/widget.xml
index 503facedbf28..503facedbf28 100644
--- a/tests/HwAccelerationTest/res/layout/widget.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/widget.xml
diff --git a/tests/HwAccelerationTest/res/layout/z_ordering.xml b/tests/graphics/HwAccelerationTest/res/layout/z_ordering.xml
index 970c5fd6e275..970c5fd6e275 100644
--- a/tests/HwAccelerationTest/res/layout/z_ordering.xml
+++ b/tests/graphics/HwAccelerationTest/res/layout/z_ordering.xml
diff --git a/tests/HwAccelerationTest/res/raw/colorgrid_video.mp4 b/tests/graphics/HwAccelerationTest/res/raw/colorgrid_video.mp4
index 1be8bee39fd4..1be8bee39fd4 100644
--- a/tests/HwAccelerationTest/res/raw/colorgrid_video.mp4
+++ b/tests/graphics/HwAccelerationTest/res/raw/colorgrid_video.mp4
Binary files differ
diff --git a/tests/HwAccelerationTest/res/values/strings.xml b/tests/graphics/HwAccelerationTest/res/values/strings.xml
index 69e58aab18bf..69e58aab18bf 100644
--- a/tests/HwAccelerationTest/res/values/strings.xml
+++ b/tests/graphics/HwAccelerationTest/res/values/strings.xml
diff --git a/tests/HwAccelerationTest/res/values/styles.xml b/tests/graphics/HwAccelerationTest/res/values/styles.xml
index 55f4dd697907..55f4dd697907 100644
--- a/tests/HwAccelerationTest/res/values/styles.xml
+++ b/tests/graphics/HwAccelerationTest/res/values/styles.xml
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/AdvancedBlendActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AdvancedBlendActivity.java
index a83005b4440b..a83005b4440b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/AdvancedBlendActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AdvancedBlendActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/AdvancedGradientsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AdvancedGradientsActivity.java
index b0b54eb83149..b0b54eb83149 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/AdvancedGradientsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AdvancedGradientsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/Alpha8BitmapActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Alpha8BitmapActivity.java
index 5fe512e55072..5fe512e55072 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/Alpha8BitmapActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Alpha8BitmapActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/AlphaLayersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AlphaLayersActivity.java
index 37661828da22..37661828da22 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/AlphaLayersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AlphaLayersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/Animated3dActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Animated3dActivity.java
index f632c8372c35..f632c8372c35 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/Animated3dActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Animated3dActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/AssetsAtlasActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AssetsAtlasActivity.java
index cbf99dc46a45..cbf99dc46a45 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/AssetsAtlasActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/AssetsAtlasActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BackdropBlurActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BackdropBlurActivity.java
index 8086b29df7cd..8086b29df7cd 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BackdropBlurActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BackdropBlurActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BigGradientActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BigGradientActivity.java
index 4d28f5125ff2..4d28f5125ff2 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BigGradientActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BigGradientActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java
index 69d34a590a46..69d34a590a46 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshLayerActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshLayerActivity.java
index ac59a4bcca19..ac59a4bcca19 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshLayerActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMeshLayerActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java
index 0d825d7c60ed..0d825d7c60ed 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapMutateActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapTransitionView.kt b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapTransitionView.kt
index 3af54503d469..3af54503d469 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapTransitionView.kt
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapTransitionView.kt
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/Bitmaps3dActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Bitmaps3dActivity.java
index baa1cb916864..baa1cb916864 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/Bitmaps3dActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Bitmaps3dActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java
index 607a1738c13a..607a1738c13a 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsAlphaActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsAlphaActivity.java
index cb16191423ce..cb16191423ce 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsAlphaActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsAlphaActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsRectActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsRectActivity.java
index b192209e7823..b192209e7823 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsRectActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsRectActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsSkewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsSkewActivity.java
index 099c0dde4eac..099c0dde4eac 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BitmapsSkewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BitmapsSkewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/BlurActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BlurActivity.java
index e4ca7881f796..e4ca7881f796 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/BlurActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/BlurActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/CanvasTextureViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CanvasTextureViewActivity.java
index bd2f68f77f28..bd2f68f77f28 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/CanvasTextureViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CanvasTextureViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java
index 571f623aea99..571f623aea99 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CirclePropActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ClearActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClearActivity.java
index dbfb4ca7c8fe..dbfb4ca7c8fe 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ClearActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClearActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipOutlineActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipOutlineActivity.java
index 23bb6b4a4a0c..23bb6b4a4a0c 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipOutlineActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipOutlineActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java
index fe4d602a62d1..fe4d602a62d1 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegion2Activity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion3Activity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegion3Activity.java
index 6fd03fb992e5..6fd03fb992e5 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegion3Activity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegion3Activity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegionActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegionActivity.java
index 774811e5bf10..774811e5bf10 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ClipRegionActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ClipRegionActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ColorBitmapActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorBitmapActivity.java
index 1f4c6c53b260..1f4c6c53b260 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ColorBitmapActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorBitmapActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersActivity.java
index 09d63d6eda17..09d63d6eda17 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java
index fafe60b46676..fafe60b46676 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColorFiltersMutateActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ColoredRectsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColoredRectsActivity.java
index d4bc2a6d3317..d4bc2a6d3317 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ColoredRectsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColoredRectsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ColoredShadowsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColoredShadowsActivity.java
index 901d90eed70a..901d90eed70a 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ColoredShadowsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ColoredShadowsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/CustomRenderer.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CustomRenderer.java
index 5ad7fb9027a2..5ad7fb9027a2 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/CustomRenderer.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/CustomRenderer.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/DatePicker.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DatePicker.java
index 492d158ec5ef..492d158ec5ef 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/DatePicker.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DatePicker.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/DatePickerActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DatePickerActivity.java
index 5482ee2b656f..5482ee2b656f 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/DatePickerActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DatePickerActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/DisplayListLayersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DisplayListLayersActivity.java
index ec91c35dce0f..ec91c35dce0f 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/DisplayListLayersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DisplayListLayersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/DrawIntoHwBitmapActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DrawIntoHwBitmapActivity.java
index 220016aa8ab7..220016aa8ab7 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/DrawIntoHwBitmapActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/DrawIntoHwBitmapActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/EdgeEffectStretchActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/EdgeEffectStretchActivity.java
index c4b0072eaff8..c4b0072eaff8 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/EdgeEffectStretchActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/EdgeEffectStretchActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/FramebufferBlendActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/FramebufferBlendActivity.java
index 1556baec0c9c..1556baec0c9c 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/FramebufferBlendActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/FramebufferBlendActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/FrontBufferedLayer.kt b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/FrontBufferedLayer.kt
index ebec22e29d69..ebec22e29d69 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/FrontBufferedLayer.kt
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/FrontBufferedLayer.kt
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/GLDepthTestActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GLDepthTestActivity.java
index 1bb6d0ca8591..1bb6d0ca8591 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/GLDepthTestActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GLDepthTestActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/GLTextureViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GLTextureViewActivity.java
index 733e44f28130..733e44f28130 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/GLTextureViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GLTextureViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/GetBitmapActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GetBitmapActivity.java
index 038434a72de2..038434a72de2 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/GetBitmapActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GetBitmapActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/GetBitmapSurfaceViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GetBitmapSurfaceViewActivity.java
index 6fe2cb472a97..6fe2cb472a97 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/GetBitmapSurfaceViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GetBitmapSurfaceViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java
index e89b2948062b..e89b2948062b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/GradientStopsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GradientStopsActivity.java
index a73eab579d12..a73eab579d12 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/GradientStopsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GradientStopsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/GradientsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GradientsActivity.java
index fbe7856f32ec..fbe7856f32ec 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/GradientsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/GradientsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/HardwareBufferRendererActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareBufferRendererActivity.java
index e4de434f1ed2..e4de434f1ed2 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/HardwareBufferRendererActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareBufferRendererActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasSurfaceViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasSurfaceViewActivity.java
index 2bfe994aa1b7..2bfe994aa1b7 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasSurfaceViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasSurfaceViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasTextureViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasTextureViewActivity.java
index 63a6efa712fb..63a6efa712fb 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasTextureViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HardwareCanvasTextureViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/HwTests.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HwTests.java
index b1c32a88c353..b1c32a88c353 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/HwTests.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/HwTests.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/LabelsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LabelsActivity.java
index bae0500f39e9..bae0500f39e9 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/LabelsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LabelsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/LayersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LayersActivity.java
index 9d5cd284301a..9d5cd284301a 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/LayersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LayersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/Lines2Activity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Lines2Activity.java
index 584ab596836c..584ab596836c 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/Lines2Activity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Lines2Activity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
index eed0ec890b8f..eed0ec890b8f 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LinesActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ListActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ListActivity.java
index 134c2e045449..134c2e045449 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ListActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ListActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/LooperAcceleration.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LooperAcceleration.java
index 20d8e11cbe45..20d8e11cbe45 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/LooperAcceleration.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/LooperAcceleration.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MarqueeActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MarqueeActivity.java
index 715cdbb226cb..715cdbb226cb 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MarqueeActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MarqueeActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MatrixActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MatrixActivity.java
index 1906b9d5dd91..1906b9d5dd91 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MatrixActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MatrixActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MaxBitmapSizeActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MaxBitmapSizeActivity.java
index b3b42dcdf157..b3b42dcdf157 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MaxBitmapSizeActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MaxBitmapSizeActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MeshActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MeshActivity.java
index ae3dcb834687..ae3dcb834687 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MeshActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MeshActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MeshLargeActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MeshLargeActivity.java
index 01ca2fcdbb86..01ca2fcdbb86 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MeshLargeActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MeshLargeActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java
index 1034649b6cb2..1034649b6cb2 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MipMapActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreNinePatchesActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MoreNinePatchesActivity.java
index 0c42387ee693..0c42387ee693 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreNinePatchesActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MoreNinePatchesActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java
index 1847f43b7ea0..1847f43b7ea0 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MovingSurfaceViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MovingSurfaceViewActivity.java
index fa25b45c2b06..fa25b45c2b06 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MovingSurfaceViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MovingSurfaceViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java
index eb8a0a926af8..eb8a0a926af8 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MultiLayersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MultiProducerActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MultiProducerActivity.java
index e7d7f2b11801..e7d7f2b11801 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MultiProducerActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MultiProducerActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MyLittleTextureView.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MyLittleTextureView.java
index 08d5d4fff50a..08d5d4fff50a 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/MyLittleTextureView.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/MyLittleTextureView.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/NewLayersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NewLayersActivity.java
index 2509d367fe30..2509d367fe30 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/NewLayersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NewLayersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/NinePatchesActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NinePatchesActivity.java
index 7410f79363b3..7410f79363b3 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/NinePatchesActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NinePatchesActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/NoAATextActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NoAATextActivity.java
index 5bd2f583c4c8..5bd2f583c4c8 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/NoAATextActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/NoAATextActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/OpaqueActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/OpaqueActivity.java
index af45f299bec3..af45f299bec3 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/OpaqueActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/OpaqueActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PaintDrawFilterActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PaintDrawFilterActivity.java
index 85232720f436..85232720f436 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PaintDrawFilterActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PaintDrawFilterActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PathDestructionActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathDestructionActivity.java
index 5cede6540410..5cede6540410 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PathDestructionActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathDestructionActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PathOffsetActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathOffsetActivity.java
index fa73de157cf7..fa73de157cf7 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PathOffsetActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathOffsetActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PathOpsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathOpsActivity.java
index b9927ac08523..b9927ac08523 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PathOpsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathOpsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java
index c241a6243011..c241a6243011 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsCacheActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathsCacheActivity.java
index c1e7f4ad156c..c1e7f4ad156c 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsCacheActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PathsCacheActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PenStylusActivity.kt b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PenStylusActivity.kt
index 1445b1db801e..1445b1db801e 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PenStylusActivity.kt
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PenStylusActivity.kt
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PictureCaptureDemo.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PictureCaptureDemo.java
index 15568ac72227..15568ac72227 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PictureCaptureDemo.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PictureCaptureDemo.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PixelCopyWindow.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PixelCopyWindow.java
index a039fba14f65..a039fba14f65 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PixelCopyWindow.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PixelCopyWindow.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PointsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PointsActivity.java
index b3fb7a1b47d2..b3fb7a1b47d2 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PointsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PointsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java
index 1c868d233339..1c868d233339 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PositionListenerActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PositionListenerActivity.java
index 2ad034cd143e..2ad034cd143e 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/PositionListenerActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/PositionListenerActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java
index 4eb40722f6dd..4eb40722f6dd 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java
index 9abd7ea5f361..9abd7ea5f361 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ProjectionClippingActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/QuickRejectActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/QuickRejectActivity.java
index 11a2a4161a8b..11a2a4161a8b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/QuickRejectActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/QuickRejectActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RenderEffectShaderActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RenderEffectShaderActivity.java
index 661d48a84768..661d48a84768 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/RenderEffectShaderActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RenderEffectShaderActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RenderEffectViewActivity.kt b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RenderEffectViewActivity.kt
index 3c71b96c6c31..3c71b96c6c31 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/RenderEffectViewActivity.kt
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RenderEffectViewActivity.kt
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ResizeActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ResizeActivity.java
index 04f9de184038..04f9de184038 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ResizeActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ResizeActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java
index 1216fc43640e..1216fc43640e 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java
index b78907c46744..b78907c46744 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RippleActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/Rotate3dTextActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Rotate3dTextActivity.java
index 0368b2fffc06..0368b2fffc06 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/Rotate3dTextActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Rotate3dTextActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RotationActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RotationActivity.java
index 5c309b4431bf..5c309b4431bf 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/RotationActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/RotationActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ScaledPathsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScaledPathsActivity.java
index deb4b6b87fe4..deb4b6b87fe4 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ScaledPathsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScaledPathsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ScaledTextActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScaledTextActivity.java
index a4e9b52f4290..a4e9b52f4290 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ScaledTextActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScaledTextActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ScrollingStretchSurfaceViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScrollingStretchSurfaceViewActivity.java
index 040bff5d74d8..040bff5d74d8 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ScrollingStretchSurfaceViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ScrollingStretchSurfaceViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ShadersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ShadersActivity.java
index 1d18f61986ba..1d18f61986ba 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ShadersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ShadersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ShapesActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ShapesActivity.java
index 61dca784ce5e..61dca784ce5e 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ShapesActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ShapesActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/SimplePatchActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SimplePatchActivity.java
index a9b4d1c3cefb..a9b4d1c3cefb 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/SimplePatchActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SimplePatchActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/SimplePathsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SimplePathsActivity.java
index c3e18a3c08ff..c3e18a3c08ff 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/SimplePathsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SimplePathsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/SingleFrameTextureViewTestActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SingleFrameTextureViewTestActivity.java
index 4d3826b68247..4d3826b68247 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/SingleFrameTextureViewTestActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SingleFrameTextureViewTestActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/SmallCircleActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SmallCircleActivity.java
index a3f4ddc382d4..a3f4ddc382d4 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/SmallCircleActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SmallCircleActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/StackActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StackActivity.java
index 262b0e93671b..262b0e93671b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/StackActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StackActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java
index 2990c9e59fec..2990c9e59fec 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StretchShaderActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/StretchySurfaceViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StretchySurfaceViewActivity.java
index acb872cd23b8..acb872cd23b8 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/StretchySurfaceViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/StretchySurfaceViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/SurfaceViewAlphaActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SurfaceViewAlphaActivity.java
index 01fe6ae0518b..01fe6ae0518b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/SurfaceViewAlphaActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/SurfaceViewAlphaActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TJunctionActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TJunctionActivity.java
index d2bcae9645b9..d2bcae9645b9 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TJunctionActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TJunctionActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java
index 4a1f5a24ba2b..4a1f5a24ba2b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java
index d307ef871b97..d307ef871b97 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextFadeActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextGammaActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextGammaActivity.java
index f40b89dc0d36..f40b89dc0d36 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextGammaActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextGammaActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextOnPathActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextOnPathActivity.java
index ceccfaa9cd0f..ceccfaa9cd0f 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextOnPathActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextOnPathActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextPathActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextPathActivity.java
index 35a1fc92b468..35a1fc92b468 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextPathActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextPathActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java
index 6d8c43c00acf..6d8c43c00acf 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TextureViewActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java
index 656f2b143654..656f2b143654 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ThinPatchesActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TimeDialogActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TimeDialogActivity.java
index 9e3e950f0850..9e3e950f0850 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TimeDialogActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TimeDialogActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/Transform3dActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Transform3dActivity.java
index 6df66e6bbd9a..6df66e6bbd9a 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/Transform3dActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/Transform3dActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TransformsAndAnimationsActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TransformsAndAnimationsActivity.java
index b5a5e025e757..b5a5e025e757 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TransformsAndAnimationsActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TransformsAndAnimationsActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TransparentListActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TransparentListActivity.java
index deb8585a95f5..deb8585a95f5 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/TransparentListActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/TransparentListActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/VideoViewCaptureActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/VideoViewCaptureActivity.java
index b87be8058d81..b87be8058d81 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/VideoViewCaptureActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/VideoViewCaptureActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewFlipperActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewFlipperActivity.java
index 0e244fc0a31b..0e244fc0a31b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewFlipperActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewFlipperActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayerInvalidationActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayerInvalidationActivity.java
index a261fb729a65..a261fb729a65 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayerInvalidationActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayerInvalidationActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java
index 07dc0a1b5df0..07dc0a1b5df0 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity2.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity2.java
index a037d70ef845..a037d70ef845 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity2.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity2.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity3.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity3.java
index 96cf43e48778..96cf43e48778 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity3.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity3.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity4.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity4.java
index 1f3f874744db..1f3f874744db 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity4.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity4.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity5.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity5.java
index 715da201458b..715da201458b 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity5.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewLayersActivity5.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewPropertyAlphaActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewPropertyAlphaActivity.java
index 9ae38119cac6..9ae38119cac6 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ViewPropertyAlphaActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ViewPropertyAlphaActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/XfermodeActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/XfermodeActivity.java
index 411077f04f93..411077f04f93 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/XfermodeActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/XfermodeActivity.java
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java
index 08979bce8f73..08979bce8f73 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java
+++ b/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java
diff --git a/tests/HwAccelerationTest/OWNERS b/tests/graphics/OWNERS
index c88a9f82c347..fb7fc14640b1 100644
--- a/tests/HwAccelerationTest/OWNERS
+++ b/tests/graphics/OWNERS
@@ -1 +1,3 @@
+# Bug component: 1075130
+
include /libs/hwui/OWNERS
diff --git a/tests/RenderThreadTest/Android.bp b/tests/graphics/RenderThreadTest/Android.bp
index b18b04edb4c4..b18b04edb4c4 100644
--- a/tests/RenderThreadTest/Android.bp
+++ b/tests/graphics/RenderThreadTest/Android.bp
diff --git a/tests/RenderThreadTest/AndroidManifest.xml b/tests/graphics/RenderThreadTest/AndroidManifest.xml
index 22a4e43c988c..22a4e43c988c 100644
--- a/tests/RenderThreadTest/AndroidManifest.xml
+++ b/tests/graphics/RenderThreadTest/AndroidManifest.xml
diff --git a/tests/RenderThreadTest/res/drawable-hdpi/ic_launcher.png b/tests/graphics/RenderThreadTest/res/drawable-hdpi/ic_launcher.png
index 96a442e5b8e9..96a442e5b8e9 100644
--- a/tests/RenderThreadTest/res/drawable-hdpi/ic_launcher.png
+++ b/tests/graphics/RenderThreadTest/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/tests/RenderThreadTest/res/drawable-mdpi/ic_launcher.png b/tests/graphics/RenderThreadTest/res/drawable-mdpi/ic_launcher.png
index 359047dfa4ed..359047dfa4ed 100644
--- a/tests/RenderThreadTest/res/drawable-mdpi/ic_launcher.png
+++ b/tests/graphics/RenderThreadTest/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/tests/RenderThreadTest/res/drawable-xhdpi/ic_launcher.png b/tests/graphics/RenderThreadTest/res/drawable-xhdpi/ic_launcher.png
index 71c6d760f051..71c6d760f051 100644
--- a/tests/RenderThreadTest/res/drawable-xhdpi/ic_launcher.png
+++ b/tests/graphics/RenderThreadTest/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/tests/RenderThreadTest/res/drawable-xhdpi/starry_night_bg.jpg b/tests/graphics/RenderThreadTest/res/drawable-xhdpi/starry_night_bg.jpg
index 14d6027bf006..14d6027bf006 100644
--- a/tests/RenderThreadTest/res/drawable-xhdpi/starry_night_bg.jpg
+++ b/tests/graphics/RenderThreadTest/res/drawable-xhdpi/starry_night_bg.jpg
Binary files differ
diff --git a/tests/RenderThreadTest/res/layout/activity_main.xml b/tests/graphics/RenderThreadTest/res/layout/activity_main.xml
index 1fd545946f3c..1fd545946f3c 100644
--- a/tests/RenderThreadTest/res/layout/activity_main.xml
+++ b/tests/graphics/RenderThreadTest/res/layout/activity_main.xml
diff --git a/tests/RenderThreadTest/res/layout/activity_sub.xml b/tests/graphics/RenderThreadTest/res/layout/activity_sub.xml
index 713cee49de53..713cee49de53 100644
--- a/tests/RenderThreadTest/res/layout/activity_sub.xml
+++ b/tests/graphics/RenderThreadTest/res/layout/activity_sub.xml
diff --git a/tests/RenderThreadTest/res/layout/item_layout.xml b/tests/graphics/RenderThreadTest/res/layout/item_layout.xml
index 5bdb1ac422f5..5bdb1ac422f5 100644
--- a/tests/RenderThreadTest/res/layout/item_layout.xml
+++ b/tests/graphics/RenderThreadTest/res/layout/item_layout.xml
diff --git a/tests/RenderThreadTest/res/values/strings.xml b/tests/graphics/RenderThreadTest/res/values/strings.xml
index f782e98f43f8..f782e98f43f8 100644
--- a/tests/RenderThreadTest/res/values/strings.xml
+++ b/tests/graphics/RenderThreadTest/res/values/strings.xml
diff --git a/tests/RenderThreadTest/res/values/styles.xml b/tests/graphics/RenderThreadTest/res/values/styles.xml
index f6b5d6aa6dbc..f6b5d6aa6dbc 100644
--- a/tests/RenderThreadTest/res/values/styles.xml
+++ b/tests/graphics/RenderThreadTest/res/values/styles.xml
diff --git a/tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java b/tests/graphics/RenderThreadTest/src/com/example/renderthread/MainActivity.java
index 65b7549f22d1..65b7549f22d1 100644
--- a/tests/RenderThreadTest/src/com/example/renderthread/MainActivity.java
+++ b/tests/graphics/RenderThreadTest/src/com/example/renderthread/MainActivity.java
diff --git a/tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java b/tests/graphics/RenderThreadTest/src/com/example/renderthread/SubActivity.java
index 22fc6911f7df..22fc6911f7df 100644
--- a/tests/RenderThreadTest/src/com/example/renderthread/SubActivity.java
+++ b/tests/graphics/RenderThreadTest/src/com/example/renderthread/SubActivity.java
diff --git a/tests/SilkFX/Android.bp b/tests/graphics/SilkFX/Android.bp
index 1e467db44545..1e467db44545 100644
--- a/tests/SilkFX/Android.bp
+++ b/tests/graphics/SilkFX/Android.bp
diff --git a/tests/SilkFX/AndroidManifest.xml b/tests/graphics/SilkFX/AndroidManifest.xml
index c293589bdbaf..c293589bdbaf 100644
--- a/tests/SilkFX/AndroidManifest.xml
+++ b/tests/graphics/SilkFX/AndroidManifest.xml
diff --git a/tests/SilkFX/assets/gainmaps/city_night.jpg b/tests/graphics/SilkFX/assets/gainmaps/city_night.jpg
index ba26ed6a5780..ba26ed6a5780 100644
--- a/tests/SilkFX/assets/gainmaps/city_night.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/city_night.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/desert_palms.jpg b/tests/graphics/SilkFX/assets/gainmaps/desert_palms.jpg
index 048178670a96..048178670a96 100644
--- a/tests/SilkFX/assets/gainmaps/desert_palms.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/desert_palms.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/desert_sunset.jpg b/tests/graphics/SilkFX/assets/gainmaps/desert_sunset.jpg
index 919a1574a4b9..919a1574a4b9 100644
--- a/tests/SilkFX/assets/gainmaps/desert_sunset.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/desert_sunset.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/desert_wanda.jpg b/tests/graphics/SilkFX/assets/gainmaps/desert_wanda.jpg
index f5a2ef9c53ea..f5a2ef9c53ea 100644
--- a/tests/SilkFX/assets/gainmaps/desert_wanda.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/desert_wanda.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/fountain_night.jpg b/tests/graphics/SilkFX/assets/gainmaps/fountain_night.jpg
index d8b2d759e4c0..d8b2d759e4c0 100644
--- a/tests/SilkFX/assets/gainmaps/fountain_night.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/fountain_night.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/grand_canyon.jpg b/tests/graphics/SilkFX/assets/gainmaps/grand_canyon.jpg
index 2f605bbb0a7e..2f605bbb0a7e 100644
--- a/tests/SilkFX/assets/gainmaps/grand_canyon.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/grand_canyon.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/lamps.jpg b/tests/graphics/SilkFX/assets/gainmaps/lamps.jpg
index 768665f643cb..768665f643cb 100644
--- a/tests/SilkFX/assets/gainmaps/lamps.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/lamps.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/mountain_lake.jpg b/tests/graphics/SilkFX/assets/gainmaps/mountain_lake.jpg
index b7981fdca6da..b7981fdca6da 100644
--- a/tests/SilkFX/assets/gainmaps/mountain_lake.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/mountain_lake.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/mountains.jpg b/tests/graphics/SilkFX/assets/gainmaps/mountains.jpg
index fe69993e0706..fe69993e0706 100644
--- a/tests/SilkFX/assets/gainmaps/mountains.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/mountains.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/sunflower.jpg b/tests/graphics/SilkFX/assets/gainmaps/sunflower.jpg
index 4b17614d66bf..4b17614d66bf 100644
--- a/tests/SilkFX/assets/gainmaps/sunflower.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/sunflower.jpg
Binary files differ
diff --git a/tests/SilkFX/assets/gainmaps/train_station_night.jpg b/tests/graphics/SilkFX/assets/gainmaps/train_station_night.jpg
index ecd45ee1e629..ecd45ee1e629 100644
--- a/tests/SilkFX/assets/gainmaps/train_station_night.jpg
+++ b/tests/graphics/SilkFX/assets/gainmaps/train_station_night.jpg
Binary files differ
diff --git a/tests/SilkFX/res/drawable-hdpi/background1.jpeg b/tests/graphics/SilkFX/res/drawable-hdpi/background1.jpeg
index dcdfa7b850bc..dcdfa7b850bc 100644
--- a/tests/SilkFX/res/drawable-hdpi/background1.jpeg
+++ b/tests/graphics/SilkFX/res/drawable-hdpi/background1.jpeg
Binary files differ
diff --git a/tests/SilkFX/res/drawable-hdpi/background2.jpeg b/tests/graphics/SilkFX/res/drawable-hdpi/background2.jpeg
index dc7ce84e6784..dc7ce84e6784 100644
--- a/tests/SilkFX/res/drawable-hdpi/background2.jpeg
+++ b/tests/graphics/SilkFX/res/drawable-hdpi/background2.jpeg
Binary files differ
diff --git a/tests/SilkFX/res/drawable-hdpi/background3.jpeg b/tests/graphics/SilkFX/res/drawable-hdpi/background3.jpeg
index 12b3429e3920..12b3429e3920 100644
--- a/tests/SilkFX/res/drawable-hdpi/background3.jpeg
+++ b/tests/graphics/SilkFX/res/drawable-hdpi/background3.jpeg
Binary files differ
diff --git a/tests/SilkFX/res/drawable-hdpi/noise.png b/tests/graphics/SilkFX/res/drawable-hdpi/noise.png
index 053995dad760..053995dad760 100644
--- a/tests/SilkFX/res/drawable-hdpi/noise.png
+++ b/tests/graphics/SilkFX/res/drawable-hdpi/noise.png
Binary files differ
diff --git a/tests/SilkFX/res/drawable-nodpi/blue_sweep_gradient.xml b/tests/graphics/SilkFX/res/drawable-nodpi/blue_sweep_gradient.xml
index c183c5deab4f..c183c5deab4f 100644
--- a/tests/SilkFX/res/drawable-nodpi/blue_sweep_gradient.xml
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/blue_sweep_gradient.xml
diff --git a/tests/SilkFX/res/drawable-nodpi/dark_gradient.xml b/tests/graphics/SilkFX/res/drawable-nodpi/dark_gradient.xml
index f20dd424c617..f20dd424c617 100644
--- a/tests/SilkFX/res/drawable-nodpi/dark_gradient.xml
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/dark_gradient.xml
diff --git a/tests/SilkFX/res/drawable-nodpi/dark_notification.png b/tests/graphics/SilkFX/res/drawable-nodpi/dark_notification.png
index 6de6c2ae785c..6de6c2ae785c 100644
--- a/tests/SilkFX/res/drawable-nodpi/dark_notification.png
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/dark_notification.png
Binary files differ
diff --git a/tests/SilkFX/res/drawable-nodpi/green_sweep_gradient.xml b/tests/graphics/SilkFX/res/drawable-nodpi/green_sweep_gradient.xml
index c600d0f66325..c600d0f66325 100644
--- a/tests/SilkFX/res/drawable-nodpi/green_sweep_gradient.xml
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/green_sweep_gradient.xml
diff --git a/tests/SilkFX/res/drawable-nodpi/grey_sweep_gradient.xml b/tests/graphics/SilkFX/res/drawable-nodpi/grey_sweep_gradient.xml
index d0c17fa2e1b9..d0c17fa2e1b9 100644
--- a/tests/SilkFX/res/drawable-nodpi/grey_sweep_gradient.xml
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/grey_sweep_gradient.xml
diff --git a/tests/SilkFX/res/drawable-nodpi/light_gradient.xml b/tests/graphics/SilkFX/res/drawable-nodpi/light_gradient.xml
index c75f925647e7..c75f925647e7 100644
--- a/tests/SilkFX/res/drawable-nodpi/light_gradient.xml
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/light_gradient.xml
diff --git a/tests/SilkFX/res/drawable-nodpi/light_notification.png b/tests/graphics/SilkFX/res/drawable-nodpi/light_notification.png
index 81a67cd3d388..81a67cd3d388 100644
--- a/tests/SilkFX/res/drawable-nodpi/light_notification.png
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/light_notification.png
Binary files differ
diff --git a/tests/SilkFX/res/drawable-nodpi/red_sweep_gradient.xml b/tests/graphics/SilkFX/res/drawable-nodpi/red_sweep_gradient.xml
index e3b834a46406..e3b834a46406 100644
--- a/tests/SilkFX/res/drawable-nodpi/red_sweep_gradient.xml
+++ b/tests/graphics/SilkFX/res/drawable-nodpi/red_sweep_gradient.xml
diff --git a/tests/SilkFX/res/drawable/background_blur_drawable.xml b/tests/graphics/SilkFX/res/drawable/background_blur_drawable.xml
index 173ca99bdfdf..173ca99bdfdf 100644
--- a/tests/SilkFX/res/drawable/background_blur_drawable.xml
+++ b/tests/graphics/SilkFX/res/drawable/background_blur_drawable.xml
diff --git a/tests/SilkFX/res/drawable/blur_activity_background_drawable_white.xml b/tests/graphics/SilkFX/res/drawable/blur_activity_background_drawable_white.xml
index bd8942d46383..bd8942d46383 100644
--- a/tests/SilkFX/res/drawable/blur_activity_background_drawable_white.xml
+++ b/tests/graphics/SilkFX/res/drawable/blur_activity_background_drawable_white.xml
diff --git a/tests/SilkFX/res/layout-television/activity_glass.xml b/tests/graphics/SilkFX/res/layout-television/activity_glass.xml
index 1f566860da3d..1f566860da3d 100644
--- a/tests/SilkFX/res/layout-television/activity_glass.xml
+++ b/tests/graphics/SilkFX/res/layout-television/activity_glass.xml
diff --git a/tests/SilkFX/res/layout/activity_background_blur.xml b/tests/graphics/SilkFX/res/layout/activity_background_blur.xml
index f13c0883cb01..f13c0883cb01 100644
--- a/tests/SilkFX/res/layout/activity_background_blur.xml
+++ b/tests/graphics/SilkFX/res/layout/activity_background_blur.xml
diff --git a/tests/SilkFX/res/layout/activity_glass.xml b/tests/graphics/SilkFX/res/layout/activity_glass.xml
index aa09f276d5c8..aa09f276d5c8 100644
--- a/tests/SilkFX/res/layout/activity_glass.xml
+++ b/tests/graphics/SilkFX/res/layout/activity_glass.xml
diff --git a/tests/SilkFX/res/layout/bling_notifications.xml b/tests/graphics/SilkFX/res/layout/bling_notifications.xml
index 6d266b701a68..6d266b701a68 100644
--- a/tests/SilkFX/res/layout/bling_notifications.xml
+++ b/tests/graphics/SilkFX/res/layout/bling_notifications.xml
diff --git a/tests/SilkFX/res/layout/color_grid.xml b/tests/graphics/SilkFX/res/layout/color_grid.xml
index 37242eee7195..37242eee7195 100644
--- a/tests/SilkFX/res/layout/color_grid.xml
+++ b/tests/graphics/SilkFX/res/layout/color_grid.xml
diff --git a/tests/SilkFX/res/layout/color_mode_controls.xml b/tests/graphics/SilkFX/res/layout/color_mode_controls.xml
index c0c0bab8a605..c0c0bab8a605 100644
--- a/tests/SilkFX/res/layout/color_mode_controls.xml
+++ b/tests/graphics/SilkFX/res/layout/color_mode_controls.xml
diff --git a/tests/SilkFX/res/layout/common_base.xml b/tests/graphics/SilkFX/res/layout/common_base.xml
index c0eaf9bc1476..c0eaf9bc1476 100644
--- a/tests/SilkFX/res/layout/common_base.xml
+++ b/tests/graphics/SilkFX/res/layout/common_base.xml
diff --git a/tests/SilkFX/res/layout/gainmap_decode_test.xml b/tests/graphics/SilkFX/res/layout/gainmap_decode_test.xml
index e7ef61f8dac1..e7ef61f8dac1 100644
--- a/tests/SilkFX/res/layout/gainmap_decode_test.xml
+++ b/tests/graphics/SilkFX/res/layout/gainmap_decode_test.xml
diff --git a/tests/SilkFX/res/layout/gainmap_image.xml b/tests/graphics/SilkFX/res/layout/gainmap_image.xml
index b0ed9147585e..b0ed9147585e 100644
--- a/tests/SilkFX/res/layout/gainmap_image.xml
+++ b/tests/graphics/SilkFX/res/layout/gainmap_image.xml
diff --git a/tests/SilkFX/res/layout/gainmap_metadata.xml b/tests/graphics/SilkFX/res/layout/gainmap_metadata.xml
index 4cc3e0cbdb83..4cc3e0cbdb83 100644
--- a/tests/SilkFX/res/layout/gainmap_metadata.xml
+++ b/tests/graphics/SilkFX/res/layout/gainmap_metadata.xml
diff --git a/tests/SilkFX/res/layout/gainmap_transform_test.xml b/tests/graphics/SilkFX/res/layout/gainmap_transform_test.xml
index 5aeb53661cbc..5aeb53661cbc 100644
--- a/tests/SilkFX/res/layout/gainmap_transform_test.xml
+++ b/tests/graphics/SilkFX/res/layout/gainmap_transform_test.xml
diff --git a/tests/SilkFX/res/layout/gradient_sweep.xml b/tests/graphics/SilkFX/res/layout/gradient_sweep.xml
index 261022a40380..261022a40380 100644
--- a/tests/SilkFX/res/layout/gradient_sweep.xml
+++ b/tests/graphics/SilkFX/res/layout/gradient_sweep.xml
diff --git a/tests/SilkFX/res/layout/hdr_glows.xml b/tests/graphics/SilkFX/res/layout/hdr_glows.xml
index b6050645866a..b6050645866a 100644
--- a/tests/SilkFX/res/layout/hdr_glows.xml
+++ b/tests/graphics/SilkFX/res/layout/hdr_glows.xml
diff --git a/tests/SilkFX/res/layout/hdr_image_viewer.xml b/tests/graphics/SilkFX/res/layout/hdr_image_viewer.xml
index 9816430cd915..9816430cd915 100644
--- a/tests/SilkFX/res/layout/hdr_image_viewer.xml
+++ b/tests/graphics/SilkFX/res/layout/hdr_image_viewer.xml
diff --git a/tests/SilkFX/res/values/style.xml b/tests/graphics/SilkFX/res/values/style.xml
index 66edbb5c9382..66edbb5c9382 100644
--- a/tests/SilkFX/res/values/style.xml
+++ b/tests/graphics/SilkFX/res/values/style.xml
diff --git a/tests/SilkFX/src/com/android/test/silkfx/Main.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt
index 59a6078376cf..59a6078376cf 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/Main.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/Main.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/app/BaseDemoActivity.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/BaseDemoActivity.kt
index 89011b51b8d6..89011b51b8d6 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/app/BaseDemoActivity.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/BaseDemoActivity.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/app/CommonDemoActivity.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/CommonDemoActivity.kt
index e56ce40463f4..e56ce40463f4 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/app/CommonDemoActivity.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/CommonDemoActivity.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/app/HdrImageViewer.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/HdrImageViewer.kt
index 7302169f4d1b..7302169f4d1b 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/app/HdrImageViewer.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/HdrImageViewer.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/app/WindowObserver.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/WindowObserver.kt
index 3d989a54cf27..3d989a54cf27 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/app/WindowObserver.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/app/WindowObserver.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/common/BaseDrawingView.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/common/BaseDrawingView.kt
index f88e6b01483b..f88e6b01483b 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/common/BaseDrawingView.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/common/BaseDrawingView.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/common/ColorModeControls.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/common/ColorModeControls.kt
index 7e43566d56f8..7e43566d56f8 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/common/ColorModeControls.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/common/ColorModeControls.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/common/HDRIndicator.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/common/HDRIndicator.kt
index f42161f63811..f42161f63811 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/common/HDRIndicator.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/common/HDRIndicator.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/BlingyNotification.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/BlingyNotification.kt
index 4ad21faec9d4..4ad21faec9d4 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/BlingyNotification.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/BlingyNotification.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/ColorGrid.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/ColorGrid.kt
index 6920f832333f..6920f832333f 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/ColorGrid.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/ColorGrid.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapDecodeTest.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapDecodeTest.kt
index 585320aee615..585320aee615 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapDecodeTest.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapDecodeTest.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapImage.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapImage.kt
index c92d768439fd..c92d768439fd 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapImage.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapImage.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapMetadataEditor.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapMetadataEditor.kt
index 43debb11013a..43debb11013a 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapMetadataEditor.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapMetadataEditor.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapTransformsTest.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapTransformsTest.kt
index 20984fae2133..20984fae2133 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/GainmapTransformsTest.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GainmapTransformsTest.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/GlowActivity.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GlowActivity.kt
index 64dbb22ace43..64dbb22ace43 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/GlowActivity.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GlowActivity.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/GlowingCard.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GlowingCard.kt
index b388bb659685..b388bb659685 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/GlowingCard.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/GlowingCard.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/hdr/RadialGlow.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/RadialGlow.kt
index 20acb4919c78..20acb4919c78 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/hdr/RadialGlow.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/RadialGlow.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt
index 4d38660e6029..4d38660e6029 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/materials/BackgroundBlurActivity.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt
index dde245ff9baf..dde245ff9baf 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt
diff --git a/tests/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt b/tests/graphics/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt
index 41baeadf7a8c..41baeadf7a8c 100644
--- a/tests/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt
+++ b/tests/graphics/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt
diff --git a/tests/VectorDrawableTest/Android.bp b/tests/graphics/VectorDrawableTest/Android.bp
index 9da7c5fdbb17..9da7c5fdbb17 100644
--- a/tests/VectorDrawableTest/Android.bp
+++ b/tests/graphics/VectorDrawableTest/Android.bp
diff --git a/tests/VectorDrawableTest/AndroidManifest.xml b/tests/graphics/VectorDrawableTest/AndroidManifest.xml
index 5334dac57ca2..5334dac57ca2 100644
--- a/tests/VectorDrawableTest/AndroidManifest.xml
+++ b/tests/graphics/VectorDrawableTest/AndroidManifest.xml
diff --git a/tests/VectorDrawableTest/OWNERS b/tests/graphics/VectorDrawableTest/OWNERS
index 27e16681899e..27e16681899e 100644
--- a/tests/VectorDrawableTest/OWNERS
+++ b/tests/graphics/VectorDrawableTest/OWNERS
diff --git a/tests/VectorDrawableTest/res/anim/alpha_animation_progress_bar.xml b/tests/graphics/VectorDrawableTest/res/anim/alpha_animation_progress_bar.xml
index 867abc7744a1..867abc7744a1 100644
--- a/tests/VectorDrawableTest/res/anim/alpha_animation_progress_bar.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/alpha_animation_progress_bar.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_favorite.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_favorite.xml
index 13bd6f5e00fe..13bd6f5e00fe 100644
--- a/tests/VectorDrawableTest/res/anim/animation_favorite.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_favorite.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_favorite02.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_favorite02.xml
index 15d3b8eb530e..15d3b8eb530e 100644
--- a/tests/VectorDrawableTest/res/anim/animation_favorite02.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_favorite02.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_grouping_1_01.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_grouping_1_01.xml
index 8ab79a5c6256..8ab79a5c6256 100644
--- a/tests/VectorDrawableTest/res/anim/animation_grouping_1_01.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_grouping_1_01.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_grouping_1_02.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_grouping_1_02.xml
index ae63203184c2..ae63203184c2 100644
--- a/tests/VectorDrawableTest/res/anim/animation_grouping_1_02.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_grouping_1_02.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_scale.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_scale.xml
index 73472205db38..73472205db38 100644
--- a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_scale.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_scale.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_translate.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_translate.xml
index 4781ba83ca36..4781ba83ca36 100644
--- a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_translate.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect1_translate.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_scale.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_scale.xml
index a61af8f7a78c..a61af8f7a78c 100644
--- a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_scale.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_scale.xml
diff --git a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_translate.xml b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_translate.xml
index 31fa7950922c..31fa7950922c 100644
--- a/tests/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_translate.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/animation_linear_progress_bar_rect2_translate.xml
diff --git a/tests/VectorDrawableTest/res/anim/blink.xml b/tests/graphics/VectorDrawableTest/res/anim/blink.xml
index 714f4911939a..714f4911939a 100644
--- a/tests/VectorDrawableTest/res/anim/blink.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/blink.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_hourglass_animation_fill_outlines.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_fill_outlines.xml
index 17499d5a7f74..17499d5a7f74 100644
--- a/tests/VectorDrawableTest/res/anim/ic_hourglass_animation_fill_outlines.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_fill_outlines.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_hourglass_animation_hourglass_frame.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_hourglass_frame.xml
index 17499d5a7f74..17499d5a7f74 100644
--- a/tests/VectorDrawableTest/res/anim/ic_hourglass_animation_hourglass_frame.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_hourglass_frame.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_hourglass_animation_mask_1.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_mask_1.xml
index 541792e3b41d..541792e3b41d 100644
--- a/tests/VectorDrawableTest/res/anim/ic_hourglass_animation_mask_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_hourglass_animation_mask_1.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_arrows_1.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_arrows_1.xml
index 89b0f7bd5425..89b0f7bd5425 100644
--- a/tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_arrows_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_arrows_1.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_1.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_1.xml
index 47e1e7145b7d..47e1e7145b7d 100644
--- a/tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_1.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_2.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_2.xml
index f1126cfd618c..f1126cfd618c 100644
--- a/tests/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_2.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_rotate_2_portrait_v2_animation_device_2.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_cross_1.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_cross_1.xml
index 993493b007fe..993493b007fe 100644
--- a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_cross_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_cross_1.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_ic_signal_airplane.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_ic_signal_airplane.xml
index 1bdfde6b3bb7..1bdfde6b3bb7 100644
--- a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_ic_signal_airplane.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_ic_signal_airplane.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_mask_2.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_mask_2.xml
index 94b0a3241d4f..94b0a3241d4f 100644
--- a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_mask_2.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_mask_2.xml
diff --git a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_path_1_1.xml b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_path_1_1.xml
index 0a4a7c476c09..0a4a7c476c09 100644
--- a/tests/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_path_1_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/ic_signal_airplane_v2_animation_path_1_1.xml
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation01.xml b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation01.xml
index d47e019bf4ad..d47e019bf4ad 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation01.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation01.xml
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation02.xml b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation02.xml
index 5d688cf8261f..5d688cf8261f 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation02.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation02.xml
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation03.xml b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation03.xml
index 0c1073e5b2cd..0c1073e5b2cd 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation03.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation03.xml
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation04.xml b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation04.xml
index 4d0aae1c9314..4d0aae1c9314 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation04.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation04.xml
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation05.xml b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation05.xml
index 92b1ab51ade8..92b1ab51ade8 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation05.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation05.xml
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation06.xml
index 1a81866669bc..1a81866669bc 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation06.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation06.xml
diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml
index c9fd6767baff..c9fd6767baff 100644
--- a/tests/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml
+++ b/tests/graphics/VectorDrawableTest/res/anim/trim_path_animation_progress_bar.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_linear.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear.xml
index e0e3f03d64f5..e0e3f03d64f5 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_linear.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_linear_clamp.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_clamp.xml
index 6a24453c0198..6a24453c0198 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_linear_clamp.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_clamp.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item.xml
index cfb123603735..cfb123603735 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap.xml
index 18274b9ec55a..18274b9ec55a 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap_mirror.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap_mirror.xml
index d342bca32208..d342bca32208 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap_mirror.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_overlap_mirror.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item_repeat.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_repeat.xml
index afb45aa2eebe..afb45aa2eebe 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_linear_item_repeat.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_linear_item_repeat.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_radial.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial.xml
index ef6fd70c67f7..ef6fd70c67f7 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_radial.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_radial_clamp.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_clamp.xml
index 64b32f6fba3f..64b32f6fba3f 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_radial_clamp.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_clamp.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item.xml
index c6cea7c5c698..c6cea7c5c698 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item_repeat.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_repeat.xml
index fb4346ad4abd..fb4346ad4abd 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item_repeat.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_repeat.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item_short.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_short.xml
index fefbe9f05eff..fefbe9f05eff 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item_short.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_short.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item_short_mirror.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_short_mirror.xml
index 8b5ad7c826ac..8b5ad7c826ac 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_radial_item_short_mirror.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_radial_item_short_mirror.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_sweep.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep.xml
index e1fbd10b7e91..e1fbd10b7e91 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_sweep.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_clamp.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_clamp.xml
index 80f39f3ee980..80f39f3ee980 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_clamp.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_clamp.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item.xml
index 332b93894960..332b93894960 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_long.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_long.xml
index 3931288c5c25..3931288c5c25 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_long.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_long.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_long_mirror.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_long_mirror.xml
index 0890bd6fc733..0890bd6fc733 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_long_mirror.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_long_mirror.xml
diff --git a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_repeat.xml b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_repeat.xml
index 2ec50148b44d..2ec50148b44d 100644
--- a/tests/VectorDrawableTest/res/color/fill_gradient_sweep_item_repeat.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/fill_gradient_sweep_item_repeat.xml
diff --git a/tests/VectorDrawableTest/res/color/stroke_gradient.xml b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient.xml
index cb324c9a7f4e..cb324c9a7f4e 100644
--- a/tests/VectorDrawableTest/res/color/stroke_gradient.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient.xml
diff --git a/tests/VectorDrawableTest/res/color/stroke_gradient_clamp.xml b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_clamp.xml
index 3d746e720cf8..3d746e720cf8 100644
--- a/tests/VectorDrawableTest/res/color/stroke_gradient_clamp.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_clamp.xml
diff --git a/tests/VectorDrawableTest/res/color/stroke_gradient_item.xml b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item.xml
index 15d948c25899..15d948c25899 100644
--- a/tests/VectorDrawableTest/res/color/stroke_gradient_item.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item.xml
diff --git a/tests/VectorDrawableTest/res/color/stroke_gradient_item_alpha.xml b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_alpha.xml
index fda2b88bc3e1..fda2b88bc3e1 100644
--- a/tests/VectorDrawableTest/res/color/stroke_gradient_item_alpha.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_alpha.xml
diff --git a/tests/VectorDrawableTest/res/color/stroke_gradient_item_alpha_mirror.xml b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_alpha_mirror.xml
index 352a2fd463a8..352a2fd463a8 100644
--- a/tests/VectorDrawableTest/res/color/stroke_gradient_item_alpha_mirror.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_alpha_mirror.xml
diff --git a/tests/VectorDrawableTest/res/color/stroke_gradient_item_repeat.xml b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_repeat.xml
index 42281d15dc0b..42281d15dc0b 100644
--- a/tests/VectorDrawableTest/res/color/stroke_gradient_item_repeat.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/stroke_gradient_item_repeat.xml
diff --git a/tests/VectorDrawableTest/res/color/vector_icon_fill_state_list.xml b/tests/graphics/VectorDrawableTest/res/color/vector_icon_fill_state_list.xml
index 45d88b567ba2..45d88b567ba2 100644
--- a/tests/VectorDrawableTest/res/color/vector_icon_fill_state_list.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/vector_icon_fill_state_list.xml
diff --git a/tests/VectorDrawableTest/res/color/vector_icon_fill_state_list_simple.xml b/tests/graphics/VectorDrawableTest/res/color/vector_icon_fill_state_list_simple.xml
index 0e2467fa9d95..0e2467fa9d95 100644
--- a/tests/VectorDrawableTest/res/color/vector_icon_fill_state_list_simple.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/vector_icon_fill_state_list_simple.xml
diff --git a/tests/VectorDrawableTest/res/color/vector_icon_stroke_state_list.xml b/tests/graphics/VectorDrawableTest/res/color/vector_icon_stroke_state_list.xml
index 16251c8d50bd..16251c8d50bd 100644
--- a/tests/VectorDrawableTest/res/color/vector_icon_stroke_state_list.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/vector_icon_stroke_state_list.xml
diff --git a/tests/VectorDrawableTest/res/color/vector_icon_stroke_state_list_simple.xml b/tests/graphics/VectorDrawableTest/res/color/vector_icon_stroke_state_list_simple.xml
index 7e6c8cea409a..7e6c8cea409a 100644
--- a/tests/VectorDrawableTest/res/color/vector_icon_stroke_state_list_simple.xml
+++ b/tests/graphics/VectorDrawableTest/res/color/vector_icon_stroke_state_list_simple.xml
diff --git a/tests/VectorDrawableTest/res/drawable-hdpi/icon.png b/tests/graphics/VectorDrawableTest/res/drawable-hdpi/icon.png
index 60fbdf5d0403..60fbdf5d0403 100644
--- a/tests/VectorDrawableTest/res/drawable-hdpi/icon.png
+++ b/tests/graphics/VectorDrawableTest/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/tests/VectorDrawableTest/res/drawable-nodpi/bitmap_drawable01.jpg b/tests/graphics/VectorDrawableTest/res/drawable-nodpi/bitmap_drawable01.jpg
index dc8c19716be5..dc8c19716be5 100644
--- a/tests/VectorDrawableTest/res/drawable-nodpi/bitmap_drawable01.jpg
+++ b/tests/graphics/VectorDrawableTest/res/drawable-nodpi/bitmap_drawable01.jpg
Binary files differ
diff --git a/tests/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon.xml b/tests/graphics/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon.xml
index 10a0970df29f..10a0970df29f 100644
--- a/tests/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon.xml
diff --git a/tests/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon_animated.xml b/tests/graphics/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon_animated.xml
index 7e652296ee28..7e652296ee28 100644
--- a/tests/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon_animated.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animated_vector_drawable_attr_icon_animated.xml
diff --git a/tests/VectorDrawableTest/res/drawable/animation_drawable_vector.xml b/tests/graphics/VectorDrawableTest/res/drawable/animation_drawable_vector.xml
index a588960821ab..a588960821ab 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_drawable_vector.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animation_drawable_vector.xml
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
index 8b0ceda4939f..8b0ceda4939f 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable01.xml
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml
index 9d8381fd5e62..9d8381fd5e62 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable_favorite.xml
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml
index 4a7e4f6d870f..4a7e4f6d870f 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_drawable_grouping_1.xml
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_linear_progress_bar.xml b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_linear_progress_bar.xml
index 05bf8335c2a7..05bf8335c2a7 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_linear_progress_bar.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_linear_progress_bar.xml
diff --git a/tests/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml
index 4d46ee8f27d8..4d46ee8f27d8 100644
--- a/tests/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/animation_vector_progress_bar.xml
diff --git a/tests/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml b/tests/graphics/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml
index 4f05090f8b01..4f05090f8b01 100644
--- a/tests/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/btn_radio_on_to_off_bundle.xml
diff --git a/tests/VectorDrawableTest/res/drawable/ic_hourglass.xml b/tests/graphics/VectorDrawableTest/res/drawable/ic_hourglass.xml
index 5b409227456c..5b409227456c 100644
--- a/tests/VectorDrawableTest/res/drawable/ic_hourglass.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/ic_hourglass.xml
diff --git a/tests/VectorDrawableTest/res/drawable/ic_hourglass_animation.xml b/tests/graphics/VectorDrawableTest/res/drawable/ic_hourglass_animation.xml
index 3d87376c314d..3d87376c314d 100644
--- a/tests/VectorDrawableTest/res/drawable/ic_hourglass_animation.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/ic_hourglass_animation.xml
diff --git a/tests/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2.xml b/tests/graphics/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2.xml
index b549423f2db1..b549423f2db1 100644
--- a/tests/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2.xml
diff --git a/tests/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2_animation.xml b/tests/graphics/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2_animation.xml
index 199fbf8b884e..199fbf8b884e 100644
--- a/tests/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2_animation.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/ic_rotate_2_portrait_v2_animation.xml
diff --git a/tests/VectorDrawableTest/res/drawable/ic_signal_airplane_v2.xml b/tests/graphics/VectorDrawableTest/res/drawable/ic_signal_airplane_v2.xml
index 8b2a1a8e4346..8b2a1a8e4346 100644
--- a/tests/VectorDrawableTest/res/drawable/ic_signal_airplane_v2.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/ic_signal_airplane_v2.xml
diff --git a/tests/VectorDrawableTest/res/drawable/ic_signal_airplane_v2_animation.xml b/tests/graphics/VectorDrawableTest/res/drawable/ic_signal_airplane_v2_animation.xml
index bde2b38f871a..bde2b38f871a 100644
--- a/tests/VectorDrawableTest/res/drawable/ic_signal_airplane_v2_animation.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/ic_signal_airplane_v2_animation.xml
diff --git a/tests/VectorDrawableTest/res/drawable/icon.png b/tests/graphics/VectorDrawableTest/res/drawable/icon.png
index cb40a1988b52..cb40a1988b52 100644
--- a/tests/VectorDrawableTest/res/drawable/icon.png
+++ b/tests/graphics/VectorDrawableTest/res/drawable/icon.png
Binary files differ
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_drawable04.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_drawable04.xml
index a0a801ca45d5..a0a801ca45d5 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_drawable04.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_drawable04.xml
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_drawable04_false.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_drawable04_false.xml
index 3cf8e483eb51..3cf8e483eb51 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_drawable04_false.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_drawable04_false.xml
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable01.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable01.xml
index 768fe39f26af..768fe39f26af 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable01.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable01.xml
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable01_false.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable01_false.xml
index 96d378c26b47..96d378c26b47 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable01_false.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable01_false.xml
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable02.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable02.xml
index 6a67b0232a4d..6a67b0232a4d 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable02.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable02.xml
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable02_false.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable02_false.xml
index b722da15d9d1..b722da15d9d1 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable02_false.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable02_false.xml
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable03.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable03.xml
index e24dd1fc5b49..e24dd1fc5b49 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable03.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable03.xml
diff --git a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable03_false.xml b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable03_false.xml
index e788bc261789..e788bc261789 100644
--- a/tests/VectorDrawableTest/res/drawable/state_animation_vector_drawable03_false.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/state_animation_vector_drawable03_false.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable01.xml
index 89afde22f635..89afde22f635 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable01.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable02.xml
index f5d647ceaa8f..f5d647ceaa8f 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable02.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable03.xml
index 7cddda177b39..7cddda177b39 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable03.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable04.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable04.xml
index 0f3fb95f5d46..0f3fb95f5d46 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable04.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable04.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable05.xml
index f94ecba1ffb8..f94ecba1ffb8 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable05.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable06.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable06.xml
index 98b623572eb7..98b623572eb7 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable06.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable06.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable07.xml
index 88c4a1eaea48..88c4a1eaea48 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable07.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable08.xml
index 75529e2fd4ed..75529e2fd4ed 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable08.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable09.xml
index 853a77000d4c..853a77000d4c 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable09.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable10.xml
index 83ed194a14e4..83ed194a14e4 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable10.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable11.xml
index b3d7d8eed349..b3d7d8eed349 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable11.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable12.xml
index 69ae62c19aba..69ae62c19aba 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable12.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable13.xml
index 2468a1b303cb..2468a1b303cb 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable13.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable14.xml
index 01e24d302288..01e24d302288 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable14.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable15.xml
index 4bab2e37898a..4bab2e37898a 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable15.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable16.xml
index 107cda2ca233..107cda2ca233 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable16.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable17.xml
index 801954986ab7..801954986ab7 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable17.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable18.xml
index c93bdb94f646..c93bdb94f646 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable18.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable19.xml
index 996b6beff8bf..996b6beff8bf 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable19.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable20.xml
index 58021446bdc5..58021446bdc5 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable20.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable21.xml
index 5626b44e4b50..5626b44e4b50 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable21.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable22.xml
index 5b40d0d07013..5b40d0d07013 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable22.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable23.xml
index 6ab6ffd2b1fb..6ab6ffd2b1fb 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable23.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable24.xml
index f0b46994dc23..f0b46994dc23 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable24.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable25.xml
index f46d14eb89f1..f46d14eb89f1 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable25.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable26.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable26.xml
index 29cff525543b..29cff525543b 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable26.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable26.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable27.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable27.xml
index b0f0cee86a73..b0f0cee86a73 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable27.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable27.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable28.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable28.xml
index 2d2783b8f41e..2d2783b8f41e 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable28.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable28.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable29.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable29.xml
index c0e9b2abba90..c0e9b2abba90 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable29.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable29.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable30.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable30.xml
index 3dff196e96ec..3dff196e96ec 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable30.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable30.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
index f93486e70c56..f93486e70c56 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml
index 9574d7e524c3..9574d7e524c3 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_group_clip.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml
index 7839ad19d0f1..7839ad19d0f1 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_grouping_1.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_linear_progress_bar.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_linear_progress_bar.xml
index a6da114b511b..a6da114b511b 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_linear_progress_bar.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_linear_progress_bar.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
index 22cd9959ade8..22cd9959ade8 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale0.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale0.xml
index 88bf777bdaea..88bf777bdaea 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale0.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale0.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale1.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale1.xml
index 530c73b20e44..530c73b20e44 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale1.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale1.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale2.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale2.xml
index 200eb617a9e8..200eb617a9e8 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale2.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale2.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale3.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale3.xml
index a40fc9c21595..a40fc9c21595 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_scale3.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_drawable_scale3.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_create.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_create.xml
index 0a6cedc5ced1..0a6cedc5ced1 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_create.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_create.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_delete.xml
index 94c10dfd6656..94c10dfd6656 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_delete.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_filltype_evenodd.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_filltype_evenodd.xml
index d5d86d80269b..d5d86d80269b 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_filltype_evenodd.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_filltype_evenodd.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_filltype_nonzero.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_filltype_nonzero.xml
index 9754e4bed48b..9754e4bed48b 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_filltype_nonzero.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_filltype_nonzero.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_1.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_1.xml
index d67aca7cdaec..d67aca7cdaec 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_1.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_1.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_1_clamp.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_1_clamp.xml
index 2fa440a84cff..2fa440a84cff 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_1_clamp.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_1_clamp.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_2.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_2.xml
index abf3c7a86b80..abf3c7a86b80 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_2.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_2.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_2_repeat.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_2_repeat.xml
index 5a43f804a6e0..5a43f804a6e0 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_2_repeat.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_2_repeat.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_3.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_3.xml
index 5f9726f72c03..5f9726f72c03 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_3.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_3.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_3_mirror.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_3_mirror.xml
index e8de7c2b1f5d..e8de7c2b1f5d 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_gradient_3_mirror.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_gradient_3_mirror.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_heart.xml
index 870e508319e2..870e508319e2 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_heart.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
index 3f79968d88a9..3f79968d88a9 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_settings.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_settings.xml
index 7bd6304f78e4..7bd6304f78e4 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_settings.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_settings.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_state_list_simple.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_state_list_simple.xml
index 9f08fe83015e..9f08fe83015e 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_state_list_simple.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_state_list_simple.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_state_list_theme.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_state_list_theme.xml
index b1ed85025040..b1ed85025040 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_state_list_theme.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_icon_state_list_theme.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_test01.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_test01.xml
index dd71ef0e88f5..dd71ef0e88f5 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_test01.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_test01.xml
diff --git a/tests/VectorDrawableTest/res/drawable/vector_test02.xml b/tests/graphics/VectorDrawableTest/res/drawable/vector_test02.xml
index e4f48de862fa..e4f48de862fa 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_test02.xml
+++ b/tests/graphics/VectorDrawableTest/res/drawable/vector_test02.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml b/tests/graphics/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml
index d3728c475d9b..d3728c475d9b 100644
--- a/tests/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/btn_radio_to_off_mtrl_animation_interpolator_0.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml
index 489596c4fe5b..489596c4fe5b 100644
--- a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml b/tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml
index 3d125e490573..3d125e490573 100644
--- a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator_favorite.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml b/tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml
index 6877bd96285d..6877bd96285d 100644
--- a/tests/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/custom_path_interpolator_grouping_1_01.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_rotation_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_rotation_interpolator.xml
index f798a84087c6..f798a84087c6 100644
--- a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_rotation_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_rotation_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_scalex_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_scalex_interpolator.xml
index 314cf448b9eb..314cf448b9eb 100644
--- a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_scalex_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_arrows_1_scalex_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_1_rotation_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_1_rotation_interpolator.xml
index f798a84087c6..f798a84087c6 100644
--- a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_1_rotation_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_1_rotation_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_2_pathdata_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_2_pathdata_interpolator.xml
index f798a84087c6..f798a84087c6 100644
--- a/tests/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_2_pathdata_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/ic_rotate_2_portrait_v2_device_2_pathdata_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/ic_signal_airplane_v2_path_1_1_pathdata_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/ic_signal_airplane_v2_path_1_1_pathdata_interpolator.xml
index 4917f770cae1..4917f770cae1 100644
--- a/tests/VectorDrawableTest/res/interpolator/ic_signal_airplane_v2_path_1_1_pathdata_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/ic_signal_airplane_v2_path_1_1_pathdata_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml
index 54b5ebd7aa86..54b5ebd7aa86 100644
--- a/tests/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/trim_end_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml b/tests/graphics/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml
index c06c196088dd..c06c196088dd 100644
--- a/tests/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml
+++ b/tests/graphics/VectorDrawableTest/res/interpolator/trim_start_interpolator.xml
diff --git a/tests/VectorDrawableTest/res/layout/activity_animated_vector_drawable_attr.xml b/tests/graphics/VectorDrawableTest/res/layout/activity_animated_vector_drawable_attr.xml
index 92680d5da557..92680d5da557 100644
--- a/tests/VectorDrawableTest/res/layout/activity_animated_vector_drawable_attr.xml
+++ b/tests/graphics/VectorDrawableTest/res/layout/activity_animated_vector_drawable_attr.xml
diff --git a/tests/VectorDrawableTest/res/values/attrs.xml b/tests/graphics/VectorDrawableTest/res/values/attrs.xml
index 98bf99217b11..98bf99217b11 100644
--- a/tests/VectorDrawableTest/res/values/attrs.xml
+++ b/tests/graphics/VectorDrawableTest/res/values/attrs.xml
diff --git a/tests/VectorDrawableTest/res/values/colors.xml b/tests/graphics/VectorDrawableTest/res/values/colors.xml
index 6eb303649c39..6eb303649c39 100644
--- a/tests/VectorDrawableTest/res/values/colors.xml
+++ b/tests/graphics/VectorDrawableTest/res/values/colors.xml
diff --git a/tests/VectorDrawableTest/res/values/strings.xml b/tests/graphics/VectorDrawableTest/res/values/strings.xml
index a550549faa37..a550549faa37 100644
--- a/tests/VectorDrawableTest/res/values/strings.xml
+++ b/tests/graphics/VectorDrawableTest/res/values/strings.xml
diff --git a/tests/VectorDrawableTest/res/values/styles.xml b/tests/graphics/VectorDrawableTest/res/values/styles.xml
index 8adc03460d90..8adc03460d90 100644
--- a/tests/VectorDrawableTest/res/values/styles.xml
+++ b/tests/graphics/VectorDrawableTest/res/values/styles.xml
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedStateVectorDrawableTest.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedStateVectorDrawableTest.java
index 538655552d28..538655552d28 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedStateVectorDrawableTest.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedStateVectorDrawableTest.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableAttr.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableAttr.java
index 47ca482b7771..47ca482b7771 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableAttr.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableAttr.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableDupPerf.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableDupPerf.java
index 047e494a9551..047e494a9551 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableDupPerf.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableDupPerf.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
index 8f538aee78aa..8f538aee78aa 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/AnimatedVectorDrawableTest.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/BitmapDrawableDupe.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/BitmapDrawableDupe.java
index 36c8f2b4adf2..36c8f2b4adf2 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/BitmapDrawableDupe.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/BitmapDrawableDupe.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/BoundsCheckTest.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/BoundsCheckTest.java
index e2d77ca7e40b..e2d77ca7e40b 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/BoundsCheckTest.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/BoundsCheckTest.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/ScaleDrawableTests.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/ScaleDrawableTests.java
index c5be6c417f69..c5be6c417f69 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/ScaleDrawableTests.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/ScaleDrawableTests.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java
index 0b3ea4d293d2..0b3ea4d293d2 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorCheckbox.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java
index 85fc452add3e..85fc452add3e 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawable01.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableAnimation.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableAnimation.java
index 93b06b6f047b..93b06b6f047b 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableAnimation.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableAnimation.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java
index a00bc5e35c15..a00bc5e35c15 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableDupPerf.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
index 0d2d2e48e4c9..0d2d2e48e4c9 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawablePerformance.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java
index 9d3eded60721..9d3eded60721 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableStaticPerf.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java
index 704d3d76bbec..704d3d76bbec 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorDrawableTest.java
diff --git a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java
index 34301923b0b6..34301923b0b6 100644
--- a/tests/VectorDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java
+++ b/tests/graphics/VectorDrawableTest/src/com/android/test/dynamic/VectorPathChecking.java
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp
index 9ca546fc8d89..45dd02c9b7be 100644
--- a/tools/aapt2/cmd/Link.cpp
+++ b/tools/aapt2/cmd/Link.cpp
@@ -389,7 +389,7 @@ ResourceFileFlattener::ResourceFileFlattener(const ResourceFileFlattenerOptions&
// Build up the rules for degrading newer attributes to older ones.
// NOTE(adamlesinski): These rules are hardcoded right now, but they should be
// generated from the attribute definitions themselves (b/62028956).
- if (const SymbolTable::Symbol* s = symm->FindById(R::attr::paddingHorizontal)) {
+ if (symm->FindById(R::attr::paddingHorizontal)) {
std::vector<ReplacementAttr> replacements{
{"paddingLeft", R::attr::paddingLeft, Attribute(android::ResTable_map::TYPE_DIMENSION)},
{"paddingRight", R::attr::paddingRight, Attribute(android::ResTable_map::TYPE_DIMENSION)},
@@ -398,7 +398,7 @@ ResourceFileFlattener::ResourceFileFlattener(const ResourceFileFlattenerOptions&
util::make_unique<DegradeToManyRule>(std::move(replacements));
}
- if (const SymbolTable::Symbol* s = symm->FindById(R::attr::paddingVertical)) {
+ if (symm->FindById(R::attr::paddingVertical)) {
std::vector<ReplacementAttr> replacements{
{"paddingTop", R::attr::paddingTop, Attribute(android::ResTable_map::TYPE_DIMENSION)},
{"paddingBottom", R::attr::paddingBottom, Attribute(android::ResTable_map::TYPE_DIMENSION)},
@@ -407,7 +407,7 @@ ResourceFileFlattener::ResourceFileFlattener(const ResourceFileFlattenerOptions&
util::make_unique<DegradeToManyRule>(std::move(replacements));
}
- if (const SymbolTable::Symbol* s = symm->FindById(R::attr::layout_marginHorizontal)) {
+ if (symm->FindById(R::attr::layout_marginHorizontal)) {
std::vector<ReplacementAttr> replacements{
{"layout_marginLeft", R::attr::layout_marginLeft,
Attribute(android::ResTable_map::TYPE_DIMENSION)},
@@ -418,7 +418,7 @@ ResourceFileFlattener::ResourceFileFlattener(const ResourceFileFlattenerOptions&
util::make_unique<DegradeToManyRule>(std::move(replacements));
}
- if (const SymbolTable::Symbol* s = symm->FindById(R::attr::layout_marginVertical)) {
+ if (symm->FindById(R::attr::layout_marginVertical)) {
std::vector<ReplacementAttr> replacements{
{"layout_marginTop", R::attr::layout_marginTop,
Attribute(android::ResTable_map::TYPE_DIMENSION)},
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index c4f6e70c0cc9..0b16e2c7efe4 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -338,7 +338,7 @@ static bool VerifyUsesFeature(xml::Element* el, android::SourcePathDiagnostics*
}
bool has_gl_es_version = false;
- if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
+ if (el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) {
if (has_name) {
diag->Error(android::DiagMessage(el->line_number)
<< "cannot define both android:name and android:glEsVersion in <uses-feature>");