summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/ApiDocs.bp1
-rw-r--r--cmds/uiautomator/library/core-src/com/android/uiautomator/core/AccessibilityNodeInfoDumper.java3
-rw-r--r--core/api/current.txt125
-rw-r--r--core/api/system-current.txt269
-rw-r--r--core/api/test-current.txt8
-rw-r--r--core/java/android/adaptiveauth/OWNERS2
-rw-r--r--core/java/android/app/AppOpsManager.java196
-rw-r--r--core/java/android/app/IActivityManager.aidl3
-rw-r--r--core/java/android/app/KeyguardManager.java96
-rw-r--r--core/java/android/app/Notification.java46
-rw-r--r--core/java/android/app/NotificationManager.java16
-rw-r--r--core/java/android/app/PropertyInvalidatedCache.java78
-rw-r--r--core/java/android/app/keyguard.aconfig10
-rw-r--r--core/java/android/app/notification.aconfig14
-rw-r--r--core/java/android/app/performance.aconfig7
-rw-r--r--core/java/android/app/trust/ITrustManager.aidl5
-rw-r--r--core/java/android/app/trust/TrustManager.java31
-rw-r--r--core/java/android/appwidget/flags.aconfig10
-rw-r--r--core/java/android/content/pm/PackageManager.java10
-rw-r--r--core/java/android/content/pm/parsing/ApkLiteParseUtils.java3
-rw-r--r--core/java/android/hardware/contexthub/HubDiscoveryInfo.java43
-rw-r--r--core/java/android/hardware/contexthub/HubEndpoint.java177
-rw-r--r--core/java/android/hardware/contexthub/HubEndpointInfo.java144
-rw-r--r--core/java/android/hardware/contexthub/HubEndpointSession.java63
-rw-r--r--core/java/android/hardware/contexthub/HubMessage.aidl22
-rw-r--r--core/java/android/hardware/contexthub/HubMessage.java289
-rw-r--r--core/java/android/hardware/contexthub/HubServiceInfo.aidl22
-rw-r--r--core/java/android/hardware/contexthub/HubServiceInfo.java263
-rw-r--r--core/java/android/hardware/contexthub/IContextHubEndpoint.aidl27
-rw-r--r--core/java/android/hardware/contexthub/IContextHubEndpointCallback.aidl15
-rw-r--r--core/java/android/hardware/contexthub/IHubEndpointLifecycleCallback.java6
-rw-r--r--core/java/android/hardware/contexthub/IHubEndpointMessageCallback.java45
-rw-r--r--core/java/android/hardware/display/DisplayManagerInternal.java29
-rw-r--r--core/java/android/hardware/input/KeyGestureEvent.java29
-rw-r--r--core/java/android/hardware/location/ContextHubManager.java68
-rw-r--r--core/java/android/hardware/location/ContextHubTransaction.java75
-rw-r--r--core/java/android/hardware/location/IContextHubService.aidl6
-rw-r--r--core/java/android/os/BinderProxy.java34
-rw-r--r--core/java/android/os/IBinder.java39
-rw-r--r--core/java/android/os/PowerManagerInternal.java12
-rw-r--r--core/java/android/os/RemoteCallbackList.java46
-rw-r--r--core/java/android/os/VibrationEffect.java97
-rw-r--r--core/java/android/os/flags.aconfig11
-rw-r--r--core/java/android/os/vibrator/VibratorEnvelopeEffectInfo.java4
-rw-r--r--core/java/android/permission/flags.aconfig11
-rw-r--r--core/java/android/provider/Settings.java60
-rw-r--r--core/java/android/security/forensic/ForensicEvent.java123
-rw-r--r--core/java/android/telephony/PhoneStateListener.java9
-rw-r--r--core/java/android/telephony/TelephonyCallback.java83
-rw-r--r--core/java/android/telephony/TelephonyRegistryManager.java43
-rw-r--r--core/java/android/view/ScaleGestureDetector.java10
-rw-r--r--core/java/com/android/internal/app/IAppOpsService.aidl2
-rw-r--r--core/java/com/android/internal/pm/pkg/parsing/ParsingPackageUtils.java10
-rw-r--r--core/java/com/android/internal/policy/IDeviceLockedStateListener.aidl21
-rw-r--r--core/java/com/android/internal/telephony/IPhoneStateListener.aidl4
-rw-r--r--core/java/com/android/internal/telephony/ITelephonyRegistry.aidl5
-rw-r--r--core/java/com/android/internal/widget/NotificationProgressBar.java34
-rw-r--r--core/java/com/android/internal/widget/NotificationProgressDrawable.java259
-rw-r--r--core/java/com/android/internal/widget/NotificationRowIconView.java84
-rw-r--r--core/jni/android_media_AudioRecord.cpp26
-rw-r--r--core/jni/android_media_AudioSystem.cpp12
-rw-r--r--core/jni/android_media_AudioTrack.cpp22
-rw-r--r--core/jni/android_media_DeviceCallback.cpp15
-rw-r--r--core/jni/android_media_DeviceCallback.h3
-rw-r--r--core/jni/android_view_SurfaceControl.cpp28
-rw-r--r--core/res/AndroidManifest.xml20
-rw-r--r--core/res/res/drawable/notification_progress.xml6
-rw-r--r--core/res/res/layout/notification_2025_template_collapsed_base.xml195
-rw-r--r--core/res/res/layout/notification_2025_template_header.xml111
-rw-r--r--core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml4
-rw-r--r--core/res/res/values-night/colors_dynamic.xml103
-rw-r--r--core/res/res/values-watch/themes_device_defaults.xml6
-rw-r--r--core/res/res/values/attrs.xml285
-rw-r--r--core/res/res/values/colors.xml472
-rw-r--r--core/res/res/values/colors_dynamic.xml103
-rw-r--r--core/res/res/values/config.xml5
-rw-r--r--core/res/res/values/dimens.xml30
-rw-r--r--core/res/res/values/public-staging.xml24
-rw-r--r--core/res/res/values/symbols.xml158
-rw-r--r--core/res/res/values/themes_device_defaults.xml5868
-rw-r--r--core/tests/coretests/BinderFrozenStateChangeCallbackTestApp/src/com/android/frameworks/coretests/bfscctestapp/BfsccTestAppCmdService.java3
-rw-r--r--core/tests/coretests/src/android/app/PropertyInvalidatedCacheTests.java39
-rw-r--r--core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java2
-rw-r--r--core/tests/coretests/src/android/os/BinderFrozenStateChangeNotificationTest.java4
-rw-r--r--core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java3
-rw-r--r--core/tests/vibrator/src/android/os/VibrationEffectTest.java61
-rw-r--r--libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java10
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxCommandHandler.kt184
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxConfiguration.kt82
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxController.kt8
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java79
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandler.kt144
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt217
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/ExitDesktopTaskTransitionHandler.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/IDesktopTaskListener.aidl6
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java21
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskListener.java35
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/unfold/animation/SplitTaskUnfoldAnimator.java4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java35
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt26
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/MinimizeAutoPipAppWindowTest.kt27
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/OpenUnlimitedAppsTest.kt27
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeAutoPipAppWindow.kt72
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeWindowOnAppOpen.kt26
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/OpenUnlimitedApps.kt73
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt8
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt2
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt7
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt7
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt5
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt8
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt7
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt5
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt7
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt3
-rw-r--r--libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt6
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxConfigurationTest.kt160
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxTransitionObserverTest.kt294
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandlerTest.kt312
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt159
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/util/TransitionObserverTestUtils.kt182
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt35
-rw-r--r--libs/hwui/SkiaCanvas.cpp19
-rw-r--r--libs/hwui/effects/GainmapRenderer.cpp15
-rw-r--r--libs/input/MouseCursorController.cpp32
-rw-r--r--libs/input/MouseCursorController.h7
-rw-r--r--libs/input/PointerController.cpp13
-rw-r--r--libs/input/PointerController.h4
-rw-r--r--libs/input/tests/PointerController_test.cpp131
-rw-r--r--media/java/android/media/AudioDeviceInfo.java14
-rw-r--r--media/java/android/media/AudioDevicePort.java42
-rw-r--r--media/java/android/media/AudioPlaybackConfiguration.java67
-rw-r--r--media/java/android/media/AudioRecord.java35
-rw-r--r--media/java/android/media/AudioTrack.java39
-rw-r--r--media/java/android/media/HwAudioSource.java9
-rw-r--r--media/java/android/media/IAudioService.aidl2
-rw-r--r--media/java/android/media/MediaCodecInfo.java2
-rw-r--r--media/java/android/media/MediaFormat.java4
-rw-r--r--media/java/android/media/MediaPlayer.java39
-rw-r--r--media/java/android/media/MediaRecorder.java35
-rw-r--r--media/java/android/media/PlayerBase.java36
-rw-r--r--media/java/android/media/SoundPool.java2
-rw-r--r--media/java/android/media/quality/MediaQualityContract.java4
-rw-r--r--media/java/android/media/quality/MediaQualityManager.java38
-rw-r--r--media/java/android/media/quality/ParamCapability.java1
-rw-r--r--media/java/android/media/quality/PictureProfile.java43
-rw-r--r--media/java/android/media/tv/TvInputServiceExtensionManager.java177
-rw-r--r--media/java/android/media/tv/extension/pvr/IDeleteRecordedContentsCallback.aidl24
-rw-r--r--media/java/android/media/tv/extension/pvr/IGetInfoRecordedContentsCallback.aidl24
-rw-r--r--media/java/android/media/tv/extension/pvr/IRecordedContents.aidl36
-rw-r--r--media/java/android/media/tv/extension/scan/IFavoriteNetwork.aidl36
-rw-r--r--media/java/android/media/tv/extension/scan/IFavoriteNetworkListener.aidl26
-rw-r--r--media/java/android/media/tv/extension/scan/IHDPlusInfo.aidl25
-rw-r--r--media/java/android/media/tv/extension/scan/ILcnConflict.aidl35
-rw-r--r--media/java/android/media/tv/extension/scan/ILcnConflictListener.aidl26
-rw-r--r--media/java/android/media/tv/extension/scan/ILcnV2ChannelList.aidl35
-rw-r--r--media/java/android/media/tv/extension/scan/ILcnV2ChannelListListener.aidl26
-rw-r--r--media/java/android/media/tv/extension/scan/IOperatorDetection.aidl35
-rw-r--r--media/java/android/media/tv/extension/scan/IOperatorDetectionListener.aidl27
-rw-r--r--media/java/android/media/tv/extension/scan/IRegionChannelList.aidl30
-rw-r--r--media/java/android/media/tv/extension/scan/IRegionChannelListListener.aidl24
-rw-r--r--media/java/android/media/tv/extension/scan/IScanInterface.aidl30
-rw-r--r--media/java/android/media/tv/extension/scan/IScanListener.aidl33
-rw-r--r--media/java/android/media/tv/extension/scan/IScanSatSearch.aidl26
-rw-r--r--media/java/android/media/tv/extension/scan/IScanSession.aidl75
-rw-r--r--media/java/android/media/tv/extension/scan/ITargetRegion.aidl36
-rw-r--r--media/java/android/media/tv/extension/scan/ITargetRegionListener.aidl26
-rw-r--r--media/java/android/media/tv/extension/scan/ITkgsInfo.aidl28
-rw-r--r--media/java/android/media/tv/extension/scan/ITkgsInfoListener.aidl26
-rw-r--r--media/java/android/media/tv/extension/signal/IAnalogAudioInfo.aidl26
-rw-r--r--media/java/android/media/tv/extension/signal/IAudioSignalInfo.aidl36
-rw-r--r--media/java/android/media/tv/extension/signal/IAudioSignalInfoListener.aidl26
-rw-r--r--media/java/android/media/tv/extension/signal/IHdmiSignalInfoListener.aidl25
-rw-r--r--media/java/android/media/tv/extension/signal/IHdmiSignalInterface.aidl36
-rw-r--r--media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoInterface.aidl28
-rw-r--r--media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoListener.aidl24
-rw-r--r--media/java/android/media/tv/extension/signal/IVideoSignalInfo.aidl30
-rw-r--r--media/java/android/media/tv/extension/signal/IVideoSignalInfoListener.aidl26
-rw-r--r--media/jni/android_media_MediaPlayer.cpp22
-rw-r--r--media/jni/android_media_MediaRecorder.cpp29
-rw-r--r--nfc/api/current.txt3
-rw-r--r--nfc/api/system-current.txt2
-rw-r--r--nfc/java/android/nfc/INfcAdapter.aidl1
-rw-r--r--nfc/java/android/nfc/INfcOemExtensionCallback.aidl1
-rw-r--r--nfc/java/android/nfc/NfcAdapter.java51
-rw-r--r--nfc/java/android/nfc/NfcOemExtension.java15
-rw-r--r--nfc/java/android/nfc/flags.aconfig8
-rw-r--r--packages/CrashRecovery/services/module/java/com/android/server/PackageWatchdog.java175
-rw-r--r--packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v35/themes.xml2
-rw-r--r--packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v35/themes.xml2
-rw-r--r--packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SharedPreferencesObservable.kt45
-rw-r--r--packages/SettingsLib/Graph/src/com/android/settingslib/graph/GetPreferenceGraphApiHandler.kt10
-rw-r--r--packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceCoordinate.kt45
-rw-r--r--packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterApi.kt148
-rw-r--r--packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterCodecs.kt126
-rw-r--r--packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterFlags.kt31
-rw-r--r--packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGraphBuilder.kt237
-rw-r--r--packages/SettingsLib/Metadata/src/com/android/settingslib/metadata/PreferenceHierarchy.kt3
-rw-r--r--packages/SettingsLib/Service/src/com/android/settingslib/service/PreferenceService.kt6
-rw-r--r--packages/SettingsLib/Service/src/com/android/settingslib/service/ServiceApiConstants.kt3
-rw-r--r--packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml2
-rw-r--r--packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml2
-rw-r--r--packages/SettingsLib/SettingsTheme/res/values-night-v35/colors.xml6
-rw-r--r--packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml4
-rw-r--r--packages/SettingsLib/SettingsTheme/res/values-v35/colors.xml6
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/compose/ModifierExt.kt33
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/preference/BaseLayout.kt17
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Category.kt21
-rw-r--r--packages/SettingsLib/aconfig/settingslib.aconfig7
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java14
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt1
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/volume/shared/AudioSharingLogger.kt2
-rw-r--r--packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/FakeAudioSharingRepositoryLogger.kt4
-rw-r--r--packages/SettingsProvider/src/android/provider/settings/validators/GlobalSettingsValidators.java2
-rw-r--r--packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java1
-rw-r--r--packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java5
-rw-r--r--packages/SystemUI/Android.bp2
-rw-r--r--packages/SystemUI/aconfig/systemui.aconfig4
-rw-r--r--packages/SystemUI/compose/core/src/com/android/compose/theme/PlatformTheme.kt6
-rw-r--r--packages/SystemUI/compose/core/tests/src/com/android/compose/theme/PlatformThemeTest.kt6
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt9
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/SingleShadeMeasurePolicy.kt47
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt2
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt18
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt6
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt13
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/state/TransitionState.kt14
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt37
-rw-r--r--packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt11
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelTest.kt2
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractorTest.kt181
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepositoryTest.kt247
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt286
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt99
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperDialogStarterTest.kt12
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt26
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelTest.kt23
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java12
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerTest.kt50
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt7
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/SettingsProxyTest.kt26
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt82
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java32
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTestKt.kt13
-rw-r--r--packages/SystemUI/pods/com/android/systemui/util/settings/GlobalSettingsImpl.java12
-rw-r--r--packages/SystemUI/pods/com/android/systemui/util/settings/SecureSettingsImpl.java12
-rw-r--r--packages/SystemUI/pods/com/android/systemui/util/settings/SettingsProxy.kt57
-rw-r--r--packages/SystemUI/pods/com/android/systemui/util/settings/SystemSettingsImpl.java12
-rw-r--r--packages/SystemUI/pods/com/android/systemui/util/settings/UserSettingsProxy.kt58
-rw-r--r--packages/SystemUI/res/layout/activity_rear_display_front_screen_on.xml78
-rw-r--r--packages/SystemUI/res/layout/hybrid_conversation_notification.xml5
-rw-r--r--packages/SystemUI/res/layout/notification_2025_hybrid.xml42
-rw-r--r--packages/SystemUI/res/layout/notification_2025_hybrid_conversation.xml74
-rw-r--r--packages/SystemUI/res/layout/ongoing_activity_chip.xml5
-rw-r--r--packages/SystemUI/res/values/dimens.xml13
-rw-r--r--packages/SystemUI/res/values/strings.xml2
-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.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractor.kt72
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepository.kt50
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/InputGestures.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutCategoriesUtils.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutCustomizationInteractor.kt15
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractor.kt59
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CustomShortcutCategories.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/DefaultShortcutCategories.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/KeyCombination.kt19
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelper.kt61
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelperUtils.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModel.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModel.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java107
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSHostAdapter.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooterUtils.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/composefragment/dagger/QSFragmentComposeModule.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/footer/ui/viewmodel/FooterActionsViewModel.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditModeViewModel.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepository.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddable.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/DisabledByPolicyInteractor.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/di/QSTilesModule.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTileDefaultsRepository.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTilePackageUpdatesRepository.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/CustomTileMapper.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/interactor/CustomTileUserActionInteractor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/InternetTileMapper.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/saver/domain/interactor/DataSaverTileUserActionInteractor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/interactor/UiModeNightTileDataInteractor.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayCoreStartable.kt89
-rw-r--r--packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegate.kt62
-rw-r--r--packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayModule.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt152
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridConversationNotificationView.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridGroupManager.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridNotificationView.java20
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/SingleLineViewInflater.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/kotlin/JavaAdapter.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/kotlin/SysUICoroutinesModule.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java100
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java34
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/dialog/sliders/domain/interactor/VolumeDialogSlidersInteractor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractor.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/shared/VolumeLogger.kt22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutCustomizationViewModelTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModelTest.kt31
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayCoreStartableTest.kt112
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegateTest.kt65
-rw-r--r--packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt7
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/DeviceStateManagerKosmos.kt30
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/RearDisplayInnerDialogDelegateKosmos.kt24
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/KeyboardShortcutHelperKosmos.kt9
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt6
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/settings/BrightnessSliderControllerKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/settings/brightness/ui/BrightnessWarningToastKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java17
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettingsKosmos.kt9
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettings.kt54
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/FakeAudioSharingInteractor.kt61
-rw-r--r--ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodAwareTestRunner.java6
-rw-r--r--ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java49
-rw-r--r--ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodConfig.java33
-rw-r--r--ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java11
-rw-r--r--ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodSystemProperties.java4
-rw-r--r--ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodCommonUtils.java47
-rw-r--r--ravenwood/tests/bivalentinst/Android.bp7
-rw-r--r--ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_nonself.java7
-rw-r--r--ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_self.java9
-rw-r--r--ravenwood/tests/bivalenttest/Android.bp2
-rw-r--r--ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/RavenwoodConfigTest.java10
-rw-r--r--ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/compat/RavenwoodCompatFrameworkTest.kt12
-rw-r--r--ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerConfigValidationTest.java9
-rw-r--r--ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerTestBase.java3
-rw-r--r--ravenwood/tests/runtime-test/Android.bp2
-rw-r--r--services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java41
-rw-r--r--services/core/java/com/android/server/TelephonyRegistry.java102
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java9
-rw-r--r--services/core/java/com/android/server/appop/AppOpsService.java5
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java6
-rw-r--r--services/core/java/com/android/server/audio/PlaybackActivityMonitor.java52
-rw-r--r--services/core/java/com/android/server/biometrics/BiometricService.java11
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java5
-rw-r--r--services/core/java/com/android/server/display/DisplayManagerService.java17
-rw-r--r--services/core/java/com/android/server/display/DisplayPowerController.java15
-rw-r--r--services/core/java/com/android/server/display/brightness/DisplayBrightnessController.java14
-rw-r--r--services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java10
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/OverrideBrightnessStrategy.java58
-rw-r--r--services/core/java/com/android/server/display/mode/SystemRequestObserver.java16
-rw-r--r--services/core/java/com/android/server/input/InputGestureManager.java44
-rw-r--r--services/core/java/com/android/server/location/contexthub/ContextHubService.java10
-rw-r--r--services/core/java/com/android/server/location/contexthub/HubInfoRegistry.java19
-rw-r--r--services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java20
-rw-r--r--services/core/java/com/android/server/media/projection/MediaProjectionStopController.java25
-rw-r--r--services/core/java/com/android/server/media/quality/MediaQualityService.java56
-rw-r--r--services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java99
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java8
-rw-r--r--services/core/java/com/android/server/pm/InstallPackageHelper.java14
-rw-r--r--services/core/java/com/android/server/pm/LauncherAppsService.java31
-rw-r--r--services/core/java/com/android/server/power/PowerManagerService.java44
-rw-r--r--services/core/java/com/android/server/security/authenticationpolicy/AuthenticationPolicyService.java (renamed from services/core/java/com/android/server/security/adaptiveauthentication/AdaptiveAuthenticationService.java)10
-rw-r--r--services/core/java/com/android/server/security/authenticationpolicy/OWNERS (renamed from services/core/java/com/android/server/security/adaptiveauthentication/OWNERS)0
-rw-r--r--services/core/java/com/android/server/security/forensic/SecurityLogSource.java45
-rw-r--r--services/core/java/com/android/server/trust/TrustManagerService.java49
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java28
-rw-r--r--services/core/java/com/android/server/wm/AppCompatCameraOverrides.java16
-rw-r--r--services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java31
-rw-r--r--services/core/java/com/android/server/wm/DisplayArea.java2
-rw-r--r--services/core/java/com/android/server/wm/RootWindowContainer.java38
-rw-r--r--services/core/java/com/android/server/wm/TransitionController.java4
-rw-r--r--services/core/java/com/android/server/wm/WindowContainer.java38
-rw-r--r--services/java/com/android/server/SystemServer.java11
-rw-r--r--services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java4
-rw-r--r--services/tests/apexsystemservices/services/Android.bp1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java32
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessControllerTest.java22
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java16
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OverrideBrightnessStrategyTest.java55
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/mode/SystemRequestObserverTest.kt24
-rw-r--r--services/tests/security/forensic/src/com/android/server/security/forensic/ForensicServiceTest.java41
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/FlashNotificationsControllerTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/LoudnessCodecHelperTest.java5
-rw-r--r--services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java4
-rw-r--r--services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionStopControllerTest.java57
-rw-r--r--services/tests/servicestests/src/com/android/server/security/adaptiveauthentication/OWNERS1
-rw-r--r--services/tests/servicestests/src/com/android/server/security/authenticationpolicy/AuthenticationPolicyServiceTest.java (renamed from services/tests/servicestests/src/com/android/server/security/adaptiveauthentication/AdaptiveAuthenticationServiceTest.java)18
-rw-r--r--services/tests/servicestests/src/com/android/server/security/authenticationpolicy/OWNERS1
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java51
-rw-r--r--services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java23
-rw-r--r--services/tests/wmtests/AndroidManifest.xml4
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java56
-rw-r--r--telephony/java/android/telephony/CellularIdentifierDisclosure.aidl20
-rw-r--r--telephony/java/android/telephony/CellularIdentifierDisclosure.java135
-rw-r--r--telephony/java/android/telephony/SecurityAlgorithmUpdate.aidl20
-rw-r--r--telephony/java/android/telephony/SecurityAlgorithmUpdate.java269
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteManager.java79
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl11
-rw-r--r--test-mock/src/android/test/mock/MockContentResolver.java3
-rw-r--r--tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt6
-rw-r--r--tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt28
433 files changed, 15605 insertions, 6009 deletions
diff --git a/api/ApiDocs.bp b/api/ApiDocs.bp
index 1ebe0cdfabd7..89351fd47ff8 100644
--- a/api/ApiDocs.bp
+++ b/api/ApiDocs.bp
@@ -61,6 +61,7 @@ stubs_defaults {
":framework-bluetooth-sources",
":framework-connectivity-tiramisu-updatable-sources",
":framework-graphics-srcs",
+ ":framework-healthfitness-sources",
":framework-mediaprovider-sources",
":framework-nearby-sources",
":framework-nfc-updatable-sources",
diff --git a/cmds/uiautomator/library/core-src/com/android/uiautomator/core/AccessibilityNodeInfoDumper.java b/cmds/uiautomator/library/core-src/com/android/uiautomator/core/AccessibilityNodeInfoDumper.java
index f726361effd6..a88796c38166 100644
--- a/cmds/uiautomator/library/core-src/com/android/uiautomator/core/AccessibilityNodeInfoDumper.java
+++ b/cmds/uiautomator/library/core-src/com/android/uiautomator/core/AccessibilityNodeInfoDumper.java
@@ -217,6 +217,9 @@ public class AccessibilityNodeInfoDumper {
serializer.attribute("", "selected", Boolean.toString(node.isSelected()));
serializer.attribute("", "bounds", AccessibilityNodeInfoHelper.getVisibleBoundsInScreen(
node, width, height).toShortString());
+ serializer.attribute("", "drawing-order", Integer.toString(node.getDrawingOrder()));
+ serializer.attribute("", "hint", safeCharSeqToString(node.getHintText()));
+
int count = node.getChildCount();
for (int i = 0; i < count; i++) {
AccessibilityNodeInfo child = node.getChild(i);
diff --git a/core/api/current.txt b/core/api/current.txt
index f66015841a4d..6cf572bd3019 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -2045,6 +2045,12 @@ package android {
field public static final int system_error_container_light = 17170554; // 0x106007a
field public static final int system_error_dark = 17170595; // 0x10600a3
field public static final int system_error_light = 17170552; // 0x1060078
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_inverse_on_surface_dark;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_inverse_on_surface_light;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_inverse_primary_dark;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_inverse_primary_light;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_inverse_surface_dark;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_inverse_surface_light;
field public static final int system_neutral1_0 = 17170461; // 0x106001d
field public static final int system_neutral1_10 = 17170462; // 0x106001e
field public static final int system_neutral1_100 = 17170464; // 0x1060020
@@ -2121,12 +2127,16 @@ package android {
field public static final int system_primary_fixed = 17170612; // 0x10600b4
field public static final int system_primary_fixed_dim = 17170613; // 0x10600b5
field public static final int system_primary_light = 17170528; // 0x1060060
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_scrim_dark;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_scrim_light;
field public static final int system_secondary_container_dark = 17170573; // 0x106008d
field public static final int system_secondary_container_light = 17170530; // 0x1060062
field public static final int system_secondary_dark = 17170575; // 0x106008f
field public static final int system_secondary_fixed = 17170616; // 0x10600b8
field public static final int system_secondary_fixed_dim = 17170617; // 0x10600b9
field public static final int system_secondary_light = 17170532; // 0x1060064
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_shadow_dark;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_shadow_light;
field public static final int system_surface_bright_dark = 17170590; // 0x106009e
field public static final int system_surface_bright_light = 17170547; // 0x1060073
field public static final int system_surface_container_dark = 17170587; // 0x106009b
@@ -2144,6 +2154,8 @@ package android {
field public static final int system_surface_dim_light = 17170548; // 0x1060074
field public static final int system_surface_disabled = 17170626; // 0x10600c2
field public static final int system_surface_light = 17170540; // 0x106006c
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_surface_tint_dark;
+ field @FlaggedApi("android.os.material_colors_10_2024") public static final int system_surface_tint_light;
field public static final int system_surface_variant_dark = 17170592; // 0x10600a0
field public static final int system_surface_variant_light = 17170549; // 0x1060075
field public static final int system_tertiary_container_dark = 17170577; // 0x1060091
@@ -5098,8 +5110,11 @@ package android.app {
}
public class AppOpsManager {
- method @Deprecated public int checkOp(@NonNull String, int, @NonNull String);
- method @Deprecated public int checkOpNoThrow(@NonNull String, int, @NonNull String);
+ method @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int checkOp(@NonNull String, int, @NonNull String);
+ method @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int checkOp(@NonNull String, int, @NonNull String, @Nullable String);
+ method @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int checkOpNoThrow(@NonNull String, int, @NonNull String, @Nullable String);
+ method @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int checkOpNoThrow(@NonNull String, int, @NonNull String);
+ method @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int checkOpRawNoThrow(@NonNull String, int, @NonNull String, @Nullable String);
method @Deprecated public void checkPackage(int, @NonNull String);
method @Deprecated public void finishOp(@NonNull String, int, @NonNull String);
method public void finishOp(@NonNull String, int, @NonNull String, @Nullable String);
@@ -5128,10 +5143,10 @@ package android.app {
method public void startWatchingMode(@NonNull String, @Nullable String, int, @NonNull android.app.AppOpsManager.OnOpChangedListener);
method public void stopWatchingActive(@NonNull android.app.AppOpsManager.OnOpActiveChangedListener);
method public void stopWatchingMode(@NonNull android.app.AppOpsManager.OnOpChangedListener);
- method public int unsafeCheckOp(@NonNull String, int, @NonNull String);
- method public int unsafeCheckOpNoThrow(@NonNull String, int, @NonNull String);
- method public int unsafeCheckOpRaw(@NonNull String, int, @NonNull String);
- method public int unsafeCheckOpRawNoThrow(@NonNull String, int, @NonNull String);
+ method @Deprecated @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int unsafeCheckOp(@NonNull String, int, @NonNull String);
+ method @Deprecated @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int unsafeCheckOpNoThrow(@NonNull String, int, @NonNull String);
+ method @Deprecated @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int unsafeCheckOpRaw(@NonNull String, int, @NonNull String);
+ method @Deprecated @FlaggedApi("android.permission.flags.check_op_overload_api_enabled") public int unsafeCheckOpRawNoThrow(@NonNull String, int, @NonNull String);
field public static final int MODE_ALLOWED = 0; // 0x0
field public static final int MODE_DEFAULT = 3; // 0x3
field public static final int MODE_ERRORED = 2; // 0x2
@@ -6223,6 +6238,7 @@ package android.app {
}
public class KeyguardManager {
+ method @FlaggedApi("android.app.device_unlock_listener") @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void addDeviceLockedStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.app.KeyguardManager.DeviceLockedStateListener);
method @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void addKeyguardLockedStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.app.KeyguardManager.KeyguardLockedStateListener);
method @Deprecated public android.content.Intent createConfirmDeviceCredentialIntent(CharSequence, CharSequence);
method @Deprecated @RequiresPermission(android.Manifest.permission.DISABLE_KEYGUARD) public void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult);
@@ -6232,10 +6248,15 @@ package android.app {
method public boolean isKeyguardLocked();
method public boolean isKeyguardSecure();
method @Deprecated public android.app.KeyguardManager.KeyguardLock newKeyguardLock(String);
+ method @FlaggedApi("android.app.device_unlock_listener") @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void removeDeviceLockedStateListener(@NonNull android.app.KeyguardManager.DeviceLockedStateListener);
method @RequiresPermission(android.Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE) public void removeKeyguardLockedStateListener(@NonNull android.app.KeyguardManager.KeyguardLockedStateListener);
method public void requestDismissKeyguard(@NonNull android.app.Activity, @Nullable android.app.KeyguardManager.KeyguardDismissCallback);
}
+ @FlaggedApi("android.app.device_unlock_listener") @java.lang.FunctionalInterface public static interface KeyguardManager.DeviceLockedStateListener {
+ method public void onDeviceLockedStateChanged(boolean);
+ }
+
public abstract static class KeyguardManager.KeyguardDismissCallback {
ctor public KeyguardManager.KeyguardDismissCallback();
method public void onDismissCancelled();
@@ -13378,6 +13399,7 @@ package android.content.pm {
field public static final String FEATURE_BACKUP = "android.software.backup";
field public static final String FEATURE_BLUETOOTH = "android.hardware.bluetooth";
field public static final String FEATURE_BLUETOOTH_LE = "android.hardware.bluetooth_le";
+ field @FlaggedApi("com.android.ranging.flags.ranging_cs_enabled") public static final String FEATURE_BLUETOOTH_LE_CHANNEL_SOUNDING = "android.hardware.bluetooth_le.channel_sounding";
field public static final String FEATURE_CAMERA = "android.hardware.camera";
field public static final String FEATURE_CAMERA_ANY = "android.hardware.camera.any";
field public static final String FEATURE_CAMERA_AR = "android.hardware.camera.ar";
@@ -21545,6 +21567,7 @@ package android.media {
method public int getId();
method public CharSequence getProductName();
method @NonNull public int[] getSampleRates();
+ method @FlaggedApi("android.media.audio.speaker_layout_api") public int getSpeakerLayoutChannelMask();
method public int getType();
method public boolean isSink();
method public boolean isSource();
@@ -23167,7 +23190,6 @@ package android.media {
method public boolean isVendor();
field @FlaggedApi("android.media.codec.in_process_sw_audio_codec") public static final int SECURITY_MODEL_MEMORY_SAFE = 1; // 0x1
field @FlaggedApi("android.media.codec.in_process_sw_audio_codec") public static final int SECURITY_MODEL_SANDBOXED = 0; // 0x0
- field @FlaggedApi("android.media.codec.in_process_sw_audio_codec") public static final int SECURITY_MODEL_TRUSTED_CONTENT_ONLY = 2; // 0x2
}
public static final class MediaCodecInfo.AudioCapabilities {
@@ -24058,7 +24080,6 @@ package android.media {
field public static final int COLOR_TRANSFER_ST2084 = 6; // 0x6
field @FlaggedApi("android.media.codec.in_process_sw_audio_codec") public static final int FLAG_SECURITY_MODEL_MEMORY_SAFE = 2; // 0x2
field @FlaggedApi("android.media.codec.in_process_sw_audio_codec") public static final int FLAG_SECURITY_MODEL_SANDBOXED = 1; // 0x1
- field @FlaggedApi("android.media.codec.in_process_sw_audio_codec") public static final int FLAG_SECURITY_MODEL_TRUSTED_CONTENT_ONLY = 4; // 0x4
field public static final String KEY_AAC_DRC_ALBUM_MODE = "aac-drc-album-mode";
field public static final String KEY_AAC_DRC_ATTENUATION_FACTOR = "aac-drc-cut-level";
field public static final String KEY_AAC_DRC_BOOST_FACTOR = "aac-drc-boost-level";
@@ -27036,6 +27057,86 @@ package android.media.projection {
}
+package android.media.quality {
+
+ @FlaggedApi("android.media.tv.flags.media_quality_fw") public class MediaQualityContract {
+ }
+
+ public static final class MediaQualityContract.PictureQuality {
+ field public static final String PARAMETER_BRIGHTNESS = "brightness";
+ field public static final String PARAMETER_CONTRAST = "contrast";
+ field public static final String PARAMETER_SATURATION = "saturation";
+ field public static final String PARAMETER_SHARPNESS = "sharpness";
+ }
+
+ @FlaggedApi("android.media.tv.flags.media_quality_fw") public final class MediaQualityManager {
+ method public void createPictureProfile(@NonNull android.media.quality.PictureProfile);
+ method @NonNull public java.util.List<android.media.quality.PictureProfile> getAvailablePictureProfiles();
+ method @NonNull public java.util.List<android.media.quality.ParamCapability> getParamCapabilities(@NonNull java.util.List<java.lang.String>);
+ method @Nullable public android.media.quality.PictureProfile getPictureProfile(int, @NonNull String);
+ method public boolean isAutoPictureQualityEnabled();
+ method public boolean isSuperResolutionEnabled();
+ method public void registerPictureProfileCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.quality.MediaQualityManager.PictureProfileCallback);
+ method public void removePictureProfile(@NonNull String);
+ method public void unregisterPictureProfileCallback(@NonNull android.media.quality.MediaQualityManager.PictureProfileCallback);
+ method public void updatePictureProfile(@NonNull String, @NonNull android.media.quality.PictureProfile);
+ }
+
+ public abstract static class MediaQualityManager.PictureProfileCallback {
+ ctor public MediaQualityManager.PictureProfileCallback();
+ method public void onError(int);
+ method public void onParamCapabilitiesChanged(@Nullable String, @NonNull java.util.List<android.media.quality.ParamCapability>);
+ method public void onPictureProfileAdded(@NonNull String, @NonNull android.media.quality.PictureProfile);
+ method public void onPictureProfileRemoved(@NonNull String, @NonNull android.media.quality.PictureProfile);
+ method public void onPictureProfileUpdated(@NonNull String, @NonNull android.media.quality.PictureProfile);
+ }
+
+ @FlaggedApi("android.media.tv.flags.media_quality_fw") public final class ParamCapability implements android.os.Parcelable {
+ method public int describeContents();
+ method @NonNull public android.os.Bundle getCapabilities();
+ method @NonNull public String getParamName();
+ method public int getParamType();
+ method public boolean isSupported();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field public static final String CAPABILITY_DEFAULT = "default";
+ field public static final String CAPABILITY_ENUM = "enum";
+ field public static final String CAPABILITY_MAX = "max";
+ field public static final String CAPABILITY_MIN = "min";
+ field @NonNull public static final android.os.Parcelable.Creator<android.media.quality.ParamCapability> CREATOR;
+ field public static final int TYPE_DOUBLE = 3; // 0x3
+ field public static final int TYPE_INT = 1; // 0x1
+ field public static final int TYPE_LONG = 2; // 0x2
+ field public static final int TYPE_STRING = 4; // 0x4
+ }
+
+ @FlaggedApi("android.media.tv.flags.media_quality_fw") public final class PictureProfile implements android.os.Parcelable {
+ method public int describeContents();
+ method @Nullable public String getInputId();
+ method @NonNull public String getName();
+ method @Nullable public String getPackageName();
+ method @NonNull public android.os.PersistableBundle getParameters();
+ method @Nullable public String getProfileId();
+ method public int getProfileType();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.media.quality.PictureProfile> CREATOR;
+ field public static final int ERROR_DUPLICATE = 2; // 0x2
+ field public static final int ERROR_INVALID_ARGUMENT = 3; // 0x3
+ field public static final int ERROR_NOT_ALLOWLISTED = 4; // 0x4
+ field public static final int ERROR_NO_PERMISSION = 1; // 0x1
+ field public static final int ERROR_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_APPLICATION = 2; // 0x2
+ field public static final int TYPE_SYSTEM = 1; // 0x1
+ }
+
+ public static final class PictureProfile.Builder {
+ ctor public PictureProfile.Builder(@NonNull String);
+ ctor public PictureProfile.Builder(@NonNull android.media.quality.PictureProfile);
+ method @NonNull public android.media.quality.PictureProfile build();
+ method @NonNull public android.media.quality.PictureProfile.Builder setParameters(@NonNull android.os.PersistableBundle);
+ }
+
+}
+
package android.media.session {
public final class MediaController {
@@ -33707,7 +33808,7 @@ package android.os {
}
public interface IBinder {
- method @FlaggedApi("android.os.binder_frozen_state_change_callback") public default void addFrozenStateChangeCallback(@NonNull android.os.IBinder.FrozenStateChangeCallback) throws android.os.RemoteException;
+ method @FlaggedApi("android.os.binder_frozen_state_change_callback") public default void addFrozenStateChangeCallback(@NonNull java.util.concurrent.Executor, @NonNull android.os.IBinder.FrozenStateChangeCallback) throws android.os.RemoteException;
method public void dump(@NonNull java.io.FileDescriptor, @Nullable String[]) throws android.os.RemoteException;
method public void dumpAsync(@NonNull java.io.FileDescriptor, @Nullable String[]) throws android.os.RemoteException;
method @Nullable public String getInterfaceDescriptor() throws android.os.RemoteException;
@@ -34338,6 +34439,7 @@ package android.os {
method public void finishBroadcast();
method public Object getBroadcastCookie(int);
method public E getBroadcastItem(int);
+ method @FlaggedApi("android.os.binder_frozen_state_change_callback") @Nullable public java.util.concurrent.Executor getExecutor();
method @FlaggedApi("android.os.binder_frozen_state_change_callback") public int getFrozenCalleePolicy();
method @FlaggedApi("android.os.binder_frozen_state_change_callback") public int getMaxQueueSize();
method public Object getRegisteredCallbackCookie(int);
@@ -34358,6 +34460,7 @@ package android.os {
@FlaggedApi("android.os.binder_frozen_state_change_callback") public static final class RemoteCallbackList.Builder<E extends android.os.IInterface> {
ctor public RemoteCallbackList.Builder(int);
method @NonNull public android.os.RemoteCallbackList<E> build();
+ method @NonNull public android.os.RemoteCallbackList.Builder setExecutor(@NonNull java.util.concurrent.Executor);
method @NonNull public android.os.RemoteCallbackList.Builder setInterfaceDiedCallback(@NonNull android.os.RemoteCallbackList.Builder.InterfaceDiedCallback<E>);
method @NonNull public android.os.RemoteCallbackList.Builder setMaxQueueSize(int);
}
@@ -34737,8 +34840,6 @@ package android.os {
method public static android.os.VibrationEffect createWaveform(long[], int[], int);
method public int describeContents();
method @NonNull public static android.os.VibrationEffect.Composition startComposition();
- method @FlaggedApi("android.os.vibrator.normalized_pwle_effects") @NonNull public static android.os.VibrationEffect.WaveformEnvelopeBuilder startWaveformEnvelope();
- method @FlaggedApi("android.os.vibrator.normalized_pwle_effects") @NonNull public static android.os.VibrationEffect.WaveformEnvelopeBuilder startWaveformEnvelope(@FloatRange(from=0) float);
field @NonNull public static final android.os.Parcelable.Creator<android.os.VibrationEffect> CREATOR;
field public static final int DEFAULT_AMPLITUDE = -1; // 0xffffffff
field public static final int EFFECT_CLICK = 0; // 0x0
@@ -34766,8 +34867,10 @@ package android.os {
}
@FlaggedApi("android.os.vibrator.normalized_pwle_effects") public static final class VibrationEffect.WaveformEnvelopeBuilder {
+ ctor public VibrationEffect.WaveformEnvelopeBuilder();
method @FlaggedApi("android.os.vibrator.normalized_pwle_effects") @NonNull public android.os.VibrationEffect.WaveformEnvelopeBuilder addControlPoint(@FloatRange(from=0, to=1) float, @FloatRange(from=0) float, int);
method @FlaggedApi("android.os.vibrator.normalized_pwle_effects") @NonNull public android.os.VibrationEffect build();
+ method @FlaggedApi("android.os.vibrator.normalized_pwle_effects") @NonNull public android.os.VibrationEffect.WaveformEnvelopeBuilder setInitialFrequencyHz(@FloatRange(from=0) float);
}
public abstract class Vibrator {
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 9197a0129593..bc0037d9318f 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -5242,11 +5242,15 @@ package android.hardware.contexthub {
@FlaggedApi("android.chre.flags.offload_api") public class HubDiscoveryInfo {
method @NonNull public android.hardware.contexthub.HubEndpointInfo getHubEndpointInfo();
+ method @Nullable public android.hardware.contexthub.HubServiceInfo getHubServiceInfo();
}
@FlaggedApi("android.chre.flags.offload_api") public class HubEndpoint {
method @Nullable public android.hardware.contexthub.IHubEndpointLifecycleCallback getLifecycleCallback();
+ method @Nullable public android.hardware.contexthub.IHubEndpointMessageCallback getMessageCallback();
+ method @NonNull public java.util.Collection<android.hardware.contexthub.HubServiceInfo> getServiceInfoCollection();
method @Nullable public String getTag();
+ method public int getVersion();
}
public static final class HubEndpoint.Builder {
@@ -5254,6 +5258,9 @@ package android.hardware.contexthub {
method @NonNull public android.hardware.contexthub.HubEndpoint build();
method @NonNull public android.hardware.contexthub.HubEndpoint.Builder setLifecycleCallback(@NonNull android.hardware.contexthub.IHubEndpointLifecycleCallback);
method @NonNull public android.hardware.contexthub.HubEndpoint.Builder setLifecycleCallback(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.contexthub.IHubEndpointLifecycleCallback);
+ method @NonNull public android.hardware.contexthub.HubEndpoint.Builder setMessageCallback(@NonNull android.hardware.contexthub.IHubEndpointMessageCallback);
+ method @NonNull public android.hardware.contexthub.HubEndpoint.Builder setMessageCallback(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.contexthub.IHubEndpointMessageCallback);
+ method @NonNull public android.hardware.contexthub.HubEndpoint.Builder setServiceInfoCollection(@NonNull java.util.Collection<android.hardware.contexthub.HubServiceInfo>);
method @NonNull public android.hardware.contexthub.HubEndpoint.Builder setTag(@NonNull String);
}
@@ -5261,9 +5268,18 @@ package android.hardware.contexthub {
method public int describeContents();
method @NonNull public android.hardware.contexthub.HubEndpointInfo.HubEndpointIdentifier getIdentifier();
method @NonNull public String getName();
+ method @NonNull public java.util.Collection<java.lang.String> getRequiredPermissions();
+ method @NonNull public java.util.Collection<android.hardware.contexthub.HubServiceInfo> getServiceInfoCollection();
method @Nullable public String getTag();
+ method public int getType();
+ method public int getVersion();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.hardware.contexthub.HubEndpointInfo> CREATOR;
+ field public static final int TYPE_APP = 2; // 0x2
+ field public static final int TYPE_FRAMEWORK = 1; // 0x1
+ field public static final int TYPE_HUB_ENDPOINT = 5; // 0x5
+ field public static final int TYPE_NANOAPP = 4; // 0x4
+ field public static final int TYPE_NATIVE = 3; // 0x3
}
public static class HubEndpointInfo.HubEndpointIdentifier {
@@ -5273,6 +5289,8 @@ package android.hardware.contexthub {
@FlaggedApi("android.chre.flags.offload_api") public class HubEndpointSession implements java.lang.AutoCloseable {
method public void close();
+ method @Nullable public android.hardware.contexthub.HubServiceInfo getServiceInfo();
+ method @NonNull public android.hardware.location.ContextHubTransaction<java.lang.Void> sendMessage(@NonNull android.hardware.contexthub.HubMessage);
}
@FlaggedApi("android.chre.flags.offload_api") public class HubEndpointSessionResult {
@@ -5282,15 +5300,56 @@ package android.hardware.contexthub {
method @NonNull public static android.hardware.contexthub.HubEndpointSessionResult reject(@NonNull String);
}
+ @FlaggedApi("android.chre.flags.offload_api") public final class HubMessage implements android.os.Parcelable {
+ method @NonNull public static android.hardware.contexthub.HubMessage createMessage(int, @NonNull byte[]);
+ method @NonNull public static android.hardware.contexthub.HubMessage createMessage(int, @NonNull byte[], @NonNull android.hardware.contexthub.HubMessage.DeliveryParams);
+ method public int describeContents();
+ method @NonNull public byte[] getMessageBody();
+ method public int getMessageType();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.hardware.contexthub.HubMessage> CREATOR;
+ }
+
+ public static class HubMessage.DeliveryParams {
+ method public boolean isResponseRequired();
+ method @NonNull public static android.hardware.contexthub.HubMessage.DeliveryParams makeBasic();
+ method @NonNull public android.hardware.contexthub.HubMessage.DeliveryParams setResponseRequired(boolean);
+ }
+
+ @FlaggedApi("android.chre.flags.offload_api") public final class HubServiceInfo implements android.os.Parcelable {
+ ctor public HubServiceInfo(@NonNull String, int, int, int, @NonNull android.os.ParcelableHolder);
+ method public int describeContents();
+ method @NonNull public android.os.ParcelableHolder getExtendedInfo();
+ method public int getFormat();
+ method public int getMajorVersion();
+ method public int getMinorVersion();
+ method @NonNull public String getServiceDescriptor();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.hardware.contexthub.HubServiceInfo> CREATOR;
+ field public static final int FORMAT_AIDL = 1; // 0x1
+ field public static final int FORMAT_CUSTOM = 0; // 0x0
+ field public static final int FORMAT_PW_RPC_PROTOBUF = 2; // 0x2
+ }
+
+ public static final class HubServiceInfo.Builder {
+ ctor public HubServiceInfo.Builder(@NonNull String, int, int, int);
+ method @NonNull public android.hardware.contexthub.HubServiceInfo build();
+ method @NonNull public android.hardware.contexthub.HubServiceInfo.Builder setExtendedInfo(@Nullable android.os.Parcelable);
+ }
+
@FlaggedApi("android.chre.flags.offload_api") public interface IHubEndpointLifecycleCallback {
method public void onSessionClosed(@NonNull android.hardware.contexthub.HubEndpointSession, int);
- method @NonNull public android.hardware.contexthub.HubEndpointSessionResult onSessionOpenRequest(@NonNull android.hardware.contexthub.HubEndpointInfo);
+ method @NonNull public android.hardware.contexthub.HubEndpointSessionResult onSessionOpenRequest(@NonNull android.hardware.contexthub.HubEndpointInfo, @Nullable android.hardware.contexthub.HubServiceInfo);
method public void onSessionOpened(@NonNull android.hardware.contexthub.HubEndpointSession);
field public static final int REASON_CLOSE_ENDPOINT_SESSION_REQUESTED = 4; // 0x4
field public static final int REASON_OPEN_ENDPOINT_SESSION_REQUEST_REJECTED = 3; // 0x3
field public static final int REASON_UNSPECIFIED = 0; // 0x0
}
+ @FlaggedApi("android.chre.flags.offload_api") public interface IHubEndpointMessageCallback {
+ method public void onMessageReceived(@NonNull android.hardware.contexthub.HubEndpointSession, @NonNull android.hardware.contexthub.HubMessage);
+ }
+
}
package android.hardware.devicestate {
@@ -6286,6 +6345,7 @@ package android.hardware.location {
method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public android.hardware.location.ContextHubTransaction<java.lang.Void> disableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public android.hardware.location.ContextHubTransaction<java.lang.Void> enableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long);
method @FlaggedApi("android.chre.flags.offload_api") @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public java.util.List<android.hardware.contexthub.HubDiscoveryInfo> findEndpoints(long);
+ method @FlaggedApi("android.chre.flags.offload_api") @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public java.util.List<android.hardware.contexthub.HubDiscoveryInfo> findEndpoints(@NonNull String);
method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public int[] findNanoAppOnHub(int, @NonNull android.hardware.location.NanoAppFilter);
method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public int[] getContextHubHandles();
method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public android.hardware.location.ContextHubInfo getContextHubInfo(int);
@@ -6294,6 +6354,7 @@ package android.hardware.location {
method @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public int loadNanoApp(int, @NonNull android.hardware.location.NanoApp);
method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public android.hardware.location.ContextHubTransaction<java.lang.Void> loadNanoApp(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.NanoAppBinary);
method @FlaggedApi("android.chre.flags.offload_api") @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public void openSession(@NonNull android.hardware.contexthub.HubEndpoint, @NonNull android.hardware.contexthub.HubEndpointInfo);
+ method @FlaggedApi("android.chre.flags.offload_api") @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public void openSession(@NonNull android.hardware.contexthub.HubEndpoint, @NonNull android.hardware.contexthub.HubEndpointInfo, @NonNull android.hardware.contexthub.HubServiceInfo);
method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB) public android.hardware.location.ContextHubTransaction<java.util.List<android.hardware.location.NanoAppState>> queryNanoApps(@NonNull android.hardware.location.ContextHubInfo);
method @Deprecated public int registerCallback(@NonNull android.hardware.location.ContextHubManager.Callback);
method @Deprecated public int registerCallback(android.hardware.location.ContextHubManager.Callback, android.os.Handler);
@@ -6358,6 +6419,8 @@ package android.hardware.location {
field public static final int RESULT_SUCCESS = 0; // 0x0
field public static final int TYPE_DISABLE_NANOAPP = 3; // 0x3
field public static final int TYPE_ENABLE_NANOAPP = 2; // 0x2
+ field @FlaggedApi("android.chre.flags.offload_api") public static final int TYPE_HUB_MESSAGE_DEFAULT = 6; // 0x6
+ field @FlaggedApi("android.chre.flags.offload_api") public static final int TYPE_HUB_MESSAGE_REQUIRES_RESPONSE = 7; // 0x7
field public static final int TYPE_LOAD_NANOAPP = 0; // 0x0
field public static final int TYPE_QUERY_NANOAPPS = 4; // 0x4
field public static final int TYPE_RELIABLE_MESSAGE = 5; // 0x5
@@ -8085,6 +8148,25 @@ package android.media.musicrecognition {
}
+package android.media.quality {
+
+ @FlaggedApi("android.media.tv.flags.media_quality_fw") public final class MediaQualityManager {
+ method @NonNull public java.util.List<java.lang.String> getPictureProfileAllowList();
+ method @NonNull public java.util.List<java.lang.String> getPictureProfilePackageNames();
+ method @NonNull public java.util.List<android.media.quality.PictureProfile> getPictureProfilesByPackage(@NonNull String);
+ method public void setAutoPictureQualityEnabled(boolean);
+ method public void setPictureProfileAllowList(@NonNull java.util.List<java.lang.String>);
+ method public void setSuperResolutionEnabled(boolean);
+ }
+
+ public static final class PictureProfile.Builder {
+ method @NonNull public android.media.quality.PictureProfile.Builder setInputId(@NonNull String);
+ method @NonNull public android.media.quality.PictureProfile.Builder setPackageName(@NonNull String);
+ method @NonNull public android.media.quality.PictureProfile.Builder setProfileType(int);
+ }
+
+}
+
package android.media.session {
public final class MediaSessionManager {
@@ -8377,18 +8459,96 @@ package android.media.tv {
@FlaggedApi("android.media.tv.flags.tif_extension_standardization") public final class TvInputServiceExtensionManager {
method @RequiresPermission(android.Manifest.permission.TV_INPUT_HARDWARE) public int registerExtensionIBinder(@NonNull String, @NonNull android.os.IBinder);
- field public static final String IBROADCAST_TIME = "android.media.tv.extension.time.BroadcastTime";
+ field public static final String IANALOG_ATTRIBUTE_INTERFACE = "android.media.tv.extension.analog.IAnalogAttributeInterface";
+ field public static final String IANALOG_AUDIO_INFO = "android.media.tv.extension.signal.IAnalogAudioInfo";
+ field public static final String IAUDIO_SIGNAL_INFO = "android.media.tv.extension.signal.IAudioSignalInfo";
+ field public static final String IAUDIO_SIGNAL_INFO_LISTENER = "android.media.tv.extension.signal.IAudioSignalInfoListener";
+ field public static final String IBROADCAST_TIME = "android.media.tv.extension.time.IBroadcastTime";
+ field public static final String ICAM_APP_INFO_LISTENER = "android.media.tv.extension.cam.ICamAppInfoListener";
field public static final String ICAM_APP_INFO_SERVICE = "android.media.tv.extension.cam.ICamAppInfoService";
+ field public static final String ICAM_DRM_INFO_LISTENER = "android.media.tv.extension.cam.ICamDrmInfoListener";
+ field public static final String ICAM_HOST_CONTROL_ASK_RELEASE_REPLY_CALLBACK = "android.media.tv.extension.cam.ICamHostControlAskReleaseReplyCallback";
+ field public static final String ICAM_HOST_CONTROL_INFO_LISTENER = "android.media.tv.extension.cam.ICamHostControlInfoListener";
+ field public static final String ICAM_HOST_CONTROL_SERVICE = "android.media.tv.extension.cam.ICamHostControlService";
+ field public static final String ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG = "android.media.tv.extension.cam.ICamHostControlTuneQuietlyFlag";
+ field public static final String ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG_LISTENER = "android.media.tv.extension.cam.ICamHostControlTuneQuietlyFlagListener";
+ field public static final String ICAM_INFO_LISTENER = "android.media.tv.extension.cam.ICamInfoListener";
+ field public static final String ICAM_MONITORING_SERVICE = "android.media.tv.extension.cam.ICamMonitoringService";
+ field public static final String ICAM_PIN_CAPABILITY_LISTENER = "android.media.tv.extension.cam.ICamPinCapabilityListener";
+ field public static final String ICAM_PIN_SERVICE = "android.media.tv.extension.cam.ICamPinService";
+ field public static final String ICAM_PIN_STATUS_LISTENER = "android.media.tv.extension.cam.ICamPinStatusListener";
+ field public static final String ICAM_PROFILE_INTERFACE = "android.media.tv.extension.cam.ICamProfileInterface";
+ field public static final String ICHANNEL_LIST_TRANSFER = "android.media.tv.extension.servicedb.IChannelListTransfer";
+ field public static final String ICHANNEL_TUNED_INTERFACE = "android.media.tv.extension.tune.IChannelTunedInterface";
+ field public static final String ICHANNEL_TUNED_LISTENER = "android.media.tv.extension.tune.IChannelTunedListener";
+ field public static final String ICI_OPERATOR_INTERFACE = "android.media.tv.extension.cam.ICiOperatorInterface";
+ field public static final String ICI_OPERATOR_LISTENER = "android.media.tv.extension.cam.ICiOperatorListener";
field public static final String ICLIENT_TOKEN = "android.media.tv.extension.clienttoken.IClientToken";
+ field public static final String ICONTENT_CONTROL_SERVICE = "android.media.tv.extension.cam.IContentControlService";
field public static final String IDATA_SERVICE_SIGNAL_INFO = "android.media.tv.extension.teletext.IDataServiceSignalInfo";
+ field public static final String IDATA_SERVICE_SIGNAL_INFO_LISTENER = "android.media.tv.extension.teletext.IDataServiceSignalInfoListener";
+ field public static final String IDELETE_RECORDED_CONTENTS_CALLBACK = "android.media.tv.extension.pvr.IDeleteRecordedContentsCallback";
+ field public static final String IDOWNLOADABLE_RATING_TABLE_MONITOR = "android.media.tv.extension.rating.IDownloadableRatingTableMonitor";
+ field public static final String IENTER_MENU_ERROR_CALLBACK = "android.media.tv.extension.cam.IEnterMenuErrorCallback";
+ field public static final String IEVENT_DOWNLOAD = "android.media.tv.extension.event.IEventDownload";
+ field public static final String IEVENT_DOWNLOAD_LISTENER = "android.media.tv.extension.event.IEventDownloadListener";
+ field public static final String IEVENT_DOWNLOAD_SESSION = "android.media.tv.extension.event.IEventDownloadSession";
field public static final String IEVENT_MONITOR = "android.media.tv.extension.event.IEventMonitor";
+ field public static final String IEVENT_MONITOR_LISTENER = "android.media.tv.extension.event.IEventMonitorListener";
+ field public static final String IFAVORITE_NETWORK = "android.media.tv.extension.scan.IFavoriteNetwork";
+ field public static final String IFAVORITE_NETWORK_LISTENER = "android.media.tv.extension.scan.IFavoriteNetworkListener";
+ field public static final String IGET_INFO_RECORDED_CONTENTS_CALLBACK = "android.media.tv.extension.pvr.IGetInfoRecordedContentsCallback";
+ field public static final String IHDMI_SIGNAL_INFO_LISTENER = "android.media.tv.extension.signal.IHdmiSignalInfoListener";
field public static final String IHDMI_SIGNAL_INTERFACE = "android.media.tv.extension.signal.IHdmiSignalInterface";
+ field public static final String IHDPLUS_INFO = "android.media.tv.extension.scan.IHDPlusInfo";
+ field public static final String ILCNV2_CHANNEL_LIST = "android.media.tv.extension.scan.ILcnV2ChannelList";
+ field public static final String ILCNV2_CHANNEL_LIST_LISTENER = "android.media.tv.extension.scan.ILcnV2ChannelListListener";
+ field public static final String ILCN_CONFLICT = "android.media.tv.extension.scan.ILcnConflict";
+ field public static final String ILCN_CONFLICT_LISTENER = "android.media.tv.extension.scan.ILcnConflictListener";
+ field public static final String IMMI_INTERFACE = "android.media.tv.extension.cam.IMmiInterface";
+ field public static final String IMMI_SESSION = "android.media.tv.extension.cam.IMmiSession";
+ field public static final String IMMI_STATUS_CALLBACK = "android.media.tv.extension.cam.IMmiStatusCallback";
+ field public static final String IMUX_TUNE = "android.media.tv.extension.tune.IMuxTune";
+ field public static final String IMUX_TUNE_SESSION = "android.media.tv.extension.tune.IMuxTuneSession";
field public static final String IOAD_UPDATE_INTERFACE = "android.media.tv.extension.oad.IOadUpdateInterface";
+ field public static final String IOPERATOR_DETECTION = "android.media.tv.extension.scan.IOperatorDetection";
+ field public static final String IOPERATOR_DETECTION_LISTENER = "android.media.tv.extension.scan.IOperatorDetectionListener";
+ field public static final String IPMT_RATING_INTERFACE = "android.media.tv.extension.rating.IPmtRatingInterface";
+ field public static final String IPMT_RATING_LISTENER = "android.media.tv.extension.rating.IPmtRatingListener";
+ field public static final String IPROGRAM_INFO = "android.media.tv.extension.rating.IProgramInfo";
+ field public static final String IPROGRAM_INFO_LISTENER = "android.media.tv.extension.rating.IProgramInfoListener";
field public static final String IRATING_INTERFACE = "android.media.tv.extension.rating.IRatingInterface";
field public static final String IRECORDED_CONTENTS = "android.media.tv.extension.pvr.IRecordedContents";
+ field public static final String IREGION_CHANNEL_LIST = "android.media.tv.extension.scan.IRegionChannelList";
+ field public static final String IREGION_CHANNEL_LIST_LISTENER = "android.media.tv.extension.scan.IRegionChannelListListener";
+ field public static final String ISCAN_BACKGROUND_SERVICE_UPDATE = "android.media.tv.extension.scanbsu.IScanBackgroundServiceUpdate";
+ field public static final String ISCAN_BACKGROUND_SERVICE_UPDATE_LISTENER = "android.media.tv.extension.scanbsu.IScanBackgroundServiceUpdateListener";
field public static final String ISCAN_INTERFACE = "android.media.tv.extension.scan.IScanInterface";
+ field public static final String ISCAN_LISTENER = "android.media.tv.extension.scan.IScanListener";
+ field public static final String ISCAN_SAT_SEARCH = "android.media.tv.extension.scan.IScanSatSearch";
+ field public static final String ISCAN_SESSION = "android.media.tv.extension.scan.IScanSession";
field public static final String ISCREEN_MODE_SETTINGS = "android.media.tv.extension.screenmode.IScreenModeSettings";
+ field public static final String ISERVICE_LIST = "android.media.tv.extension.servicedb.IServiceList";
+ field public static final String ISERVICE_LIST_EDIT = "android.media.tv.extension.servicedb.IServiceListEdit";
field public static final String ISERVICE_LIST_EDIT_LISTENER = "android.media.tv.extension.servicedb.IServiceListEditListener";
+ field public static final String ISERVICE_LIST_EXPORT_LISTENER = "android.media.tv.extension.servicedb.IServiceListExportListener";
+ field public static final String ISERVICE_LIST_EXPORT_SESSION = "android.media.tv.extension.servicedb.IServiceListExportSession";
+ field public static final String ISERVICE_LIST_IMPORT_LISTENER = "android.media.tv.extension.servicedb.IServiceListImportListener";
+ field public static final String ISERVICE_LIST_IMPORT_SESSION = "android.media.tv.extension.servicedb.IServiceListImportSession";
+ field public static final String ISERVICE_LIST_SET_CHANNEL_LIST_LISTENER = "android.media.tv.extension.servicedb.IServiceListSetChannelListListener";
+ field public static final String ISERVICE_LIST_SET_CHANNEL_LIST_SESSION = "android.media.tv.extension.servicedb.IServiceListSetChannelListSession";
+ field public static final String ISERVICE_LIST_TRANSFER_INTERFACE = "android.media.tv.extension.servicedb.IServiceListTransferInterface";
+ field public static final String ITARGET_REGION = "android.media.tv.extension.scan.ITargetRegion";
+ field public static final String ITARGET_REGION_LISTENER = "android.media.tv.extension.scan.ITargetRegionListener";
+ field public static final String ITELETEXT_PAGE_SUB_CODE = "android.media.tv.extension.teletext.ITeletextPageSubCode";
+ field public static final String ITKGS_INFO = "android.media.tv.extension.scan.ITkgsInfo";
+ field public static final String ITKGS_INFO_LISTENER = "android.media.tv.extension.scan.ITkgsInfoListener";
+ field public static final String ITUNER_FRONTEND_SIGNAL_INFO_INTERFACE = "android.media.tv.extension.signal.ITunerFrontendSignalInfoInterface";
+ field public static final String ITUNER_FRONTEND_SIGNAL_INFO_LISTENER = "android.media.tv.extension.signal.ITunerFrontendSignalInfoListener";
+ field public static final String IVBI_RATING_INTERFACE = "android.media.tv.extension.rating.IVbiRatingInterface";
+ field public static final String IVBI_RATING_LISTENER = "android.media.tv.extension.rating.IVbiRatingListener";
+ field public static final String IVIDEO_SIGNAL_INFO = "android.media.tv.extension.signal.IVideoSignalInfo";
+ field public static final String IVIDEO_SIGNAL_INFO_LISTENER = "android.media.tv.extension.signal.IVideoSignalInfoListener";
field public static final int REGISTER_FAIL_IMPLEMENTATION_NOT_STANDARDIZED = 2; // 0x2
field public static final int REGISTER_FAIL_NAME_NOT_STANDARDIZED = 1; // 0x1
field public static final int REGISTER_FAIL_REMOTE_EXCEPTION = 3; // 0x3
@@ -15120,6 +15280,32 @@ package android.telephony {
method @NonNull public android.telephony.CellIdentityWcdma sanitizeLocationInfo();
}
+ @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") public final class CellularIdentifierDisclosure implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getCellularIdentifier();
+ method public int getNasProtocolMessage();
+ method @NonNull public String getPlmn();
+ method public boolean isEmergency();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field public static final int CELLULAR_IDENTIFIER_IMEI = 2; // 0x2
+ field public static final int CELLULAR_IDENTIFIER_IMSI = 1; // 0x1
+ field public static final int CELLULAR_IDENTIFIER_SUCI = 3; // 0x3
+ field public static final int CELLULAR_IDENTIFIER_UNKNOWN = 0; // 0x0
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellularIdentifierDisclosure> CREATOR;
+ field public static final int NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST = 1; // 0x1
+ field public static final int NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE = 6; // 0x6
+ field public static final int NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST = 9; // 0x9
+ field public static final int NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST = 10; // 0xa
+ field public static final int NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST = 8; // 0x8
+ field public static final int NAS_PROTOCOL_MESSAGE_DETACH_REQUEST = 3; // 0x3
+ field public static final int NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE = 2; // 0x2
+ field public static final int NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION = 11; // 0xb
+ field public static final int NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST = 5; // 0x5
+ field public static final int NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST = 7; // 0x7
+ field public static final int NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST = 4; // 0x4
+ field public static final int NAS_PROTOCOL_MESSAGE_UNKNOWN = 0; // 0x0
+ }
+
public final class DataFailCause {
field @Deprecated public static final int VSNCP_APN_UNATHORIZED = 2238; // 0x8be
}
@@ -15571,6 +15757,75 @@ package android.telephony {
field public static final int USER_NOT_MEMBER_OF_CUG = 87; // 0x57
}
+ @FlaggedApi("com.android.internal.telephony.flags.security_algorithms_update_indications") public final class SecurityAlgorithmUpdate implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getConnectionEvent();
+ method public int getEncryption();
+ method public int getIntegrity();
+ method public boolean isUnprotectedEmergency();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field public static final int CONNECTION_EVENT_AS_SIGNALLING_5G = 11; // 0xb
+ field public static final int CONNECTION_EVENT_AS_SIGNALLING_LTE = 5; // 0x5
+ field public static final int CONNECTION_EVENT_CS_SIGNALLING_3G = 2; // 0x2
+ field public static final int CONNECTION_EVENT_CS_SIGNALLING_GSM = 0; // 0x0
+ field public static final int CONNECTION_EVENT_NAS_SIGNALLING_5G = 10; // 0xa
+ field public static final int CONNECTION_EVENT_NAS_SIGNALLING_LTE = 4; // 0x4
+ field public static final int CONNECTION_EVENT_PS_SIGNALLING_3G = 3; // 0x3
+ field public static final int CONNECTION_EVENT_PS_SIGNALLING_GPRS = 1; // 0x1
+ field public static final int CONNECTION_EVENT_VOLTE_RTP = 8; // 0x8
+ field public static final int CONNECTION_EVENT_VOLTE_RTP_SOS = 9; // 0x9
+ field public static final int CONNECTION_EVENT_VOLTE_SIP = 6; // 0x6
+ field public static final int CONNECTION_EVENT_VOLTE_SIP_SOS = 7; // 0x7
+ field public static final int CONNECTION_EVENT_VONR_RTP = 14; // 0xe
+ field public static final int CONNECTION_EVENT_VONR_RTP_SOS = 15; // 0xf
+ field public static final int CONNECTION_EVENT_VONR_SIP = 12; // 0xc
+ field public static final int CONNECTION_EVENT_VONR_SIP_SOS = 13; // 0xd
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SecurityAlgorithmUpdate> CREATOR;
+ field public static final int SECURITY_ALGORITHM_A50 = 0; // 0x0
+ field public static final int SECURITY_ALGORITHM_A51 = 1; // 0x1
+ field public static final int SECURITY_ALGORITHM_A52 = 2; // 0x2
+ field public static final int SECURITY_ALGORITHM_A53 = 3; // 0x3
+ field public static final int SECURITY_ALGORITHM_A54 = 4; // 0x4
+ field public static final int SECURITY_ALGORITHM_AES_CBC = 71; // 0x47
+ field public static final int SECURITY_ALGORITHM_AES_EDE3_CBC = 73; // 0x49
+ field public static final int SECURITY_ALGORITHM_AES_GCM = 69; // 0x45
+ field public static final int SECURITY_ALGORITHM_AES_GMAC = 70; // 0x46
+ field public static final int SECURITY_ALGORITHM_AUTH_HMAC_SHA2_256_128 = 101; // 0x65
+ field public static final int SECURITY_ALGORITHM_DES_EDE3_CBC = 72; // 0x48
+ field public static final int SECURITY_ALGORITHM_EEA0 = 41; // 0x29
+ field public static final int SECURITY_ALGORITHM_EEA1 = 42; // 0x2a
+ field public static final int SECURITY_ALGORITHM_EEA2 = 43; // 0x2b
+ field public static final int SECURITY_ALGORITHM_EEA3 = 44; // 0x2c
+ field public static final int SECURITY_ALGORITHM_ENCR_AES_CBC = 100; // 0x64
+ field public static final int SECURITY_ALGORITHM_ENCR_AES_GCM_16 = 99; // 0x63
+ field public static final int SECURITY_ALGORITHM_GEA0 = 14; // 0xe
+ field public static final int SECURITY_ALGORITHM_GEA1 = 15; // 0xf
+ field public static final int SECURITY_ALGORITHM_GEA2 = 16; // 0x10
+ field public static final int SECURITY_ALGORITHM_GEA3 = 17; // 0x11
+ field public static final int SECURITY_ALGORITHM_GEA4 = 18; // 0x12
+ field public static final int SECURITY_ALGORITHM_GEA5 = 19; // 0x13
+ field public static final int SECURITY_ALGORITHM_HMAC_MD5_96 = 75; // 0x4b
+ field public static final int SECURITY_ALGORITHM_HMAC_SHA1_96 = 74; // 0x4a
+ field public static final int SECURITY_ALGORITHM_IMS_NULL = 67; // 0x43
+ field public static final int SECURITY_ALGORITHM_NEA0 = 55; // 0x37
+ field public static final int SECURITY_ALGORITHM_NEA1 = 56; // 0x38
+ field public static final int SECURITY_ALGORITHM_NEA2 = 57; // 0x39
+ field public static final int SECURITY_ALGORITHM_NEA3 = 58; // 0x3a
+ field public static final int SECURITY_ALGORITHM_ORYX = 124; // 0x7c
+ field public static final int SECURITY_ALGORITHM_OTHER = 114; // 0x72
+ field public static final int SECURITY_ALGORITHM_RTP = 85; // 0x55
+ field public static final int SECURITY_ALGORITHM_SIP_NO_IPSEC_CONFIG = 66; // 0x42
+ field public static final int SECURITY_ALGORITHM_SIP_NULL = 68; // 0x44
+ field public static final int SECURITY_ALGORITHM_SRTP_AES_COUNTER = 87; // 0x57
+ field public static final int SECURITY_ALGORITHM_SRTP_AES_F8 = 88; // 0x58
+ field public static final int SECURITY_ALGORITHM_SRTP_HMAC_SHA1 = 89; // 0x59
+ field public static final int SECURITY_ALGORITHM_SRTP_NULL = 86; // 0x56
+ field public static final int SECURITY_ALGORITHM_UEA0 = 29; // 0x1d
+ field public static final int SECURITY_ALGORITHM_UEA1 = 30; // 0x1e
+ field public static final int SECURITY_ALGORITHM_UEA2 = 31; // 0x1f
+ field public static final int SECURITY_ALGORITHM_UNKNOWN = 113; // 0x71
+ }
+
public class ServiceState implements android.os.Parcelable {
method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int);
method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int);
@@ -15795,6 +16050,7 @@ package android.telephony {
field @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public static final int EVENT_CALL_FORWARDING_INDICATOR_CHANGED = 4; // 0x4
field public static final int EVENT_CALL_STATE_CHANGED = 6; // 0x6
field public static final int EVENT_CARRIER_NETWORK_CHANGED = 17; // 0x11
+ field @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED = 47; // 0x2f
field @RequiresPermission(allOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public static final int EVENT_CELL_INFO_CHANGED = 11; // 0xb
field @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public static final int EVENT_CELL_LOCATION_CHANGED = 5; // 0x5
field public static final int EVENT_DATA_ACTIVATION_STATE_CHANGED = 19; // 0x13
@@ -15819,6 +16075,7 @@ package android.telephony {
field @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public static final int EVENT_PRECISE_DATA_CONNECTION_STATE_CHANGED = 13; // 0xd
field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int EVENT_RADIO_POWER_STATE_CHANGED = 24; // 0x18
field @RequiresPermission(allOf={android.Manifest.permission.READ_PRECISE_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public static final int EVENT_REGISTRATION_FAILURE = 31; // 0x1f
+ field @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int EVENT_SECURITY_ALGORITHMS_CHANGED = 46; // 0x2e
field public static final int EVENT_SERVICE_STATE_CHANGED = 1; // 0x1
field public static final int EVENT_SIGNAL_STRENGTHS_CHANGED = 9; // 0x9
field public static final int EVENT_SIGNAL_STRENGTH_CHANGED = 2; // 0x2
@@ -15837,6 +16094,10 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public default void onCallStatesChanged(@NonNull java.util.List<android.telephony.CallState>);
}
+ @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") public static interface TelephonyCallback.CellularIdentifierDisclosedListener {
+ method public void onCellularIdentifierDisclosedChanged(@NonNull android.telephony.CellularIdentifierDisclosure);
+ }
+
public static interface TelephonyCallback.DataEnabledListener {
method @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public void onDataEnabledChanged(boolean, int);
}
@@ -15875,6 +16136,10 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void onRadioPowerStateChanged(int);
}
+ @FlaggedApi("com.android.internal.telephony.flags.security_algorithms_update_indications") public static interface TelephonyCallback.SecurityAlgorithmsListener {
+ method public void onSecurityAlgorithmsChanged(@NonNull android.telephony.SecurityAlgorithmUpdate);
+ }
+
@FlaggedApi("com.android.internal.telephony.flags.simultaneous_calling_indications") public static interface TelephonyCallback.SimultaneousCellularCallingSupportListener {
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void onSimultaneousCellularCallingSubscriptionsChanged(@NonNull java.util.Set<java.lang.Integer>);
}
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index 8fd2cd55b8a8..44bcc2a737b9 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -3398,6 +3398,10 @@ package android.telephony {
ctor public BarringInfo.BarringServiceInfo(int, boolean, int, int);
}
+ @FlaggedApi("com.android.internal.telephony.flags.cellular_identifier_disclosure_indications") public final class CellularIdentifierDisclosure implements android.os.Parcelable {
+ ctor public CellularIdentifierDisclosure(int, int, @NonNull String, boolean);
+ }
+
public class MbmsDownloadSession implements java.lang.AutoCloseable {
field public static final String MBMS_DOWNLOAD_SERVICE_OVERRIDE_METADATA = "mbms-download-service-override";
}
@@ -3425,6 +3429,10 @@ package android.telephony {
ctor @Deprecated public PreciseDataConnectionState(int, int, int, @NonNull String, @Nullable android.net.LinkProperties, int);
}
+ @FlaggedApi("com.android.internal.telephony.flags.security_algorithms_update_indications") public final class SecurityAlgorithmUpdate implements android.os.Parcelable {
+ ctor public SecurityAlgorithmUpdate(int, int, int, boolean);
+ }
+
public class ServiceState implements android.os.Parcelable {
method public void addNetworkRegistrationInfo(android.telephony.NetworkRegistrationInfo);
method public int getDataNetworkType();
diff --git a/core/java/android/adaptiveauth/OWNERS b/core/java/android/adaptiveauth/OWNERS
index bc8efa92c16f..4310d1a3a9db 100644
--- a/core/java/android/adaptiveauth/OWNERS
+++ b/core/java/android/adaptiveauth/OWNERS
@@ -1 +1 @@
-include /services/core/java/com/android/server/security/adaptiveauthentication/OWNERS \ No newline at end of file
+include /services/core/java/com/android/server/security/authenticationpolicy/OWNERS \ No newline at end of file
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index ce0ec602e612..34765781d105 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -8934,12 +8934,21 @@ public class AppOpsManager {
}
/**
- * Do a quick check for whether an application might be able to perform an operation.
- * This is <em>not</em> a security check; you must use {@link #noteOp(String, int, String,
- * String, String)} or {@link #startOp(String, int, String, String, String)} for your actual
- * security checks. This function can just be used for a quick check to see if an operation has
- * been disabled for the application, as an early reject of some work. This does not modify the
- * time stamp or other data about the operation.
+ * Check whether an application might be able to perform an operation.
+ * <p>
+ * For platform versions before {@link android.os.Build.VERSION_CODES#BAKLAVA}, this is
+ * <em>not</em> a security check; you must use {@link #noteOp(String, int, String, String,
+ * String)} or {@link #startOp(String, int, String, String, String)} for your actual security
+ * checks. This function can just be used for a quick check to see if an operation has been
+ * disabled for the application, as an early reject of some work.
+ * <p>
+ * For platform versions equal to or after {@link android.os.Build.VERSION_CODES#BAKLAVA}, this
+ * is no longer an unsafe check, and it does the same security check as {@link #noteOp(String,
+ * int, String, String, String)} and {@link #startOp(String, int, String, String, String)}.
+ * However, it's preferred to use {@link #checkOp(String, int, String)}, since the word "unsafe"
+ * in the name of this API is no longer accurate.
+ * <p>
+ * This API does not modify the time stamp or other data about the operation.
*
* @param op The operation to check. One of the OPSTR_* constants.
* @param uid The user id of the application attempting to perform the operation.
@@ -8948,31 +8957,108 @@ public class AppOpsManager {
* {@link #MODE_IGNORED} if it is not allowed and should be silently ignored (without
* causing the app to crash).
* @throws SecurityException If the app has been configured to crash on this op.
+ *
+ * @deprecated Use {@link #checkOp(String, int, String)}
*/
+ @Deprecated
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
public int unsafeCheckOp(@NonNull String op, int uid, @NonNull String packageName) {
return checkOp(strOpToOp(op), uid, packageName);
}
/**
- * @deprecated Renamed to {@link #unsafeCheckOp(String, int, String)}.
+ * Check whether an application can perform an operation.
+ * <p>
+ * For platform versions before {@link android.os.Build.VERSION_CODES#BAKLAVA}, this is
+ * <em>not</em> a security check; you must use {@link #noteOp(String, int, String, String,
+ * String)} or {@link #startOp(String, int, String, String, String)} for your actual security
+ * checks. This function can just be used for a quick check to see if an operation has been
+ * disabled for the application, as an early reject of some work.
+ * <p>
+ * For platform versions equal to or after {@link android.os.Build.VERSION_CODES#BAKLAVA}, it
+ * does the same security check as {@link #noteOp(String, int, String, String, String)} and
+ * {@link #startOp(String, int, String, String, String)}, and should be preferred to use.
+ * <p>
+ * This API does not modify the time stamp or other data about the operation.
+ *
+ * @param op The operation to check. One of the OPSTR_* constants.
+ * @param uid The uid of the application attempting to perform the operation.
+ * @param packageName The name of the application attempting to perform the operation.
+ * @return Returns {@link #MODE_ALLOWED} if the operation is allowed, or
+ * {@link #MODE_IGNORED} if it is not allowed and should be silently ignored (without
+ * causing the app to crash).
+ * @throws SecurityException If the app has been configured to crash on this op.
*/
- @Deprecated
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
public int checkOp(@NonNull String op, int uid, @NonNull String packageName) {
return checkOp(strOpToOp(op), uid, packageName);
}
/**
- * Like {@link #checkOp} but instead of throwing a {@link SecurityException} it
- * returns {@link #MODE_ERRORED}.
+ * Like {@link #unsafeCheckOp(String, int, String)} but instead of throwing a
+ * {@link SecurityException} it returns {@link #MODE_ERRORED}.
+ *
+ * @deprecated Use {@link #checkOpNoThrow(String, int, String)}
*/
+ @Deprecated
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
public int unsafeCheckOpNoThrow(@NonNull String op, int uid, @NonNull String packageName) {
return checkOpNoThrow(strOpToOp(op), uid, packageName);
}
/**
- * @deprecated Renamed to {@link #unsafeCheckOpNoThrow(String, int, String)}.
+ * Check whether an application can perform an operation. It does the same security check as
+ * {@link #noteOp(String, int, String, String, String)} and {@link #startOp(String, int, String,
+ * String, String)}, but does not modify the time stamp or other data about the operation.
+ *
+ * @param op The operation to check. One of the OPSTR_* constants.
+ * @param uid The uid of the application attempting to perform the operation.
+ * @param packageName The name of the application attempting to perform the operation.
+ * @param attributionTag The {@link Context#createAttributionContext attribution tag} of the
+ * calling context or {@code null} for default attribution
+ * @return Returns {@link #MODE_ALLOWED} if the operation is allowed, or {@link #MODE_IGNORED}
+ * if it is not allowed and should be silently ignored (without causing the app to crash).
+ * @throws SecurityException If the app has been configured to crash on this op.
*/
- @Deprecated
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
+ public int checkOp(@NonNull String op, int uid, @NonNull String packageName,
+ @Nullable String attributionTag) {
+ int mode = checkOpNoThrow(strOpToOp(op), uid, packageName, attributionTag,
+ Context.DEVICE_ID_DEFAULT);
+ if (mode == MODE_ERRORED) {
+ throw new SecurityException(buildSecurityExceptionMsg(strOpToOp(op), uid, packageName));
+ }
+ return mode;
+ }
+
+ /**
+ * Like {@link #checkOp(String, int, String, String)} but instead of throwing a
+ * {@link SecurityException} it returns {@link #MODE_ERRORED}.
+ */
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
+ public int checkOpNoThrow(@NonNull String op, int uid, @NonNull String packageName,
+ @Nullable String attributionTag) {
+ return checkOpNoThrow(strOpToOp(op), uid, packageName, attributionTag,
+ Context.DEVICE_ID_DEFAULT);
+ }
+
+ /**
+ * Like {@link #checkOp(String, int, String, String)} but returns the <em>raw</em> mode
+ * associated with the op. Does not throw a security exception, does not translate
+ * {@link #MODE_FOREGROUND}.
+ */
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
+ public int checkOpRawNoThrow(@NonNull String op, int uid, @NonNull String packageName,
+ @Nullable String attributionTag) {
+ return checkOpRawNoThrow(strOpToOp(op), uid, packageName, attributionTag,
+ Context.DEVICE_ID_DEFAULT);
+ }
+
+ /**
+ * Like {@link #checkOp(String, int, String)} but instead of throwing a
+ * {@link SecurityException} it returns {@link #MODE_ERRORED}.
+ */
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
public int checkOpNoThrow(@NonNull String op, int uid, @NonNull String packageName) {
return checkOpNoThrow(strOpToOp(op), uid, packageName);
}
@@ -8980,16 +9066,23 @@ public class AppOpsManager {
/**
* Like {@link #checkOp} but returns the <em>raw</em> mode associated with the op.
* Does not throw a security exception, does not translate {@link #MODE_FOREGROUND}.
+ *
+ * @deprecated Use {@link #checkOpRawNoThrow(String, int, String, String)} instead
*/
+ @Deprecated
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
public int unsafeCheckOpRaw(@NonNull String op, int uid, @NonNull String packageName) {
return unsafeCheckOpRawNoThrow(op, uid, packageName);
}
/**
- * Like {@link #unsafeCheckOpNoThrow(String, int, String)} but returns the <em>raw</em>
- * mode associated with the op. Does not throw a security exception, does not translate
- * {@link #MODE_FOREGROUND}.
+ * Like {@link #checkOp} but returns the <em>raw</em> mode associated with the op.
+ * Does not throw a security exception, does not translate {@link #MODE_FOREGROUND}.
+ *
+ * @deprecated Use {@link #checkOpRawNoThrow(String, int, String, String)} instead
*/
+ @Deprecated
+ @FlaggedApi(android.permission.flags.Flags.FLAG_CHECK_OP_OVERLOAD_API_ENABLED)
public int unsafeCheckOpRawNoThrow(@NonNull String op, int uid, @NonNull String packageName) {
return unsafeCheckOpRawNoThrow(strOpToOp(op), uid, packageName);
}
@@ -9000,8 +9093,9 @@ public class AppOpsManager {
* @hide
*/
public int unsafeCheckOpRawNoThrow(int op, @NonNull AttributionSource attributionSource) {
- return unsafeCheckOpRawNoThrow(op, attributionSource.getUid(),
- attributionSource.getPackageName(), attributionSource.getDeviceId());
+ return checkOpRawNoThrow(op, attributionSource.getUid(),
+ attributionSource.getPackageName(), attributionSource.getAttributionTag(),
+ attributionSource.getDeviceId());
}
/**
@@ -9022,20 +9116,20 @@ public class AppOpsManager {
* @hide
*/
public int unsafeCheckOpRawNoThrow(int op, int uid, @NonNull String packageName) {
- return unsafeCheckOpRawNoThrow(op, uid, packageName, Context.DEVICE_ID_DEFAULT);
+ return checkOpRawNoThrow(op, uid, packageName, null, Context.DEVICE_ID_DEFAULT);
}
- private int unsafeCheckOpRawNoThrow(int op, int uid, @NonNull String packageName,
- int virtualDeviceId) {
+ private int checkOpRawNoThrow(int op, int uid, @NonNull String packageName,
+ @Nullable String attributionTag, int virtualDeviceId) {
try {
int mode;
if (isAppOpModeCachingEnabled(op)) {
mode = sAppOpModeCache.query(
- new AppOpModeQuery(op, uid, packageName, virtualDeviceId, null,
+ new AppOpModeQuery(op, uid, packageName, virtualDeviceId, attributionTag,
"unsafeCheckOpRawNoThrow"));
} else {
mode = mService.checkOperationRawForDevice(
- op, uid, packageName, null, virtualDeviceId);
+ op, uid, packageName, attributionTag, virtualDeviceId);
}
return mode;
} catch (RemoteException e) {
@@ -9434,10 +9528,12 @@ public class AppOpsManager {
}
/**
- * Do a quick check for whether an application might be able to perform an operation.
- * This is <em>not</em> a security check; you must use {@link #noteOp(String, int, String,
- * String, String)} or {@link #startOp(int, int, String, boolean, String, String)} for your
- * actual security checks, which also ensure that the given uid and package name are consistent.
+ * Check whether an application can perform an operation.
+ * <p>
+ * For platform versions before {@link android.os.Build.VERSION_CODES#BAKLAVA}, this is
+ * <em>not</em> a security check; you must use {@link #noteOp(String, int, String, String,
+ * String)} or {@link #startOp(int, int, String, boolean, String, String)} for your actual
+ * security checks, which also ensure that the given uid and package name are consistent.
* This function can just be used for a quick check to see if an operation has been disabled for
* the application, as an early reject of some work. This does not modify the time stamp or
* other data about the operation.
@@ -9453,6 +9549,13 @@ public class AppOpsManager {
* as {@link #MODE_ALLOWED}.</li>
* </ul>
*
+ * <p>
+ * For platform versions equal to or after {@link android.os.Build.VERSION_CODES#BAKLAVA}, it
+ * does the same security check as {@link #noteOp(String, int, String, String, String)} and
+ * {@link #startOp(String, int, String, String, String)}.
+ * <p>
+ * This API does not modify the time stamp or other data about the operation.
+ *
* @param op The operation to check. One of the OP_* constants.
* @param uid The user id of the application attempting to perform the operation.
* @param packageName The name of the application attempting to perform the operation.
@@ -9464,29 +9567,11 @@ public class AppOpsManager {
*/
@UnsupportedAppUsage
public int checkOp(int op, int uid, String packageName) {
- try {
- int mode;
- if (isAppOpModeCachingEnabled(op)) {
- mode = sAppOpModeCache.query(
- new AppOpModeQuery(op, uid, packageName, Context.DEVICE_ID_DEFAULT, null,
- "checkOp"));
- if (mode == MODE_FOREGROUND) {
- // We only cache raw mode. If the mode is FOREGROUND, we need another binder
- // call to fetch translated value based on the process state.
- mode = mService.checkOperationForDevice(op, uid, packageName,
- Context.DEVICE_ID_DEFAULT);
- }
- } else {
- mode = mService.checkOperationForDevice(op, uid, packageName,
- Context.DEVICE_ID_DEFAULT);
- }
- if (mode == MODE_ERRORED) {
- throw new SecurityException(buildSecurityExceptionMsg(op, uid, packageName));
- }
- return mode;
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ int mode = checkOpNoThrow(op, uid, packageName, null, Context.DEVICE_ID_DEFAULT);
+ if (mode == MODE_ERRORED) {
+ throw new SecurityException(buildSecurityExceptionMsg(op, uid, packageName));
}
+ return mode;
}
/**
@@ -9499,7 +9584,7 @@ public class AppOpsManager {
*/
public int checkOpNoThrow(int op, AttributionSource attributionSource) {
return checkOpNoThrow(op, attributionSource.getUid(), attributionSource.getPackageName(),
- attributionSource.getDeviceId());
+ attributionSource.getAttributionTag(), attributionSource.getDeviceId());
}
/**
@@ -9512,23 +9597,26 @@ public class AppOpsManager {
*/
@UnsupportedAppUsage
public int checkOpNoThrow(int op, int uid, String packageName) {
- return checkOpNoThrow(op, uid, packageName, Context.DEVICE_ID_DEFAULT);
+ return checkOpNoThrow(op, uid, packageName, null, Context.DEVICE_ID_DEFAULT);
}
- private int checkOpNoThrow(int op, int uid, String packageName, int virtualDeviceId) {
+ private int checkOpNoThrow(int op, int uid, String packageName, @Nullable String attributionTag,
+ int virtualDeviceId) {
try {
int mode;
if (isAppOpModeCachingEnabled(op)) {
mode = sAppOpModeCache.query(
- new AppOpModeQuery(op, uid, packageName, virtualDeviceId, null,
+ new AppOpModeQuery(op, uid, packageName, virtualDeviceId, attributionTag,
"checkOpNoThrow"));
if (mode == MODE_FOREGROUND) {
// We only cache raw mode. If the mode is FOREGROUND, we need another binder
// call to fetch translated value based on the process state.
- mode = mService.checkOperationForDevice(op, uid, packageName, virtualDeviceId);
+ mode = mService.checkOperationForDevice(op, uid, packageName, attributionTag,
+ virtualDeviceId);
}
} else {
- mode = mService.checkOperationForDevice(op, uid, packageName, virtualDeviceId);
+ mode = mService.checkOperationForDevice(op, uid, packageName, attributionTag,
+ virtualDeviceId);
}
return mode;
} catch (RemoteException e) {
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index a8412fa66609..0668958b2d5c 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -864,7 +864,8 @@ interface IActivityManager {
/**
* Suppress or reenable the rate limit on foreground service notification deferral.
- * This is for use within CTS and is protected by android.permission.WRITE_DEVICE_CONFIG.
+ * This is for use within CTS and is protected by android.permission.WRITE_DEVICE_CONFIG
+ * and WRITE_ALLOWLISTED_DEVICE_CONFIG.
*
* @param enable false to suppress rate-limit policy; true to reenable it.
*/
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index 62820ad5a4d6..67f7bee4028e 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -18,6 +18,7 @@ package android.app;
import android.Manifest;
import android.annotation.CallbackExecutor;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -52,7 +53,9 @@ import android.view.IOnKeyguardExitResult;
import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.policy.IDeviceLockedStateListener;
import com.android.internal.policy.IKeyguardDismissCallback;
import com.android.internal.policy.IKeyguardLockedStateListener;
import com.android.internal.util.Preconditions;
@@ -253,6 +256,26 @@ public class KeyguardManager {
private final ArrayMap<KeyguardLockedStateListener, Executor>
mKeyguardLockedStateListeners = new ArrayMap<>();
+ private final IDeviceLockedStateListener mIDeviceLockedStateListener =
+ new IDeviceLockedStateListener.Stub() {
+ @Override
+ public void onDeviceLockedStateChanged(boolean isDeviceLocked) {
+ if (!Flags.deviceUnlockListener()) {
+ return;
+ }
+ synchronized (mDeviceLockedStateListeners) {
+ mDeviceLockedStateListeners.forEach((listener, executor) -> {
+ executor.execute(
+ () -> listener.onDeviceLockedStateChanged(isDeviceLocked));
+ });
+ }
+ }
+ };
+
+ @GuardedBy("mDeviceLockedStateListeners")
+ private final ArrayMap<DeviceLockedStateListener, Executor>
+ mDeviceLockedStateListeners = new ArrayMap<>();
+
/**
* Get an intent to prompt the user to confirm credentials (pin, pattern, password or biometrics
* if enrolled) for the current user of the device. The caller is expected to launch this
@@ -1370,4 +1393,77 @@ public class KeyguardManager {
}
}
}
+
+
+ /**
+ * Listener for device locked state changes.
+ */
+ @FunctionalInterface
+ @FlaggedApi(Flags.FLAG_DEVICE_UNLOCK_LISTENER)
+ public interface DeviceLockedStateListener {
+ /**
+ * Callback function that executes when the device locked state changes.
+ */
+ void onDeviceLockedStateChanged(boolean isDeviceLocked);
+ }
+
+
+ /**
+ * Registers a listener to execute when the device locked state changes.
+ *
+ * @param executor The {@link Executor} where the {@code listener} will be invoked
+ * @param listener The listener to add to receive device locked state changes.
+ *
+ * @see #isDeviceLocked()
+ * @see #removeDeviceLockedStateListener(DeviceLockedStateListener)
+ */
+ @RequiresPermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @FlaggedApi(Flags.FLAG_DEVICE_UNLOCK_LISTENER)
+ public void addDeviceLockedStateListener(@NonNull @CallbackExecutor Executor executor,
+ @NonNull DeviceLockedStateListener listener) {
+ if (!Flags.deviceUnlockListener()) {
+ return;
+ }
+
+ synchronized (mDeviceLockedStateListeners) {
+ mDeviceLockedStateListeners.put(listener, executor);
+ if (mDeviceLockedStateListeners.size() > 1) {
+ return;
+ }
+ try {
+ mTrustManager.registerDeviceLockedStateListener(mIDeviceLockedStateListener,
+ mContext.getDeviceId());
+ } catch (RemoteException re) {
+ Log.d(TAG, "TrustManager service died", re);
+ }
+ }
+ }
+
+ /**
+ * Unregisters a listener that executes when the device locked state changes.
+ *
+ * @param listener The listener to remove.
+ *
+ * @see #isDeviceLocked()
+ * @see #addDeviceLockedStateListener(Executor, DeviceLockedStateListener)
+ */
+ @RequiresPermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @FlaggedApi(Flags.FLAG_DEVICE_UNLOCK_LISTENER)
+ public void removeDeviceLockedStateListener(@NonNull DeviceLockedStateListener listener) {
+ if (!Flags.deviceUnlockListener()) {
+ return;
+ }
+
+ synchronized (mDeviceLockedStateListeners) {
+ mDeviceLockedStateListeners.remove(listener);
+ if (!mDeviceLockedStateListeners.isEmpty()) {
+ return;
+ }
+ try {
+ mTrustManager.unregisterDeviceLockedStateListener(mIDeviceLockedStateListener);
+ } catch (RemoteException re) {
+ Log.d(TAG, "TrustManager service died", re);
+ }
+ }
+ }
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 3d9c55c0f37a..eb161ea198e8 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -811,6 +811,27 @@ public class Notification implements Parcelable
}
private static boolean isStandardLayout(int layoutId) {
+ if (Flags.notificationsRedesignTemplates()) {
+ return switch (layoutId) {
+ case R.layout.notification_2025_template_collapsed_base,
+ R.layout.notification_2025_template_header,
+ R.layout.notification_template_material_heads_up_base,
+ R.layout.notification_template_material_big_base,
+ R.layout.notification_template_material_big_picture,
+ R.layout.notification_template_material_big_text,
+ R.layout.notification_template_material_inbox,
+ R.layout.notification_template_material_messaging,
+ R.layout.notification_template_material_big_messaging,
+ R.layout.notification_template_material_conversation,
+ R.layout.notification_template_material_media,
+ R.layout.notification_template_material_big_media,
+ R.layout.notification_template_material_call,
+ R.layout.notification_template_material_big_call,
+ R.layout.notification_template_header -> true;
+ case R.layout.notification_template_material_progress -> Flags.apiRichOngoing();
+ default -> false;
+ };
+ }
if (Flags.apiRichOngoing()) {
if (layoutId == R.layout.notification_template_material_progress) {
return true;
@@ -6718,7 +6739,7 @@ public class Notification implements Parcelable
// Headers on their own are never colorized
p.disallowColorization();
RemoteViews header = new BuilderRemoteViews(mContext.getApplicationInfo(),
- R.layout.notification_template_header);
+ getHeaderLayoutResource());
resetNotificationHeader(header);
bindNotificationHeader(header, p);
return header;
@@ -7478,9 +7499,21 @@ public class Notification implements Parcelable
return clone;
}
+ private int getHeaderLayoutResource() {
+ if (Flags.notificationsRedesignTemplates()) {
+ return R.layout.notification_2025_template_header;
+ } else {
+ return R.layout.notification_template_header;
+ }
+ }
+
@UnsupportedAppUsage
private int getBaseLayoutResource() {
- return R.layout.notification_template_material_base;
+ if (Flags.notificationsRedesignTemplates()) {
+ return R.layout.notification_2025_template_collapsed_base;
+ } else {
+ return R.layout.notification_template_material_base;
+ }
}
private int getHeadsUpBaseLayoutResource() {
@@ -9499,7 +9532,6 @@ public class Notification implements Parcelable
contentView.setViewVisibility(R.id.icon, View.GONE);
contentView.setViewVisibility(R.id.conversation_face_pile, View.GONE);
contentView.setViewVisibility(R.id.conversation_icon, View.VISIBLE);
- contentView.setBoolean(R.id.conversation_icon, "setApplyCircularCrop", true);
contentView.setImageViewIcon(R.id.conversation_icon, conversationIcon);
} else if (mIsGroupConversation) {
contentView.setViewVisibility(R.id.icon, View.GONE);
@@ -11527,11 +11559,9 @@ public class Notification implements Parcelable
contentView.setBundle(R.id.progress,
"setProgressModel", model.toBundle());
- if (mTrackerIcon != null) {
- contentView.setIcon(R.id.progress,
- "setProgressTrackerIcon",
- mTrackerIcon);
- }
+ contentView.setIcon(R.id.progress,
+ "setProgressTrackerIcon",
+ mTrackerIcon);
return contentView;
}
diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java
index c49b02210dd4..c310f95814dc 100644
--- a/core/java/android/app/NotificationManager.java
+++ b/core/java/android/app/NotificationManager.java
@@ -16,6 +16,8 @@
package android.app;
+import static android.Manifest.permission.POST_NOTIFICATIONS;
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.service.notification.Flags.notificationClassification;
import android.annotation.CallbackExecutor;
@@ -1597,11 +1599,15 @@ public class NotificationManager {
* Returns whether notifications from the calling package are enabled.
*/
public boolean areNotificationsEnabled() {
- INotificationManager service = getService();
- try {
- return service.areNotificationsEnabled(mContext.getPackageName());
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
+ if (Flags.nmBinderPerfPermissionCheck()) {
+ return mContext.checkSelfPermission(POST_NOTIFICATIONS) == PERMISSION_GRANTED;
+ } else {
+ INotificationManager service = getService();
+ try {
+ return service.areNotificationsEnabled(mContext.getPackageName());
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
}
}
diff --git a/core/java/android/app/PropertyInvalidatedCache.java b/core/java/android/app/PropertyInvalidatedCache.java
index 675152fbbbb6..e218418336c5 100644
--- a/core/java/android/app/PropertyInvalidatedCache.java
+++ b/core/java/android/app/PropertyInvalidatedCache.java
@@ -314,6 +314,14 @@ public class PropertyInvalidatedCache<Query, Result> {
@GuardedBy("mLock")
private long mMisses = 0;
+ // This counter tracks the number of times {@link #recompute} returned a null value. Null
+ // results are cached, or not, depending on instantiation arguments. Caching nulls when they
+ // should not be cached is a functional error. Failing to cache nulls that can be cached is a
+ // performance error. A non-zero value here means the cache should be examined to be sure
+ // that nulls are correctly cached, or not.
+ @GuardedBy("mLock")
+ private long mNulls = 0;
+
@GuardedBy("mLock")
private long[] mSkips = new long[MAX_RESERVED_NONCE + 1];
@@ -374,6 +382,11 @@ public class PropertyInvalidatedCache<Query, Result> {
private final String mCacheName;
/**
+ * True if nulls are valid returns from recompute().
+ */
+ private final boolean mCacheNullResults;
+
+ /**
* The function that computes a Result, given a Query. This function is called on a
* cache miss.
*/
@@ -509,6 +522,19 @@ public class PropertyInvalidatedCache<Query, Result> {
}
/**
+ * Return true if the entry is in the cache.
+ */
+ boolean containsKey(Query query) {
+ final int uid = callerUid();
+ var map = mCache.get(uid);
+ if (map != null) {
+ return map.containsKey(query);
+ } else {
+ return false;
+ }
+ }
+
+ /**
* Remove an entry from the cache.
*/
void remove(Query query) {
@@ -1101,7 +1127,7 @@ public class PropertyInvalidatedCache<Query, Result> {
* @hide
*/
public static record Args(@NonNull String mModule, @Nullable String mApi,
- int mMaxEntries, boolean mIsolateUids, boolean mTestMode) {
+ int mMaxEntries, boolean mIsolateUids, boolean mTestMode, boolean mCacheNulls) {
// Validation: the module must be one of the known module strings and the maxEntries must
// be positive.
@@ -1119,24 +1145,29 @@ public class PropertyInvalidatedCache<Query, Result> {
null, // api
32, // maxEntries
true, // isolateUids
- false // testMode
+ false, // testMode
+ true // allowNulls
);
}
public Args api(@NonNull String api) {
- return new Args(mModule, api, mMaxEntries, mIsolateUids, mTestMode);
+ return new Args(mModule, api, mMaxEntries, mIsolateUids, mTestMode, mCacheNulls);
}
public Args maxEntries(int val) {
- return new Args(mModule, mApi, val, mIsolateUids, mTestMode);
+ return new Args(mModule, mApi, val, mIsolateUids, mTestMode, mCacheNulls);
}
public Args isolateUids(boolean val) {
- return new Args(mModule, mApi, mMaxEntries, val, mTestMode);
+ return new Args(mModule, mApi, mMaxEntries, val, mTestMode, mCacheNulls);
}
public Args testMode(boolean val) {
- return new Args(mModule, mApi, mMaxEntries, mIsolateUids, val);
+ return new Args(mModule, mApi, mMaxEntries, mIsolateUids, val, mCacheNulls);
+ }
+
+ public Args cacheNulls(boolean val) {
+ return new Args(mModule, mApi, mMaxEntries, mIsolateUids, mTestMode, val);
}
}
@@ -1153,6 +1184,7 @@ public class PropertyInvalidatedCache<Query, Result> {
@Nullable QueryHandler<Query, Result> computer) {
mPropertyName = createPropertyName(args.mModule, args.mApi);
mCacheName = cacheName;
+ mCacheNullResults = args.mCacheNulls && Flags.picCacheNulls();
mNonce = getNonceHandler(mPropertyName);
mMaxEntries = args.mMaxEntries;
mCache = new CacheMap<>(args.mIsolateUids, args.mTestMode);
@@ -1491,12 +1523,24 @@ public class PropertyInvalidatedCache<Query, Result> {
}
return recompute(query);
}
+
+ final boolean cacheHit;
final Result cachedResult;
synchronized (mLock) {
if (currentNonce == mLastSeenNonce) {
cachedResult = mCache.get(query);
-
- if (cachedResult != null) mHits++;
+ if (cachedResult == null) {
+ if (mCacheNullResults) {
+ cacheHit = mCache.containsKey(query);
+ } else {
+ cacheHit = false;
+ }
+ } else {
+ cacheHit = true;
+ }
+ if (cacheHit) {
+ mHits++;
+ }
} else {
if (DEBUG) {
Log.d(TAG, formatSimple(
@@ -1506,16 +1550,18 @@ public class PropertyInvalidatedCache<Query, Result> {
}
clear();
mLastSeenNonce = currentNonce;
+ cacheHit = false;
cachedResult = null;
}
}
+
// Cache hit --- but we're not quite done yet. A value in the cache might need to
// be augmented in a "refresh" operation. The refresh operation can combine the
// old and the new nonce values. In order to make sure the new parts of the value
// are consistent with the old, possibly-reused parts, we check the property value
// again after the refresh and do the whole fetch again if the property invalidated
// us while we were refreshing.
- if (cachedResult != null) {
+ if (cacheHit) {
final Result refreshedResult = refresh(cachedResult, query);
if (refreshedResult != cachedResult) {
if (DEBUG) {
@@ -1550,6 +1596,7 @@ public class PropertyInvalidatedCache<Query, Result> {
}
return maybeCheckConsistency(query, cachedResult);
}
+
// Cache miss: make the value from scratch.
if (DEBUG) {
Log.d(TAG, "cache miss for " + cacheName() + " " + queryToString(query));
@@ -1558,8 +1605,13 @@ public class PropertyInvalidatedCache<Query, Result> {
synchronized (mLock) {
// If someone else invalidated the cache while we did the recomputation, don't
// update the cache with a potentially stale result.
- if (mLastSeenNonce == currentNonce && result != null) {
- mCache.put(query, result);
+ if (mLastSeenNonce == currentNonce) {
+ if (result != null || mCacheNullResults) {
+ mCache.put(query, result);
+ }
+ if (result == null) {
+ mNulls++;
+ }
}
mMisses++;
}
@@ -1977,8 +2029,8 @@ public class PropertyInvalidatedCache<Query, Result> {
pw.println(formatSimple(" Cache Name: %s", cacheName()));
pw.println(formatSimple(" Property: %s", mPropertyName));
pw.println(formatSimple(
- " Hits: %d, Misses: %d, Skips: %d, Clears: %d",
- mHits, mMisses, getSkipsLocked(), mClears));
+ " Hits: %d, Misses: %d, Skips: %d, Clears: %d, Nulls: %d",
+ mHits, mMisses, getSkipsLocked(), mClears, mNulls));
// Print all the skip reasons.
pw.format(" Skip-%s: %d", sNonceName[0], mSkips[0]);
diff --git a/core/java/android/app/keyguard.aconfig b/core/java/android/app/keyguard.aconfig
new file mode 100644
index 000000000000..9cd1c1579416
--- /dev/null
+++ b/core/java/android/app/keyguard.aconfig
@@ -0,0 +1,10 @@
+package: "android.app"
+container: "system"
+
+flag {
+ namespace: "wallet_integration"
+ name: "device_unlock_listener"
+ is_exported: true
+ description: "Enable listener API for device unlock."
+ bug: "296195355"
+} \ No newline at end of file
diff --git a/core/java/android/app/notification.aconfig b/core/java/android/app/notification.aconfig
index a487da297739..8b6840c1b552 100644
--- a/core/java/android/app/notification.aconfig
+++ b/core/java/android/app/notification.aconfig
@@ -13,6 +13,13 @@ flag {
}
flag {
+ name: "notifications_redesign_templates"
+ namespace: "systemui"
+ description: "Notifications Redesign: Update notification templates"
+ bug: "378660052"
+}
+
+flag {
name: "modes_api"
is_exported: true
namespace: "systemui"
@@ -270,6 +277,13 @@ flag {
}
flag {
+ name: "nm_binder_perf_permission_check"
+ namespace: "systemui"
+ description: "Use PermissionManager for areNotificationsEnabled() instead of NMS"
+ bug: "362981561"
+}
+
+flag {
name: "no_sbnholder"
namespace: "systemui"
description: "removes sbnholder from NLS"
diff --git a/core/java/android/app/performance.aconfig b/core/java/android/app/performance.aconfig
index 61b53f97fea1..359c84eeb559 100644
--- a/core/java/android/app/performance.aconfig
+++ b/core/java/android/app/performance.aconfig
@@ -35,3 +35,10 @@ flag {
bug: "373752556"
}
+flag {
+ namespace: "system_performance"
+ name: "pic_cache_nulls"
+ is_fixed_read_only: true
+ description: "Cache null returns from binder calls"
+ bug: "372923336"
+}
diff --git a/core/java/android/app/trust/ITrustManager.aidl b/core/java/android/app/trust/ITrustManager.aidl
index 730bb73da3bb..ffa54881cb9d 100644
--- a/core/java/android/app/trust/ITrustManager.aidl
+++ b/core/java/android/app/trust/ITrustManager.aidl
@@ -18,6 +18,7 @@ package android.app.trust;
import android.app.trust.ITrustListener;
import android.hardware.biometrics.BiometricSourceType;
+import com.android.internal.policy.IDeviceLockedStateListener;
/**
* System private API to comunicate with trust service.
@@ -43,4 +44,8 @@ interface ITrustManager {
boolean isActiveUnlockRunning(int userId);
@EnforcePermission("ACCESS_FINE_LOCATION")
boolean isInSignificantPlace();
+ @EnforcePermission("SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE")
+ void registerDeviceLockedStateListener(in IDeviceLockedStateListener listener, int deviceId);
+ @EnforcePermission("SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE")
+ void unregisterDeviceLockedStateListener(in IDeviceLockedStateListener listener);
}
diff --git a/core/java/android/app/trust/TrustManager.java b/core/java/android/app/trust/TrustManager.java
index 1ef83cdf3f85..8c8970ea5834 100644
--- a/core/java/android/app/trust/TrustManager.java
+++ b/core/java/android/app/trust/TrustManager.java
@@ -31,6 +31,8 @@ import android.os.Message;
import android.os.RemoteException;
import android.util.ArrayMap;
+import com.android.internal.policy.IDeviceLockedStateListener;
+
import java.util.ArrayList;
import java.util.List;
@@ -259,6 +261,35 @@ public class TrustManager {
}
/**
+ * Registers a listener for device lock state events.
+ *
+ * Requires the {@link android.Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE}
+ * permission.
+ */
+ public void registerDeviceLockedStateListener(final IDeviceLockedStateListener listener,
+ int deviceId) {
+ try {
+ mService.registerDeviceLockedStateListener(listener, deviceId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Unregisters a listener for device lock state events.
+ *
+ * Requires the {@link android.Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE}
+ * permission.
+ */
+ public void unregisterDeviceLockedStateListener(final IDeviceLockedStateListener listener) {
+ try {
+ mService.unregisterDeviceLockedStateListener(listener);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* @return whether {@param userId} has enabled and configured trust agents. Ignores short-term
* unavailability of trust due to {@link LockPatternUtils.StrongAuthTracker}.
*/
diff --git a/core/java/android/appwidget/flags.aconfig b/core/java/android/appwidget/flags.aconfig
index ce515761551c..fb33348d9c26 100644
--- a/core/java/android/appwidget/flags.aconfig
+++ b/core/java/android/appwidget/flags.aconfig
@@ -92,3 +92,13 @@ flag {
is_exported: true
is_fixed_read_only: true
}
+
+flag {
+ name: "check_remote_views_uri_permission"
+ namespace: "app_widgets"
+ description: "Check that the widget provider has permissions to access any URIs within its RemoteViews"
+ bug: "369137473"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 37295ac94823..5b305b466dd6 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -3200,6 +3200,16 @@ public abstract class PackageManager {
/**
* Feature for {@link #getSystemAvailableFeatures} and
+ * {@link #hasSystemFeature}: The device is capable of ranging with
+ * other devices using channel sounding via Bluetooth Low Energy radio.
+ */
+ @FlaggedApi(com.android.ranging.flags.Flags.FLAG_RANGING_CS_ENABLED)
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_BLUETOOTH_LE_CHANNEL_SOUNDING =
+ "android.hardware.bluetooth_le.channel_sounding";
+
+ /**
+ * Feature for {@link #getSystemAvailableFeatures} and
* {@link #hasSystemFeature}: The device has a camera facing away
* from the screen.
*/
diff --git a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java
index e9e8578af787..05c8f31df5d6 100644
--- a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java
+++ b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java
@@ -537,6 +537,9 @@ public class ApkLiteParseUtils {
hasBindDeviceAdminPermission);
break;
case TAG_USES_SDK_LIBRARY:
+ if (!android.content.pm.Flags.sdkDependencyInstaller()) {
+ break;
+ }
String usesSdkLibName = parser.getAttributeValue(
ANDROID_RES_NAMESPACE, "name");
long usesSdkLibVersionMajor = parser.getAttributeIntValue(
diff --git a/core/java/android/hardware/contexthub/HubDiscoveryInfo.java b/core/java/android/hardware/contexthub/HubDiscoveryInfo.java
index 875c4b4182be..581040dbfa56 100644
--- a/core/java/android/hardware/contexthub/HubDiscoveryInfo.java
+++ b/core/java/android/hardware/contexthub/HubDiscoveryInfo.java
@@ -18,6 +18,7 @@ package android.hardware.contexthub;
import android.annotation.FlaggedApi;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.chre.flags.Flags;
import android.hardware.location.ContextHubManager;
@@ -26,31 +27,47 @@ import android.hardware.location.ContextHubManager;
* Class that represents the result of from an hub endpoint discovery.
*
* <p>The type is returned from an endpoint discovery query via {@link
- * ContextHubManager#findEndpoints}. Application may use the values {@link #getHubEndpointInfo} to
- * retrieve the {@link HubEndpointInfo} that describes the endpoint that matches the query. The
- * class provides flexibility in returning more information (e.g. service provided by the endpoint)
- * in addition to the information about the endpoint.
+ * ContextHubManager#findEndpoints}.
+ *
+ * <p>Application may use the values {@link #getHubEndpointInfo} to retrieve the {@link
+ * HubEndpointInfo} that describes the endpoint that matches the query.
+ *
+ * <p>Application may use the values {@link #getHubServiceInfo()} to retrieve the {@link
+ * HubServiceInfo} that describes the service that matches the query.
*
* @hide
*/
@SystemApi
@FlaggedApi(Flags.FLAG_OFFLOAD_API)
public class HubDiscoveryInfo {
- // TODO(b/375487784): Add ServiceInfo to the result.
- android.hardware.contexthub.HubEndpointInfo mEndpointInfo;
+ @NonNull private final HubEndpointInfo mEndpointInfo;
+ @Nullable private final HubServiceInfo mServiceInfo;
- /**
- * Constructor for internal use.
- *
- * @hide
- */
- public HubDiscoveryInfo(android.hardware.contexthub.HubEndpointInfo endpointInfo) {
+ /** @hide */
+ public HubDiscoveryInfo(@NonNull HubEndpointInfo endpointInfo) {
mEndpointInfo = endpointInfo;
+ mServiceInfo = null;
}
- /** Get the {@link android.hardware.contexthub.HubEndpointInfo} for the endpoint found. */
+ /** @hide */
+ public HubDiscoveryInfo(
+ @NonNull HubEndpointInfo endpointInfo, @NonNull HubServiceInfo serviceInfo) {
+ mEndpointInfo = endpointInfo;
+ mServiceInfo = serviceInfo;
+ }
+
+ /** Get the {@link HubEndpointInfo} for the endpoint found. */
@NonNull
public HubEndpointInfo getHubEndpointInfo() {
return mEndpointInfo;
}
+
+ /**
+ * Get the {@link HubServiceInfo} for the endpoint found. The value will be null if there is no
+ * service info specified in the query.
+ */
+ @Nullable
+ public HubServiceInfo getHubServiceInfo() {
+ return mServiceInfo;
+ }
}
diff --git a/core/java/android/hardware/contexthub/HubEndpoint.java b/core/java/android/hardware/contexthub/HubEndpoint.java
index 99b05da08b0b..078b4d4629e0 100644
--- a/core/java/android/hardware/contexthub/HubEndpoint.java
+++ b/core/java/android/hardware/contexthub/HubEndpoint.java
@@ -24,12 +24,17 @@ import android.annotation.SystemApi;
import android.chre.flags.Flags;
import android.content.Context;
import android.hardware.location.IContextHubService;
+import android.hardware.location.IContextHubTransactionCallback;
import android.os.RemoteException;
import android.util.Log;
import android.util.SparseArray;
import androidx.annotation.GuardedBy;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
import java.util.concurrent.Executor;
/**
@@ -46,7 +51,9 @@ public class HubEndpoint {
private final Object mLock = new Object();
private final HubEndpointInfo mPendingHubEndpointInfo;
@Nullable private final IHubEndpointLifecycleCallback mLifecycleCallback;
+ @Nullable private final IHubEndpointMessageCallback mMessageCallback;
@NonNull private final Executor mLifecycleCallbackExecutor;
+ @NonNull private final Executor mMessageCallbackExecutor;
@GuardedBy("mLock")
private final SparseArray<HubEndpointSession> mActiveSessions = new SparseArray<>();
@@ -54,7 +61,10 @@ public class HubEndpoint {
private final IContextHubEndpointCallback mServiceCallback =
new IContextHubEndpointCallback.Stub() {
@Override
- public void onSessionOpenRequest(int sessionId, HubEndpointInfo initiator)
+ public void onSessionOpenRequest(
+ int sessionId,
+ HubEndpointInfo initiator,
+ @Nullable HubServiceInfo serviceInfo)
throws RemoteException {
HubEndpointSession activeSession;
synchronized (mLock) {
@@ -75,20 +85,24 @@ public class HubEndpoint {
processSessionOpenRequestResult(
sessionId,
initiator,
+ serviceInfo,
mLifecycleCallback.onSessionOpenRequest(
- initiator)));
+ initiator, serviceInfo)));
}
}
private void processSessionOpenRequestResult(
- int sessionId, HubEndpointInfo initiator, HubEndpointSessionResult result) {
+ int sessionId,
+ HubEndpointInfo initiator,
+ @Nullable HubServiceInfo serviceInfo,
+ HubEndpointSessionResult result) {
if (result == null) {
throw new IllegalArgumentException(
"HubEndpointSessionResult shouldn't be null.");
}
if (result.isAccepted()) {
- acceptSession(sessionId, initiator);
+ acceptSession(sessionId, initiator, serviceInfo);
} else {
Log.i(
TAG,
@@ -102,7 +116,10 @@ public class HubEndpoint {
}
}
- private void acceptSession(int sessionId, HubEndpointInfo initiator) {
+ private void acceptSession(
+ int sessionId,
+ HubEndpointInfo initiator,
+ @Nullable HubServiceInfo serviceInfo) {
if (mServiceToken == null || mAssignedHubEndpointInfo == null) {
// No longer registered?
return;
@@ -126,7 +143,8 @@ public class HubEndpoint {
sessionId,
HubEndpoint.this,
mAssignedHubEndpointInfo,
- initiator);
+ initiator,
+ serviceInfo);
try {
// oneway call to notify system service that the request is completed
mServiceToken.openSessionRequestComplete(sessionId);
@@ -216,6 +234,50 @@ public class HubEndpoint {
});
}
}
+
+ @Override
+ public void onMessageReceived(int sessionId, HubMessage message)
+ throws RemoteException {
+ final HubEndpointSession activeSession;
+
+ // Retrieve the active session
+ synchronized (mLock) {
+ activeSession = mActiveSessions.get(sessionId);
+ }
+ if (activeSession == null) {
+ Log.i(TAG, "onMessageReceived: session not active, id=" + sessionId);
+ }
+
+ if (activeSession == null || mMessageCallback == null) {
+ if (message.getDeliveryParams().isResponseRequired()) {
+ try {
+ mServiceToken.sendMessageDeliveryStatus(
+ sessionId,
+ message.getMessageSequenceNumber(),
+ ErrorCode.DESTINATION_NOT_FOUND);
+ } catch (RemoteException e) {
+ e.rethrowFromSystemServer();
+ }
+ }
+ return;
+ }
+
+ // Execute the callback
+ mMessageCallbackExecutor.execute(
+ () -> {
+ mMessageCallback.onMessageReceived(activeSession, message);
+ if (message.getDeliveryParams().isResponseRequired()) {
+ try {
+ mServiceToken.sendMessageDeliveryStatus(
+ sessionId,
+ message.getMessageSequenceNumber(),
+ ErrorCode.OK);
+ } catch (RemoteException e) {
+ e.rethrowFromSystemServer();
+ }
+ }
+ });
+ }
};
/** Binder returned from system service, non-null while registered. */
@@ -227,10 +289,15 @@ public class HubEndpoint {
private HubEndpoint(
@NonNull HubEndpointInfo pendingEndpointInfo,
@Nullable IHubEndpointLifecycleCallback endpointLifecycleCallback,
- @NonNull Executor lifecycleCallbackExecutor) {
+ @NonNull Executor lifecycleCallbackExecutor,
+ @Nullable IHubEndpointMessageCallback endpointMessageCallback,
+ @NonNull Executor messageCallbackExecutor) {
mPendingHubEndpointInfo = pendingEndpointInfo;
+
mLifecycleCallback = endpointLifecycleCallback;
mLifecycleCallbackExecutor = lifecycleCallbackExecutor;
+ mMessageCallback = endpointMessageCallback;
+ mMessageCallbackExecutor = messageCallbackExecutor;
}
/** @hide */
@@ -279,7 +346,7 @@ public class HubEndpoint {
}
/** @hide */
- public void openSession(HubEndpointInfo destinationInfo) {
+ public void openSession(HubEndpointInfo destinationInfo, @Nullable HubServiceInfo serviceInfo) {
// TODO(b/378974199): Consider refactor these assertions
if (mServiceToken == null || mAssignedHubEndpointInfo == null) {
// No longer registered?
@@ -289,7 +356,7 @@ public class HubEndpoint {
HubEndpointSession newSession;
try {
// Request system service to assign session id.
- int sessionId = mServiceToken.openSession(destinationInfo);
+ int sessionId = mServiceToken.openSession(destinationInfo, serviceInfo);
// Save the newly created session
synchronized (mLock) {
@@ -298,7 +365,8 @@ public class HubEndpoint {
sessionId,
HubEndpoint.this,
destinationInfo,
- mAssignedHubEndpointInfo);
+ mAssignedHubEndpointInfo,
+ serviceInfo);
mActiveSessions.put(sessionId, newSession);
}
} catch (RemoteException e) {
@@ -337,16 +405,48 @@ public class HubEndpoint {
}
}
+ void sendMessage(
+ HubEndpointSession session,
+ HubMessage message,
+ @Nullable IContextHubTransactionCallback transactionCallback) {
+ IContextHubEndpoint serviceToken = mServiceToken;
+ if (serviceToken == null) {
+ // Not registered
+ return;
+ }
+
+ try {
+ serviceToken.sendMessage(session.getId(), message, transactionCallback);
+ } catch (RemoteException e) {
+ Log.e(TAG, "sendMessage: failed to send message session=" + session, e);
+ e.rethrowFromSystemServer();
+ }
+ }
+
+ public int getVersion() {
+ return mPendingHubEndpointInfo.getVersion();
+ }
+
@Nullable
public String getTag() {
return mPendingHubEndpointInfo.getTag();
}
+ @NonNull
+ public Collection<HubServiceInfo> getServiceInfoCollection() {
+ return mPendingHubEndpointInfo.getServiceInfoCollection();
+ }
+
@Nullable
public IHubEndpointLifecycleCallback getLifecycleCallback() {
return mLifecycleCallback;
}
+ @Nullable
+ public IHubEndpointMessageCallback getMessageCallback() {
+ return mMessageCallback;
+ }
+
/** Builder for a {@link HubEndpoint} object. */
public static final class Builder {
private final String mPackageName;
@@ -355,12 +455,31 @@ public class HubEndpoint {
@NonNull private Executor mLifecycleCallbackExecutor;
+ @Nullable private IHubEndpointMessageCallback mMessageCallback;
+ @NonNull private Executor mMessageCallbackExecutor;
+
+ private int mVersion;
@Nullable private String mTag;
+ private List<HubServiceInfo> mServiceInfos = Collections.emptyList();
+
/** Create a builder for {@link HubEndpoint} */
public Builder(@NonNull Context context) {
mPackageName = context.getPackageName();
+ mVersion = (int) context.getApplicationInfo().longVersionCode;
mLifecycleCallbackExecutor = context.getMainExecutor();
+ mMessageCallbackExecutor = context.getMainExecutor();
+ }
+
+ /**
+ * Set the version for the endpoint. Default is 0.
+ *
+ * @hide
+ */
+ @NonNull
+ public Builder setVersion(int version) {
+ mVersion = version;
+ return this;
}
/**
@@ -394,13 +513,47 @@ public class HubEndpoint {
return this;
}
+ /** Attach a callback interface for message events for this Endpoint */
+ @NonNull
+ public Builder setMessageCallback(@NonNull IHubEndpointMessageCallback messageCallback) {
+ mMessageCallback = messageCallback;
+ return this;
+ }
+
+ /**
+ * Attach a callback interface for message events for this Endpoint with a specified
+ * executor
+ */
+ @NonNull
+ public Builder setMessageCallback(
+ @NonNull @CallbackExecutor Executor executor,
+ @NonNull IHubEndpointMessageCallback messageCallback) {
+ mMessageCallbackExecutor = executor;
+ mMessageCallback = messageCallback;
+ return this;
+ }
+
+ /**
+ * Add a service to the available services from this endpoint. The {@link HubServiceInfo}
+ * object can be built with {@link HubServiceInfo.Builder}.
+ */
+ @NonNull
+ public Builder setServiceInfoCollection(
+ @NonNull Collection<HubServiceInfo> hubServiceInfos) {
+ // Make a copy first
+ mServiceInfos = new ArrayList<>(hubServiceInfos);
+ return this;
+ }
+
/** Build the {@link HubEndpoint} object. */
@NonNull
public HubEndpoint build() {
return new HubEndpoint(
- new HubEndpointInfo(mPackageName, mTag),
+ new HubEndpointInfo(mPackageName, mVersion, mTag, mServiceInfos),
mLifecycleCallback,
- mLifecycleCallbackExecutor);
+ mLifecycleCallbackExecutor,
+ mMessageCallback,
+ mMessageCallbackExecutor);
}
}
}
diff --git a/core/java/android/hardware/contexthub/HubEndpointInfo.java b/core/java/android/hardware/contexthub/HubEndpointInfo.java
index ed8ff2929aff..b1d55239ac43 100644
--- a/core/java/android/hardware/contexthub/HubEndpointInfo.java
+++ b/core/java/android/hardware/contexthub/HubEndpointInfo.java
@@ -17,13 +17,22 @@
package android.hardware.contexthub;
import android.annotation.FlaggedApi;
+import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.chre.flags.Flags;
import android.os.Parcel;
import android.os.Parcelable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
import java.util.Objects;
/**
@@ -102,39 +111,92 @@ public final class HubEndpointInfo implements Parcelable {
}
}
+ /** This endpoint is from the Android framework */
+ public static final int TYPE_FRAMEWORK = 1;
+
+ /** This endpoint is from an Android app */
+ public static final int TYPE_APP = 2;
+
+ /** This endpoint is from an Android native program. */
+ public static final int TYPE_NATIVE = 3;
+
+ /** This endpoint is from a nanoapp. */
+ public static final int TYPE_NANOAPP = 4;
+
+ /** This endpoint is a generic endpoint served by a hub (not from a nanoapp). */
+ public static final int TYPE_HUB_ENDPOINT = 5;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({
+ TYPE_FRAMEWORK,
+ TYPE_APP,
+ TYPE_NATIVE,
+ TYPE_NANOAPP,
+ TYPE_HUB_ENDPOINT,
+ })
+ public @interface EndpointType {}
+
private final HubEndpointIdentifier mId;
+ @EndpointType private final int mType;
private final String mName;
+ private final int mVersion;
@Nullable private final String mTag;
- // TODO(b/375487784): Add Service/version and other information to this object
+ @NonNull private final List<String> mRequiredPermissions;
+ @NonNull private final List<HubServiceInfo> mHubServiceInfos;
/** @hide */
public HubEndpointInfo(android.hardware.contexthub.EndpointInfo endpointInfo) {
mId = new HubEndpointIdentifier(endpointInfo.id.hubId, endpointInfo.id.id);
+ mType = endpointInfo.type;
mName = endpointInfo.name;
+ mVersion = endpointInfo.version;
mTag = endpointInfo.tag;
+ mRequiredPermissions = Arrays.asList(endpointInfo.requiredPermissions);
+ mHubServiceInfos = new ArrayList<>(endpointInfo.services.length);
+ for (int i = 0; i < endpointInfo.services.length; i++) {
+ mHubServiceInfos.set(i, new HubServiceInfo(endpointInfo.services[i]));
+ }
}
/** @hide */
- public HubEndpointInfo(String name, @Nullable String tag) {
+ public HubEndpointInfo(
+ String name,
+ int version,
+ @Nullable String tag,
+ @NonNull List<HubServiceInfo> hubServiceInfos) {
mId = HubEndpointIdentifier.invalid();
+ mType = TYPE_APP;
mName = name;
+ mVersion = version;
mTag = tag;
+ mRequiredPermissions = Collections.emptyList();
+ mHubServiceInfos = hubServiceInfos;
}
private HubEndpointInfo(Parcel in) {
long hubId = in.readLong();
long endpointId = in.readLong();
+ mId = new HubEndpointIdentifier(hubId, endpointId);
+ mType = in.readInt();
mName = in.readString();
+ mVersion = in.readInt();
mTag = in.readString();
-
- mId = new HubEndpointIdentifier(hubId, endpointId);
+ mRequiredPermissions = new ArrayList<>();
+ in.readStringList(mRequiredPermissions);
+ mHubServiceInfos = new ArrayList<>();
+ in.readTypedList(mHubServiceInfos, HubServiceInfo.CREATOR);
}
/** Parcel implementation details */
@Override
public int describeContents() {
- return 0;
+ int flags = 0;
+ for (HubServiceInfo serviceInfo : mHubServiceInfos) {
+ flags |= serviceInfo.describeContents();
+ }
+ return flags;
}
/** Parcel implementation details */
@@ -142,8 +204,12 @@ public final class HubEndpointInfo implements Parcelable {
public void writeToParcel(@NonNull Parcel dest, int flags) {
dest.writeLong(mId.getHub());
dest.writeLong(mId.getEndpoint());
+ dest.writeInt(mType);
dest.writeString(mName);
+ dest.writeInt(mVersion);
dest.writeString(mTag);
+ dest.writeStringList(mRequiredPermissions);
+ dest.writeTypedList(mHubServiceInfos, flags);
}
/** Get a unique identifier for this endpoint. */
@@ -152,6 +218,18 @@ public final class HubEndpointInfo implements Parcelable {
return mId;
}
+ /**
+ * Get the type of this endpoint. Application may use this field to get more information about
+ * who registered this endpoint for diagnostic purposes.
+ *
+ * <p>Type can be one of {@link HubEndpointInfo#TYPE_APP}, {@link
+ * HubEndpointInfo#TYPE_FRAMEWORK}, {@link HubEndpointInfo#TYPE_NANOAPP}, {@link
+ * HubEndpointInfo#TYPE_NATIVE} or {@link HubEndpointInfo#TYPE_HUB_ENDPOINT}.
+ */
+ public int getType() {
+ return mType;
+ }
+
/** Get the human-readable name of this endpoint (for debugging purposes). */
@NonNull
public String getName() {
@@ -159,6 +237,32 @@ public final class HubEndpointInfo implements Parcelable {
}
/**
+ * Get the version of this endpoint.
+ *
+ * <p>Monotonically increasing version number. The two sides of an endpoint session can use this
+ * version number to identify the other side and determine compatibility with each other. The
+ * interpretation of the version number is specific to the implementation of an endpoint.
+ *
+ * <p>The version number should not be used to compare endpoints implementation freshness for
+ * different endpoint types.
+ *
+ * <p>Depending on type of the endpoint, the following values (and formats) are used:
+ *
+ * <ol>
+ * <li>{@link #TYPE_FRAMEWORK}: android.os.Build.VERSION.SDK_INT_FULL
+ * <li>{@link #TYPE_APP}: versionCode
+ * <li>{@link #TYPE_NATIVE}: unspecified format (supplied by endpoint code)
+ * <li>{@link #TYPE_NANOAPP}: nanoapp version, typically following 0xMMmmpppp scheme where MM
+ * = major version, mm = minor version, pppp = patch version
+ * <li>{@link #TYPE_HUB_ENDPOINT}: unspecified format (supplied by endpoint code), following
+ * nanoapp versioning scheme is recommended
+ * </ol>
+ */
+ public int getVersion() {
+ return mVersion;
+ }
+
+ /**
* Get the tag that further identifies the submodule that created this endpoint. For example, a
* single application could provide multiple endpoints. These endpoints will share the same
* name, but will have different tags. This tag can be used to identify the submodule within the
@@ -169,6 +273,36 @@ public final class HubEndpointInfo implements Parcelable {
return mTag;
}
+ /**
+ * Get the list of required permissions in order to talk to this endpoint.
+ *
+ * <p>This list is enforced by the Context Hub Service. The app would need to have the required
+ * permissions list to open a session with this particular endpoint. Otherwise this will be
+ * rejected by as permission failures.
+ *
+ * <p>This is mostly for allowing app to check what permission it needs first internally. App
+ * will need to request permissions grant at runtime if not already granted. See {@link
+ * android.content.Context#checkPermission} for more details.
+ *
+ * <p>See {@link android.Manifest.permission} for a list of standard Android permissions as
+ * possible values.
+ */
+ @SuppressLint("RequiresPermission")
+ @NonNull
+ public Collection<String> getRequiredPermissions() {
+ return Collections.unmodifiableList(mRequiredPermissions);
+ }
+
+ /**
+ * Get the list of services provided by this endpoint.
+ *
+ * <p>See {@link HubServiceInfo} for more information.
+ */
+ @NonNull
+ public Collection<HubServiceInfo> getServiceInfoCollection() {
+ return Collections.unmodifiableList(mHubServiceInfos);
+ }
+
@Override
public String toString() {
StringBuilder out = new StringBuilder();
diff --git a/core/java/android/hardware/contexthub/HubEndpointSession.java b/core/java/android/hardware/contexthub/HubEndpointSession.java
index ef989f1f0d2d..cf952cbdbfdc 100644
--- a/core/java/android/hardware/contexthub/HubEndpointSession.java
+++ b/core/java/android/hardware/contexthub/HubEndpointSession.java
@@ -18,8 +18,12 @@ package android.hardware.contexthub;
import android.annotation.FlaggedApi;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.chre.flags.Flags;
+import android.hardware.location.ContextHubTransaction;
+import android.hardware.location.ContextHubTransactionHelper;
+import android.hardware.location.IContextHubTransactionCallback;
import android.util.CloseGuard;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -27,8 +31,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
/**
* An object representing a communication session between two different hub endpoints.
*
- * <p>A published enpoint can receive
- *
* @hide
*/
@SystemApi
@@ -38,10 +40,10 @@ public class HubEndpointSession implements AutoCloseable {
private final int mId;
- // TODO(b/377717509): Implement Message sending API & interface
@NonNull private final HubEndpoint mHubEndpoint;
@NonNull private final HubEndpointInfo mInitiator;
@NonNull private final HubEndpointInfo mDestination;
+ @Nullable private final HubServiceInfo mServiceInfo;
private final AtomicBoolean mIsClosed = new AtomicBoolean(true);
@@ -50,11 +52,49 @@ public class HubEndpointSession implements AutoCloseable {
int id,
@NonNull HubEndpoint hubEndpoint,
@NonNull HubEndpointInfo destination,
- @NonNull HubEndpointInfo initiator) {
+ @NonNull HubEndpointInfo initiator,
+ @Nullable HubServiceInfo serviceInfo) {
mId = id;
mHubEndpoint = hubEndpoint;
mDestination = destination;
mInitiator = initiator;
+ mServiceInfo = serviceInfo;
+ }
+
+ /**
+ * Send a message to the peer endpoint in this session.
+ *
+ * @param message The message object constructed with {@link HubMessage#createMessage}.
+ * @return For messages that does not require a response, the transaction will immediately
+ * complete. For messages that requires a response, the transaction will complete after
+ * receiving the response for the message.
+ */
+ @NonNull
+ public ContextHubTransaction<Void> sendMessage(@NonNull HubMessage message) {
+ if (mIsClosed.get()) {
+ throw new IllegalStateException("Session is already closed.");
+ }
+
+ boolean isResponseRequired = message.getDeliveryParams().isResponseRequired();
+ ContextHubTransaction<Void> ret =
+ new ContextHubTransaction<>(
+ isResponseRequired
+ ? ContextHubTransaction.TYPE_HUB_MESSAGE_REQUIRES_RESPONSE
+ : ContextHubTransaction.TYPE_HUB_MESSAGE_DEFAULT);
+ if (!isResponseRequired) {
+ // If the message doesn't require acknowledgement, respond with success immediately
+ // TODO(b/379162322): Improve handling of synchronous failures.
+ mHubEndpoint.sendMessage(this, message, null);
+ ret.setResponse(
+ new ContextHubTransaction.Response<>(
+ ContextHubTransaction.RESULT_SUCCESS, null));
+ } else {
+ IContextHubTransactionCallback callback =
+ ContextHubTransactionHelper.createTransactionCallback(ret);
+ // Sequence number will be assigned at the service
+ mHubEndpoint.sendMessage(this, message, callback);
+ }
+ return ret;
}
/** @hide */
@@ -87,6 +127,21 @@ public class HubEndpointSession implements AutoCloseable {
}
}
+ /**
+ * Get the {@link HubServiceInfo} associated with this session. Null value indicates that there
+ * is no service associated to this session.
+ *
+ * <p>For hub initiated sessions, the object was previously used in as an argument for open
+ * request in {@link IHubEndpointLifecycleCallback#onSessionOpenRequest}.
+ *
+ * <p>For app initiated sessions, the object was previously used in an open request in {@link
+ * android.hardware.location.ContextHubManager#openSession}
+ */
+ @Nullable
+ public HubServiceInfo getServiceInfo() {
+ return mServiceInfo;
+ }
+
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
diff --git a/core/java/android/hardware/contexthub/HubMessage.aidl b/core/java/android/hardware/contexthub/HubMessage.aidl
new file mode 100644
index 000000000000..86afce233062
--- /dev/null
+++ b/core/java/android/hardware/contexthub/HubMessage.aidl
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2024 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.hardware.contexthub;
+
+/**
+ * @hide
+ */
+parcelable HubMessage;
diff --git a/core/java/android/hardware/contexthub/HubMessage.java b/core/java/android/hardware/contexthub/HubMessage.java
new file mode 100644
index 000000000000..dc8a8c52ea55
--- /dev/null
+++ b/core/java/android/hardware/contexthub/HubMessage.java
@@ -0,0 +1,289 @@
+/*
+ * Copyright 2024 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.hardware.contexthub;
+
+import android.annotation.FlaggedApi;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.chre.flags.Flags;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import libcore.util.HexEncoding;
+
+import java.util.Arrays;
+import java.util.Objects;
+
+/**
+ * A class describing general messages send through the Context Hub Service.
+ *
+ * @hide
+ */
+@SystemApi
+@FlaggedApi(Flags.FLAG_OFFLOAD_API)
+public final class HubMessage implements Parcelable {
+ private static final int DEBUG_LOG_NUM_BYTES = 16;
+
+ private final int mMessageType;
+ private final byte[] mMessageBody;
+
+ private final DeliveryParams mDeliveryParams;
+ private int mMessageSequenceNumber;
+
+ /**
+ * Configurable options for message delivery. This option can be passed into {@link
+ * HubEndpointSession#sendMessage} to specify the behavior of message delivery.
+ */
+ public static class DeliveryParams {
+ private boolean mResponseRequired;
+
+ private DeliveryParams(boolean responseRequired) {
+ mResponseRequired = responseRequired;
+ }
+
+ /** Get the acknowledgement requirement. */
+ public boolean isResponseRequired() {
+ return mResponseRequired;
+ }
+
+ /**
+ * Set the response requirement for a message. Message sent with this option will have a
+ * {@link android.hardware.location.ContextHubTransaction.Response} when the peer received
+ * the message. Default is false.
+ */
+ @NonNull
+ public DeliveryParams setResponseRequired(boolean required) {
+ mResponseRequired = required;
+ return this;
+ }
+
+ /** Construct a default delivery option. */
+ @NonNull
+ public static DeliveryParams makeBasic() {
+ return new DeliveryParams(false);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder out = new StringBuilder();
+ out.append("DeliveryParams[");
+ out.append("responseRequired = ").append(mResponseRequired);
+ out.append("]");
+ return out.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mResponseRequired);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+
+ if (obj instanceof DeliveryParams other) {
+ return other.mResponseRequired == mResponseRequired;
+ }
+
+ return false;
+ }
+ }
+
+ private HubMessage(int messageType, byte[] messageBody, DeliveryParams deliveryParams) {
+ mMessageType = messageType;
+ mMessageBody = messageBody;
+ mDeliveryParams = deliveryParams;
+ }
+
+ /**
+ * Creates a HubMessage object to send to through an endpoint.
+ *
+ * @param messageType the endpoint & service dependent message type
+ * @param messageBody the byte array message contents
+ * @return the HubMessage object
+ */
+ @NonNull
+ public static HubMessage createMessage(int messageType, @NonNull byte[] messageBody) {
+ return new HubMessage(messageType, messageBody, DeliveryParams.makeBasic());
+ }
+
+ /**
+ * Creates a HubMessage object to send to through an endpoint.
+ *
+ * @param messageType the endpoint & service dependent message type
+ * @param messageBody the byte array message contents
+ * @param deliveryParams The message delivery parameters. See {@link HubMessage.DeliveryParams}
+ * for more details.
+ * @return the HubMessage object
+ */
+ @NonNull
+ public static HubMessage createMessage(
+ int messageType, @NonNull byte[] messageBody, @NonNull DeliveryParams deliveryParams) {
+ return new HubMessage(messageType, messageBody, deliveryParams);
+ }
+
+ /**
+ * Retrieve the message type.
+ *
+ * @return the type of the message
+ */
+ public int getMessageType() {
+ return mMessageType;
+ }
+
+ /**
+ * Retrieve the body of the message. The body can be an empty byte array.
+ *
+ * @return the byte array contents of the message
+ */
+ @NonNull
+ public byte[] getMessageBody() {
+ return mMessageBody;
+ }
+
+ /**
+ * Retrieve the {@link DeliveryParams} object specifying the behavior of message delivery.
+ *
+ * @hide
+ */
+ public DeliveryParams getDeliveryParams() {
+ return mDeliveryParams;
+ }
+
+ /**
+ * Assign a message sequence number. This should only be called by the system service.
+ *
+ * @hide
+ */
+ public void setMessageSequenceNumber(int messageSequenceNumber) {
+ mMessageSequenceNumber = messageSequenceNumber;
+ }
+
+ /**
+ * Returns the message sequence number. The default value is 0.
+ *
+ * @return the message sequence number of the message
+ * @hide
+ */
+ public int getMessageSequenceNumber() {
+ return mMessageSequenceNumber;
+ }
+
+ private HubMessage(@NonNull Parcel in) {
+ mMessageType = in.readInt();
+
+ int msgSize = in.readInt();
+ mMessageBody = new byte[msgSize];
+ in.readByteArray(mMessageBody);
+
+ mDeliveryParams = DeliveryParams.makeBasic();
+ mDeliveryParams.setResponseRequired(in.readInt() == 1);
+ mMessageSequenceNumber = in.readInt();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(@NonNull Parcel out, int flags) {
+ out.writeInt(mMessageType);
+
+ out.writeInt(mMessageBody.length);
+ out.writeByteArray(mMessageBody);
+
+ out.writeInt(mDeliveryParams.isResponseRequired() ? 1 : 0);
+ out.writeInt(mMessageSequenceNumber);
+ }
+
+ public static final @NonNull Creator<HubMessage> CREATOR =
+ new Creator<>() {
+ @Override
+ public HubMessage createFromParcel(Parcel in) {
+ return new HubMessage(in);
+ }
+
+ @Override
+ public HubMessage[] newArray(int size) {
+ return new HubMessage[size];
+ }
+ };
+
+ @NonNull
+ @Override
+ public String toString() {
+ int length = mMessageBody.length;
+
+ StringBuilder out = new StringBuilder();
+ out.append("HubMessage[type = ").append(mMessageType);
+ out.append(", length = ").append(mMessageBody.length);
+ out.append(", messageSequenceNumber = ").append(mMessageSequenceNumber);
+ out.append(", deliveryParams = ").append(mDeliveryParams);
+ out.append("](");
+
+ if (length > 0) {
+ out.append("data = 0x");
+ }
+ for (int i = 0; i < Math.min(length, DEBUG_LOG_NUM_BYTES); i++) {
+ out.append(HexEncoding.encodeToString(mMessageBody[i], true /* upperCase */));
+
+ if ((i + 1) % 4 == 0) {
+ out.append(" ");
+ }
+ }
+ if (length > DEBUG_LOG_NUM_BYTES) {
+ out.append("...");
+ }
+ out.append(")");
+
+ return out.toString();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object object) {
+ if (object == this) {
+ return true;
+ }
+
+ boolean isEqual = false;
+ if (object instanceof HubMessage other) {
+ isEqual =
+ (other.getMessageType() == mMessageType)
+ && Arrays.equals(other.getMessageBody(), mMessageBody)
+ && (other.getDeliveryParams().equals(mDeliveryParams))
+ && (other.getMessageSequenceNumber() == mMessageSequenceNumber);
+ }
+
+ return isEqual;
+ }
+
+ @Override
+ public int hashCode() {
+ if (!Flags.fixApiCheck()) {
+ return super.hashCode();
+ }
+
+ return Objects.hash(
+ mMessageType,
+ Arrays.hashCode(mMessageBody),
+ mDeliveryParams,
+ mMessageSequenceNumber);
+ }
+}
diff --git a/core/java/android/hardware/contexthub/HubServiceInfo.aidl b/core/java/android/hardware/contexthub/HubServiceInfo.aidl
new file mode 100644
index 000000000000..98b1bbab8b60
--- /dev/null
+++ b/core/java/android/hardware/contexthub/HubServiceInfo.aidl
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2024 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.hardware.contexthub;
+
+/**
+ * @hide
+ */
+parcelable HubServiceInfo;
diff --git a/core/java/android/hardware/contexthub/HubServiceInfo.java b/core/java/android/hardware/contexthub/HubServiceInfo.java
new file mode 100644
index 000000000000..c7fe77c4a0f1
--- /dev/null
+++ b/core/java/android/hardware/contexthub/HubServiceInfo.java
@@ -0,0 +1,263 @@
+/*
+ * Copyright 2024 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.hardware.contexthub;
+
+import android.annotation.FlaggedApi;
+import android.annotation.IntDef;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.chre.flags.Flags;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.ParcelableHolder;
+
+import androidx.annotation.NonNull;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Collection;
+import java.util.Objects;
+
+/**
+ * A class describing services provided by endpoints.
+ *
+ * <p>An endpoint can provide zero or more service. See {@link
+ * HubEndpoint.Builder#setServiceInfoCollection(Collection)} and {@link
+ * HubEndpointInfo#getServiceInfoCollection()}.
+ *
+ * <p>An endpoint session can be service-less or associated to one service.See {@link
+ * HubEndpointSession#getServiceInfo()}.
+ *
+ * @hide
+ */
+@SystemApi
+@FlaggedApi(Flags.FLAG_OFFLOAD_API)
+public final class HubServiceInfo implements Parcelable {
+ /** Customized format for messaging. Fully customized and opaque messaging format. */
+ public static final int FORMAT_CUSTOM = 0;
+
+ /**
+ * Binder-based messaging. The host endpoint is defining this service in Stable AIDL. Messages
+ * between endpoints that uses this service will be using the binder marhsalling format.
+ */
+ public static final int FORMAT_AIDL = 1;
+
+ /**
+ * Pigweed RPC messaging with Protobuf. This endpoint is a Pigweed RPC. Messages between
+ * endpoints will use Pigweed RPC marshalling format (protobuf).
+ */
+ public static final int FORMAT_PW_RPC_PROTOBUF = 2;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({
+ FORMAT_CUSTOM,
+ FORMAT_AIDL,
+ FORMAT_PW_RPC_PROTOBUF,
+ })
+ public @interface ServiceFormat {}
+
+ @NonNull private final String mServiceDescriptor;
+
+ @ServiceFormat private final int mFormat;
+ private final int mMajorVersion;
+ private final int mMinorVersion;
+
+ @NonNull private final ParcelableHolder mExtendedInfo;
+
+ /** @hide */
+ public HubServiceInfo(android.hardware.contexthub.Service service) {
+ mServiceDescriptor = service.serviceDescriptor;
+ mFormat = service.format;
+ mMajorVersion = service.majorVersion;
+ mMinorVersion = service.minorVersion;
+ mExtendedInfo = service.extendedInfo;
+ }
+
+ private HubServiceInfo(Parcel in) {
+ mServiceDescriptor = Objects.requireNonNull(in.readString());
+ mFormat = in.readInt();
+ mMajorVersion = in.readInt();
+ mMinorVersion = in.readInt();
+ mExtendedInfo = ParcelableHolder.CREATOR.createFromParcel(in);
+ }
+
+ public HubServiceInfo(
+ @NonNull String serviceDescriptor,
+ @ServiceFormat int format,
+ int majorVersion,
+ int minorVersion,
+ @NonNull ParcelableHolder extendedInfo) {
+ mServiceDescriptor = serviceDescriptor;
+ mFormat = format;
+ mMajorVersion = majorVersion;
+ mMinorVersion = minorVersion;
+ mExtendedInfo = extendedInfo;
+ }
+
+ /** Get the unique identifier of this service. See {@link Builder} for more information. */
+ @NonNull
+ public String getServiceDescriptor() {
+ return mServiceDescriptor;
+ }
+
+ /**
+ * Get the type of the service.
+ *
+ * <p>The value can be one of {@link HubServiceInfo#FORMAT_CUSTOM}, {@link
+ * HubServiceInfo#FORMAT_AIDL} or {@link HubServiceInfo#FORMAT_PW_RPC_PROTOBUF}.
+ */
+ public int getFormat() {
+ return mFormat;
+ }
+
+ /** Get the major version of this service. */
+ public int getMajorVersion() {
+ return mMajorVersion;
+ }
+
+ /** Get the minor version of this service. */
+ public int getMinorVersion() {
+ return mMinorVersion;
+ }
+
+ /** Get the {@link ParcelableHolder} for the extended information about the service. */
+ @NonNull
+ public ParcelableHolder getExtendedInfo() {
+ return mExtendedInfo;
+ }
+
+ /** Parcel implementation details */
+ @Override
+ public int describeContents() {
+ // Passthrough describeContents flags for mExtendedInfo because we don't have FD otherwise.
+ return mExtendedInfo.describeContents();
+ }
+
+ /** Parcel implementation details */
+ @Override
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ dest.writeString(mServiceDescriptor);
+ dest.writeInt(mFormat);
+ dest.writeInt(mMajorVersion);
+ dest.writeInt(mMinorVersion);
+ mExtendedInfo.writeToParcel(dest, flags);
+ }
+
+ /** Builder for a {@link HubServiceInfo} object. */
+ public static final class Builder {
+ @NonNull private final String mServiceDescriptor;
+
+ @ServiceFormat private final int mFormat;
+ private final int mMajorVersion;
+ private final int mMinorVersion;
+
+ private final ParcelableHolder mExtendedInfo =
+ new ParcelableHolder(Parcelable.PARCELABLE_STABILITY_VINTF);
+
+ /**
+ * Create a builder for {@link HubServiceInfo} with a service descriptor.
+ *
+ * <p>Service descriptor should uniquely identify the interface (scoped to type). Convention
+ * of the descriptor depend on interface type.
+ *
+ * <p>Examples:
+ *
+ * <ol>
+ * <li>AOSP-defined AIDL: android.hardware.something.IFoo/default
+ * <li>Vendor-defined AIDL: com.example.something.IBar/default
+ * <li>Pigweed RPC with Protobuf: com.example.proto.ExampleService
+ * </ol>
+ *
+ * @param serviceDescriptor The service descriptor.
+ * @param format One of {@link HubServiceInfo#FORMAT_CUSTOM}, {@link
+ * HubServiceInfo#FORMAT_AIDL} or {@link HubServiceInfo#FORMAT_PW_RPC_PROTOBUF}.
+ * @param majorVersion Breaking changes should be a major version bump.
+ * @param minorVersion Monotonically increasing minor version.
+ * @throws IllegalArgumentException if one or more fields are not valid.
+ */
+ public Builder(
+ @NonNull String serviceDescriptor,
+ @ServiceFormat int format,
+ int majorVersion,
+ int minorVersion) {
+ if (format != FORMAT_CUSTOM
+ && format != FORMAT_AIDL
+ && format != FORMAT_PW_RPC_PROTOBUF) {
+ throw new IllegalArgumentException("Invalid format type.");
+ }
+ mFormat = format;
+
+ if (majorVersion < 0) {
+ throw new IllegalArgumentException(
+ "Major version cannot be set to negative number.");
+ }
+ mMajorVersion = majorVersion;
+
+ if (minorVersion < 0) {
+ throw new IllegalArgumentException(
+ "Minor version cannot be set to negative number.");
+ }
+ mMinorVersion = minorVersion;
+
+ if (serviceDescriptor.isBlank()) {
+ throw new IllegalArgumentException("Invalid service descriptor.");
+ }
+ mServiceDescriptor = serviceDescriptor;
+ }
+
+ /**
+ * Set the extended information of this service.
+ *
+ * @param extendedInfo Parcelable with extended information about this service. The
+ * parcelable needs to have at least VINTF stability. Null can be used to clear a
+ * previously set value.
+ * @throws android.os.BadParcelableException if the parcelable cannot be used.
+ */
+ @NonNull
+ public Builder setExtendedInfo(@Nullable Parcelable extendedInfo) {
+ mExtendedInfo.setParcelable(extendedInfo);
+ return this;
+ }
+
+ /**
+ * Build the {@link HubServiceInfo} object.
+ *
+ * @throws IllegalStateException if the Builder is missing required info.
+ */
+ @NonNull
+ public HubServiceInfo build() {
+ if (mMajorVersion < 0 || mMinorVersion < 0) {
+ throw new IllegalStateException("Major and minor version must be set.");
+ }
+ return new HubServiceInfo(
+ mServiceDescriptor, mFormat, mMajorVersion, mMinorVersion, mExtendedInfo);
+ }
+ }
+
+ /** Parcel implementation details */
+ @NonNull
+ public static final Parcelable.Creator<HubServiceInfo> CREATOR =
+ new Parcelable.Creator<>() {
+ public HubServiceInfo createFromParcel(Parcel in) {
+ return new HubServiceInfo(in);
+ }
+
+ public HubServiceInfo[] newArray(int size) {
+ return new HubServiceInfo[size];
+ }
+ };
+}
diff --git a/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl b/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl
index 61e60e31760a..1c98b4b3f4f5 100644
--- a/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl
+++ b/core/java/android/hardware/contexthub/IContextHubEndpoint.aidl
@@ -17,6 +17,9 @@
package android.hardware.contexthub;
import android.hardware.contexthub.HubEndpointInfo;
+import android.hardware.contexthub.HubMessage;
+import android.hardware.contexthub.HubServiceInfo;
+import android.hardware.location.IContextHubTransactionCallback;
/**
* @hide
@@ -35,7 +38,7 @@ interface IContextHubEndpoint {
* @throws IllegalArgumentException If the HubEndpointInfo is not valid.
* @throws IllegalStateException If there are too many opened sessions.
*/
- int openSession(in HubEndpointInfo destination);
+ int openSession(in HubEndpointInfo destination, in @nullable HubServiceInfo serviceInfo);
/**
* Request system service to close a specific session
@@ -62,4 +65,26 @@ interface IContextHubEndpoint {
* Unregister this endpoint from the HAL, invalidate the EndpointInfo previously assigned.
*/
void unregister();
+
+ /**
+ * Send a message parcelable to system service for a specific session.
+ *
+ * @param sessionId The integer representing the communication session, previously set in
+ * IContextHubEndpoint.openSession(). This id is assigned by the HAL.
+ * @param message The HubMessage parcelable that represents the message and its delivery options.
+ * @param transactionCallback Nullable. If the hub message requires a reply, the transactionCallback
+ * will be set to non-null.
+ */
+ void sendMessage(int sessionId, in HubMessage message,
+ in @nullable IContextHubTransactionCallback transactionCallback);
+
+ /**
+ * Send a message delivery status to system service for a specific message
+ *
+ * @param sessionId The integer representing the communication session, previously set in
+ * IContextHubEndpoint.openSession(). This id is assigned by the HAL.
+ * @param messageSeqNumber The message sequence number, this should match a previously received HubMessage.
+ * @param errorCode The message delivery status detail.
+ */
+ void sendMessageDeliveryStatus(int sessionId, int messageSeqNumber, byte errorCode);
}
diff --git a/core/java/android/hardware/contexthub/IContextHubEndpointCallback.aidl b/core/java/android/hardware/contexthub/IContextHubEndpointCallback.aidl
index 5656a4ac49da..1ae5fb9d28c1 100644
--- a/core/java/android/hardware/contexthub/IContextHubEndpointCallback.aidl
+++ b/core/java/android/hardware/contexthub/IContextHubEndpointCallback.aidl
@@ -17,6 +17,8 @@
package android.hardware.contexthub;
import android.hardware.contexthub.HubEndpointInfo;
+import android.hardware.contexthub.HubMessage;
+import android.hardware.contexthub.HubServiceInfo;
/**
* @hide
@@ -27,8 +29,9 @@ oneway interface IContextHubEndpointCallback {
*
* @param sessionId An integer identifying the session, assigned by the initiator
* @param initiator HubEndpointInfo representing the requester
+ * @param serviceInfo Nullable HubServiceInfo representing the service associated with this session
*/
- void onSessionOpenRequest(int sessionId, in HubEndpointInfo initiator);
+ void onSessionOpenRequest(int sessionId, in HubEndpointInfo initiator, in @nullable HubServiceInfo serviceInfo);
/**
* Request from system service to close a specific session
@@ -38,7 +41,6 @@ oneway interface IContextHubEndpointCallback {
*/
void onSessionClosed(int sessionId, int reason);
-
/**
* Notifies the system service that the session requested by IContextHubEndpoint.openSession
* is ready to use.
@@ -47,4 +49,13 @@ oneway interface IContextHubEndpointCallback {
* IContextHubEndpoint.openSession(). This id is assigned by the HAL.
*/
void onSessionOpenComplete(int sessionId);
+
+ /**
+ * Message notification from system service for a specific session
+
+ * @param sessionId The integer representing the communication session, previously set in
+ * IContextHubEndpoint.openSession(). This id is assigned by the HAL.
+ * @param message The HubMessage parcelable that represents the message.
+ */
+ void onMessageReceived(int sessionId, in HubMessage message);
}
diff --git a/core/java/android/hardware/contexthub/IHubEndpointLifecycleCallback.java b/core/java/android/hardware/contexthub/IHubEndpointLifecycleCallback.java
index 5bd3c0ea23dc..46884393b49b 100644
--- a/core/java/android/hardware/contexthub/IHubEndpointLifecycleCallback.java
+++ b/core/java/android/hardware/contexthub/IHubEndpointLifecycleCallback.java
@@ -19,6 +19,7 @@ package android.hardware.contexthub;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.chre.flags.Flags;
@@ -55,9 +56,12 @@ public interface IHubEndpointLifecycleCallback {
* Called when an endpoint is requesting a session be opened with another endpoint.
*
* @param requester The {@link HubEndpointInfo} object representing the requester
+ * @param serviceInfo The {@link HubServiceInfo} object representing the service associated with
+ * this session. Null indicates that there is no service associated with this session.
*/
@NonNull
- HubEndpointSessionResult onSessionOpenRequest(@NonNull HubEndpointInfo requester);
+ HubEndpointSessionResult onSessionOpenRequest(
+ @NonNull HubEndpointInfo requester, @Nullable HubServiceInfo serviceInfo);
/**
* Called when a communication session is opened and ready to be used.
diff --git a/core/java/android/hardware/contexthub/IHubEndpointMessageCallback.java b/core/java/android/hardware/contexthub/IHubEndpointMessageCallback.java
new file mode 100644
index 000000000000..fde7017b5e76
--- /dev/null
+++ b/core/java/android/hardware/contexthub/IHubEndpointMessageCallback.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2024 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.hardware.contexthub;
+
+import android.annotation.FlaggedApi;
+import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.chre.flags.Flags;
+
+/**
+ * An interface used to deliver messages to an opened endpoint session.
+ *
+ * <p>This interface can be attached to an endpoint through {@link
+ * HubEndpoint.Builder#setMessageCallback} method. Methods in this interface will only be called
+ * when the endpoint is currently registered and has an open session. The endpoint will receive
+ * session lifecycle callbacks through {@link IHubEndpointLifecycleCallback}.
+ *
+ * @hide
+ */
+@SystemApi
+@FlaggedApi(Flags.FLAG_OFFLOAD_API)
+public interface IHubEndpointMessageCallback {
+ /**
+ * Callback interface for receiving messages for a particular endpoint session.
+ *
+ * @param session The session this message is sent through. Previously specified in a {@link
+ * IHubEndpointLifecycleCallback#onSessionOpened(HubEndpointSession)} call.
+ * @param message The {@link HubMessage} object representing a message received by the endpoint
+ * that registered this callback interface. This message is constructed by the
+ */
+ void onMessageReceived(@NonNull HubEndpointSession session, @NonNull HubMessage message);
+}
diff --git a/core/java/android/hardware/display/DisplayManagerInternal.java b/core/java/android/hardware/display/DisplayManagerInternal.java
index 399184cfaecb..68b6cfc012fc 100644
--- a/core/java/android/hardware/display/DisplayManagerInternal.java
+++ b/core/java/android/hardware/display/DisplayManagerInternal.java
@@ -470,6 +470,31 @@ public abstract class DisplayManagerInternal {
*/
public abstract boolean isDisplayReadyForMirroring(int displayId);
+
+ /**
+ * Used by the window manager to override the per-display screen brightness based on the
+ * current foreground activity.
+ *
+ * The key of the array is the displayId. If a displayId is missing from the array, this is
+ * equivalent to clearing any existing brightness overrides for that display.
+ *
+ * This method must only be called by the window manager.
+ */
+ public abstract void setScreenBrightnessOverrideFromWindowManager(
+ SparseArray<DisplayBrightnessOverrideRequest> brightnessOverrides);
+
+ /**
+ * Describes a request for overriding the brightness of a single display.
+ */
+ public static class DisplayBrightnessOverrideRequest {
+ // An override of the screen brightness.
+ // Set to PowerManager.BRIGHTNESS_INVALID if there's no override.
+ public float brightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
+
+ // Tag used to identify the app window requesting the brightness override.
+ public CharSequence tag;
+ }
+
/**
* Describes the requested power state of the display.
*
@@ -505,11 +530,11 @@ public abstract class DisplayManagerInternal {
// nearby, turning it off temporarily until the object is moved away.
public boolean useProximitySensor;
- // An override of the screen brightness.
+ // A global override of the screen brightness, applied to all displays.
// Set to PowerManager.BRIGHTNESS_INVALID if there's no override.
public float screenBrightnessOverride;
- // Tag used to identify the app window requesting the brightness override.
+ // Tag used to identify the reason for the global brightness override.
public CharSequence screenBrightnessOverrideTag;
// An override of the screen auto-brightness adjustment factor in the range -1 (dimmer) to
diff --git a/core/java/android/hardware/input/KeyGestureEvent.java b/core/java/android/hardware/input/KeyGestureEvent.java
index 24951c4d516e..711dc3a2cf7c 100644
--- a/core/java/android/hardware/input/KeyGestureEvent.java
+++ b/core/java/android/hardware/input/KeyGestureEvent.java
@@ -115,12 +115,14 @@ public final class KeyGestureEvent {
public static final int KEY_GESTURE_TYPE_TOGGLE_MOUSE_KEYS = 67;
public static final int KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW = 68;
public static final int KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW = 69;
- public static final int KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW = 70;
- public static final int KEY_GESTURE_TYPE_RESTORE_FREEFORM_WINDOW_SIZE = 71;
+ public static final int KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW = 70;
+ public static final int KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW = 71;
public static final int KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_IN = 72;
public static final int KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_OUT = 73;
public static final int KEY_GESTURE_TYPE_TOGGLE_MAGNIFICATION = 74;
public static final int KEY_GESTURE_TYPE_ACTIVATE_SELECT_TO_SPEAK = 75;
+ public static final int KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW = 76;
+
public static final int FLAG_CANCELLED = 1;
@@ -205,12 +207,13 @@ public final class KeyGestureEvent {
KEY_GESTURE_TYPE_TOGGLE_MOUSE_KEYS,
KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW,
KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW,
- KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW,
- KEY_GESTURE_TYPE_RESTORE_FREEFORM_WINDOW_SIZE,
+ KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW,
+ KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW,
KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_IN,
KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_OUT,
KEY_GESTURE_TYPE_TOGGLE_MAGNIFICATION,
KEY_GESTURE_TYPE_ACTIVATE_SELECT_TO_SPEAK,
+ KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW
})
@Retention(RetentionPolicy.SOURCE)
public @interface KeyGestureType {
@@ -557,14 +560,6 @@ public final class KeyGestureEvent {
return FrameworkStatsLog.KEYBOARD_SYSTEMS_EVENT_REPORTED__KEYBOARD_SYSTEM_EVENT__DESKTOP_MODE;
case KEY_GESTURE_TYPE_MULTI_WINDOW_NAVIGATION:
return FrameworkStatsLog.KEYBOARD_SYSTEMS_EVENT_REPORTED__KEYBOARD_SYSTEM_EVENT__MULTI_WINDOW_NAVIGATION;
- case KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW:
- return FrameworkStatsLog.KEYBOARD_SYSTEMS_EVENT_REPORTED__KEYBOARD_SYSTEM_EVENT__SNAP_LEFT_FREEFORM_WINDOW;
- case KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW:
- return FrameworkStatsLog.KEYBOARD_SYSTEMS_EVENT_REPORTED__KEYBOARD_SYSTEM_EVENT__SNAP_RIGHT_FREEFORM_WINDOW;
- case KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW:
- return FrameworkStatsLog.KEYBOARD_SYSTEMS_EVENT_REPORTED__KEYBOARD_SYSTEM_EVENT__MAXIMIZE_FREEFORM_WINDOW;
- case KEY_GESTURE_TYPE_RESTORE_FREEFORM_WINDOW_SIZE:
- return FrameworkStatsLog.KEYBOARD_SYSTEMS_EVENT_REPORTED__KEYBOARD_SYSTEM_EVENT__RESTORE_FREEFORM_WINDOW_SIZE;
default:
return LOG_EVENT_UNSPECIFIED;
}
@@ -777,10 +772,10 @@ public final class KeyGestureEvent {
return "KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW";
case KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW:
return "KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW";
- case KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW:
- return "KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW";
- case KEY_GESTURE_TYPE_RESTORE_FREEFORM_WINDOW_SIZE:
- return "KEY_GESTURE_TYPE_RESTORE_FREEFORM_WINDOW_SIZE";
+ case KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW:
+ return "KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW";
+ case KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW:
+ return "KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW";
case KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_IN:
return "KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_IN";
case KEY_GESTURE_TYPE_MAGNIFIER_ZOOM_OUT:
@@ -789,6 +784,8 @@ public final class KeyGestureEvent {
return "KEY_GESTURE_TYPE_TOGGLE_MAGNIFICATION";
case KEY_GESTURE_TYPE_ACTIVATE_SELECT_TO_SPEAK:
return "KEY_GESTURE_TYPE_ACTIVATE_SELECT_TO_SPEAK";
+ case KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW:
+ return "KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW";
default:
return Integer.toHexString(value);
}
diff --git a/core/java/android/hardware/location/ContextHubManager.java b/core/java/android/hardware/location/ContextHubManager.java
index b2c3bb89d863..426cd69f76a0 100644
--- a/core/java/android/hardware/location/ContextHubManager.java
+++ b/core/java/android/hardware/location/ContextHubManager.java
@@ -37,6 +37,7 @@ import android.hardware.contexthub.ErrorCode;
import android.hardware.contexthub.HubDiscoveryInfo;
import android.hardware.contexthub.HubEndpoint;
import android.hardware.contexthub.HubEndpointInfo;
+import android.hardware.contexthub.HubServiceInfo;
import android.hardware.contexthub.IHubEndpointLifecycleCallback;
import android.os.Handler;
import android.os.HandlerExecutor;
@@ -693,6 +694,8 @@ public final class ContextHubManager {
@RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
@NonNull
public List<HubDiscoveryInfo> findEndpoints(long endpointId) {
+ // TODO(b/379323274): Consider improving these getters to avoid racing with nano app load
+ // timing.
try {
List<HubEndpointInfo> endpointInfos = mService.findEndpoints(endpointId);
List<HubDiscoveryInfo> results = new ArrayList<>(endpointInfos.size());
@@ -707,6 +710,40 @@ public final class ContextHubManager {
}
/**
+ * Find a list of endpoints that provides a specific service.
+ *
+ * @param serviceDescriptor Statically generated ID for an endpoint.
+ * @return A list of {@link HubDiscoveryInfo} objects that represents the result of discovery.
+ * @throws IllegalArgumentException if the serviceDescriptor is empty/null.
+ */
+ @FlaggedApi(Flags.FLAG_OFFLOAD_API)
+ @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
+ @NonNull
+ public List<HubDiscoveryInfo> findEndpoints(@NonNull String serviceDescriptor) {
+ // TODO(b/379323274): Consider improving these getters to avoid racing with nano app load
+ // timing.
+ if (serviceDescriptor.isBlank()) {
+ throw new IllegalArgumentException("Invalid service descriptor: " + serviceDescriptor);
+ }
+ try {
+ List<HubEndpointInfo> endpointInfos =
+ mService.findEndpointsWithService(serviceDescriptor);
+ List<HubDiscoveryInfo> results = new ArrayList<>(endpointInfos.size());
+ // Wrap with result type
+ for (HubEndpointInfo endpointInfo : endpointInfos) {
+ for (HubServiceInfo serviceInfo : endpointInfo.getServiceInfoCollection()) {
+ if (serviceInfo.getServiceDescriptor().equals(serviceDescriptor)) {
+ results.add(new HubDiscoveryInfo(endpointInfo, serviceInfo));
+ }
+ }
+ }
+ return results;
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Set a callback to receive messages from the context hub
*
* @param callback Callback object
@@ -1052,11 +1089,12 @@ public final class ContextHubManager {
}
/**
- * Use a registered endpoint to connect to another endpoint (destination).
+ * Use a registered endpoint to connect to another endpoint (destination) without specifying a
+ * service.
*
* <p>Context Hub Service will create the endpoint session and notify the registered endpoint.
* The registered endpoint will receive callbacks on its {@link IHubEndpointLifecycleCallback}
- * object regarding the lifecycle events of the session
+ * object regarding the lifecycle events of the session.
*
* @param hubEndpoint {@link HubEndpoint} object previously registered via {@link
* ContextHubManager#registerEndpoint(HubEndpoint)}.
@@ -1067,7 +1105,31 @@ public final class ContextHubManager {
@FlaggedApi(Flags.FLAG_OFFLOAD_API)
public void openSession(
@NonNull HubEndpoint hubEndpoint, @NonNull HubEndpointInfo destination) {
- hubEndpoint.openSession(destination);
+ hubEndpoint.openSession(destination, null);
+ }
+
+ /**
+ * Use a registered endpoint to connect to another endpoint (destination) for a service
+ * described by a {@link HubServiceInfo} object.
+ *
+ * <p>Context Hub Service will create the endpoint session and notify the registered endpoint.
+ * The registered endpoint will receive callbacks on its {@link IHubEndpointLifecycleCallback}
+ * object regarding the lifecycle events of the session.
+ *
+ * @param hubEndpoint {@link HubEndpoint} object previously registered via {@link
+ * ContextHubManager#registerEndpoint(HubEndpoint)}.
+ * @param destination {@link HubEndpointInfo} object that represents an endpoint from previous
+ * endpoint discovery results (e.g. from {@link ContextHubManager#findEndpoints(long)}).
+ * @param serviceInfo {@link HubServiceInfo} object that describes the service associated with
+ * this session. The information will be sent to the destination as part of open request.
+ */
+ @RequiresPermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
+ @FlaggedApi(Flags.FLAG_OFFLOAD_API)
+ public void openSession(
+ @NonNull HubEndpoint hubEndpoint,
+ @NonNull HubEndpointInfo destination,
+ @NonNull HubServiceInfo serviceInfo) {
+ hubEndpoint.openSession(destination, serviceInfo);
}
/**
diff --git a/core/java/android/hardware/location/ContextHubTransaction.java b/core/java/android/hardware/location/ContextHubTransaction.java
index bd87b5cb6d54..ee55f81bb2a7 100644
--- a/core/java/android/hardware/location/ContextHubTransaction.java
+++ b/core/java/android/hardware/location/ContextHubTransaction.java
@@ -51,18 +51,23 @@ public class ContextHubTransaction<T> {
/**
* Constants describing the type of a transaction through the Context Hub Service.
- * {@hide}
+ *
+ * @hide
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = { "TYPE_" }, value = {
- TYPE_LOAD_NANOAPP,
- TYPE_UNLOAD_NANOAPP,
- TYPE_ENABLE_NANOAPP,
- TYPE_DISABLE_NANOAPP,
- TYPE_QUERY_NANOAPPS,
- TYPE_RELIABLE_MESSAGE,
- })
- public @interface Type { }
+ @IntDef(
+ prefix = {"TYPE_"},
+ value = {
+ TYPE_LOAD_NANOAPP,
+ TYPE_UNLOAD_NANOAPP,
+ TYPE_ENABLE_NANOAPP,
+ TYPE_DISABLE_NANOAPP,
+ TYPE_QUERY_NANOAPPS,
+ TYPE_RELIABLE_MESSAGE,
+ TYPE_HUB_MESSAGE_DEFAULT,
+ TYPE_HUB_MESSAGE_REQUIRES_RESPONSE,
+ })
+ public @interface Type {}
public static final int TYPE_LOAD_NANOAPP = 0;
public static final int TYPE_UNLOAD_NANOAPP = 1;
@@ -71,24 +76,34 @@ public class ContextHubTransaction<T> {
public static final int TYPE_QUERY_NANOAPPS = 4;
public static final int TYPE_RELIABLE_MESSAGE = 5;
+ @FlaggedApi(Flags.FLAG_OFFLOAD_API)
+ public static final int TYPE_HUB_MESSAGE_DEFAULT = 6;
+
+ @FlaggedApi(Flags.FLAG_OFFLOAD_API)
+ public static final int TYPE_HUB_MESSAGE_REQUIRES_RESPONSE = 7;
+
/**
* Constants describing the result of a transaction or request through the Context Hub Service.
- * {@hide}
+ *
+ * @hide
*/
@Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = { "RESULT_" }, value = {
- RESULT_SUCCESS,
- RESULT_FAILED_UNKNOWN,
- RESULT_FAILED_BAD_PARAMS,
- RESULT_FAILED_UNINITIALIZED,
- RESULT_FAILED_BUSY,
- RESULT_FAILED_AT_HUB,
- RESULT_FAILED_TIMEOUT,
- RESULT_FAILED_SERVICE_INTERNAL_FAILURE,
- RESULT_FAILED_HAL_UNAVAILABLE,
- RESULT_FAILED_NOT_SUPPORTED,
- })
+ @IntDef(
+ prefix = {"RESULT_"},
+ value = {
+ RESULT_SUCCESS,
+ RESULT_FAILED_UNKNOWN,
+ RESULT_FAILED_BAD_PARAMS,
+ RESULT_FAILED_UNINITIALIZED,
+ RESULT_FAILED_BUSY,
+ RESULT_FAILED_AT_HUB,
+ RESULT_FAILED_TIMEOUT,
+ RESULT_FAILED_SERVICE_INTERNAL_FAILURE,
+ RESULT_FAILED_HAL_UNAVAILABLE,
+ RESULT_FAILED_NOT_SUPPORTED,
+ })
public @interface Result {}
+
public static final int RESULT_SUCCESS = 0;
/**
* Generic failure mode.
@@ -143,7 +158,8 @@ public class ContextHubTransaction<T> {
*/
private R mContents;
- Response(@ContextHubTransaction.Result int result, R contents) {
+ /** @hide */
+ public Response(@ContextHubTransaction.Result int result, R contents) {
mResult = result;
mContents = contents;
}
@@ -206,7 +222,8 @@ public class ContextHubTransaction<T> {
*/
private boolean mIsResponseSet = false;
- ContextHubTransaction(@Type int type) {
+ /** @hide */
+ public ContextHubTransaction(@Type int type) {
mTransactionType = type;
}
@@ -338,16 +355,16 @@ public class ContextHubTransaction<T> {
/**
* Sets the response of the transaction.
*
- * This method should only be invoked by ContextHubManager as a result of a callback from
- * the Context Hub Service indicating the response from a transaction. This method should not be
+ * <p>This method should only be invoked by ContextHubManager as a result of a callback from the
+ * Context Hub Service indicating the response from a transaction. This method should not be
* invoked more than once.
*
* @param response the response to set
- *
* @throws IllegalStateException if this method is invoked multiple times
* @throws NullPointerException if the response is null
+ * @hide
*/
- /* package */ void setResponse(ContextHubTransaction.Response<T> response) {
+ public void setResponse(ContextHubTransaction.Response<T> response) {
synchronized (this) {
Objects.requireNonNull(response, "Response cannot be null");
if (mIsResponseSet) {
diff --git a/core/java/android/hardware/location/IContextHubService.aidl b/core/java/android/hardware/location/IContextHubService.aidl
index 512872303291..f9f412446038 100644
--- a/core/java/android/hardware/location/IContextHubService.aidl
+++ b/core/java/android/hardware/location/IContextHubService.aidl
@@ -126,10 +126,14 @@ interface IContextHubService {
@EnforcePermission("ACCESS_CONTEXT_HUB")
boolean setTestMode(in boolean enable);
- // Finds all endpoints that havea specific ID
+ // Finds all endpoints that has a specific ID
@EnforcePermission("ACCESS_CONTEXT_HUB")
List<HubEndpointInfo> findEndpoints(long endpointId);
+ // Finds all endpoints that has a specific service
+ @EnforcePermission("ACCESS_CONTEXT_HUB")
+ List<HubEndpointInfo> findEndpointsWithService(String service);
+
// Register an endpoint with the context hub
@EnforcePermission("ACCESS_CONTEXT_HUB")
IContextHubEndpoint registerEndpoint(in HubEndpointInfo pendingEndpointInfo, in IContextHubEndpointCallback callback);
diff --git a/core/java/android/os/BinderProxy.java b/core/java/android/os/BinderProxy.java
index 3b5a99ed089a..01222cdd38b3 100644
--- a/core/java/android/os/BinderProxy.java
+++ b/core/java/android/os/BinderProxy.java
@@ -36,6 +36,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@@ -651,28 +652,39 @@ public final class BinderProxy implements IBinder {
private native boolean unlinkToDeathNative(DeathRecipient recipient, int flags);
/**
- * This list is to hold strong reference to the frozen state callbacks. The callbacks are only
- * weakly referenced by JNI so the strong references here are needed to keep the callbacks
- * around until the proxy is GC'ed.
+ * This map is to hold strong reference to the frozen state callbacks.
+ *
+ * The callbacks are only weakly referenced by JNI so the strong references here are needed to
+ * keep the callbacks around until the proxy is GC'ed.
+ *
+ * The key is the original callback passed into {@link #addFrozenStateChangeCallback}. The value
+ * is the wrapped callback created in {@link #addFrozenStateChangeCallback} to dispatch the
+ * calls on the desired executor.
*/
- private List<FrozenStateChangeCallback> mFrozenStateChangeCallbacks =
- Collections.synchronizedList(new ArrayList<>());
+ private Map<FrozenStateChangeCallback, FrozenStateChangeCallback> mFrozenStateChangeCallbacks =
+ Collections.synchronizedMap(new HashMap<>());
/**
* See {@link IBinder#addFrozenStateChangeCallback(FrozenStateChangeCallback)}
*/
- public void addFrozenStateChangeCallback(FrozenStateChangeCallback callback)
+ public void addFrozenStateChangeCallback(Executor executor, FrozenStateChangeCallback callback)
throws RemoteException {
- addFrozenStateChangeCallbackNative(callback);
- mFrozenStateChangeCallbacks.add(callback);
+ FrozenStateChangeCallback wrappedCallback = (who, state) ->
+ executor.execute(() -> callback.onFrozenStateChanged(who, state));
+ addFrozenStateChangeCallbackNative(wrappedCallback);
+ mFrozenStateChangeCallbacks.put(callback, wrappedCallback);
}
/**
* See {@link IBinder#removeFrozenStateChangeCallback}
*/
- public boolean removeFrozenStateChangeCallback(FrozenStateChangeCallback callback) {
- mFrozenStateChangeCallbacks.remove(callback);
- return removeFrozenStateChangeCallbackNative(callback);
+ public boolean removeFrozenStateChangeCallback(FrozenStateChangeCallback callback)
+ throws IllegalArgumentException {
+ FrozenStateChangeCallback wrappedCallback = mFrozenStateChangeCallbacks.remove(callback);
+ if (wrappedCallback == null) {
+ throw new IllegalArgumentException("callback not found");
+ }
+ return removeFrozenStateChangeCallbackNative(wrappedCallback);
}
private native void addFrozenStateChangeCallbackNative(FrozenStateChangeCallback callback)
diff --git a/core/java/android/os/IBinder.java b/core/java/android/os/IBinder.java
index a997f4c86704..8cfd32449537 100644
--- a/core/java/android/os/IBinder.java
+++ b/core/java/android/os/IBinder.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -25,6 +26,7 @@ import android.compat.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.concurrent.Executor;
/**
* Base interface for a remotable object, the core part of a lightweight
@@ -397,12 +399,31 @@ public interface IBinder {
@interface State {
}
+ /**
+ * Represents the frozen state of the remote process.
+ *
+ * While in this state, the remote process won't be able to receive and handle a
+ * transaction. Therefore, any asynchronous transactions will be buffered and delivered when
+ * the process is unfrozen, and any synchronous transactions will result in an error.
+ *
+ * Buffered transactions may be stale by the time that the process is unfrozen and handles
+ * them. To avoid overwhelming the remote process with stale events or overflowing their
+ * buffers, it's best to avoid sending binder transactions to a frozen process.
+ */
int STATE_FROZEN = 0;
+
+ /**
+ * Represents the unfrozen state of the remote process.
+ *
+ * In this state, the process hosting the object can execute and is not restricted
+ * by the freezer from using the CPU or responding to binder transactions.
+ */
int STATE_UNFROZEN = 1;
/**
* Interface for receiving a callback when the process hosting an IBinder
* has changed its frozen state.
+ *
* @param who The IBinder whose hosting process has changed state.
* @param state The latest state.
*/
@@ -427,16 +448,32 @@ public interface IBinder {
* <p>You will only receive state change notifications for remote binders, as local binders by
* definition can't be frozen without you being frozen too.</p>
*
+ * @param executor The executor on which to run the callback.
+ * @param callback The callback used to deliver state change notifications.
+ *
* <p>@throws {@link UnsupportedOperationException} if the kernel binder driver does not support
* this feature.
*/
@FlaggedApi(Flags.FLAG_BINDER_FROZEN_STATE_CHANGE_CALLBACK)
- default void addFrozenStateChangeCallback(@NonNull FrozenStateChangeCallback callback)
+ default void addFrozenStateChangeCallback(
+ @NonNull @CallbackExecutor Executor executor,
+ @NonNull FrozenStateChangeCallback callback)
throws RemoteException {
throw new UnsupportedOperationException();
}
/**
+ * Same as {@link #addFrozenStateChangeCallback(Executor, FrozenStateChangeCallback)} except
+ * that callbacks are invoked on a binder thread.
+ *
+ * @hide
+ */
+ default void addFrozenStateChangeCallback(@NonNull FrozenStateChangeCallback callback)
+ throws RemoteException {
+ addFrozenStateChangeCallback(Runnable::run, callback);
+ }
+
+ /**
* Unregister a {@link FrozenStateChangeCallback}. The callback will no longer be invoked when
* the hosting process changes its frozen state.
*/
diff --git a/core/java/android/os/PowerManagerInternal.java b/core/java/android/os/PowerManagerInternal.java
index 29ccb85c0bab..9435f4d59a2c 100644
--- a/core/java/android/os/PowerManagerInternal.java
+++ b/core/java/android/os/PowerManagerInternal.java
@@ -98,18 +98,6 @@ public abstract class PowerManagerInternal {
}
/**
- * Used by the window manager to override the screen brightness based on the
- * current foreground activity.
- *
- * This method must only be called by the window manager.
- *
- * @param brightness The overridden brightness, or Float.NaN to disable the override.
- * @param tag Source identifier of the app window that requests the override.
- */
- public abstract void setScreenBrightnessOverrideFromWindowManager(
- float brightness, CharSequence tag);
-
- /**
* Used by the window manager to override the user activity timeout based on the
* current foreground activity. It can only be used to make the timeout shorter
* than usual, not longer.
diff --git a/core/java/android/os/RemoteCallbackList.java b/core/java/android/os/RemoteCallbackList.java
index 91c482faf7d7..d5630fd46eb4 100644
--- a/core/java/android/os/RemoteCallbackList.java
+++ b/core/java/android/os/RemoteCallbackList.java
@@ -16,6 +16,7 @@
package android.os;
+import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -29,6 +30,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.Executor;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
@@ -134,6 +136,7 @@ public class RemoteCallbackList<E extends IInterface> {
private final @FrozenCalleePolicy int mFrozenCalleePolicy;
private final int mMaxQueueSize;
+ private final Executor mExecutor;
private final class Interface implements IBinder.DeathRecipient,
IBinder.FrozenStateChangeCallback {
@@ -197,7 +200,7 @@ public class RemoteCallbackList<E extends IInterface> {
void maybeSubscribeToFrozenCallback() throws RemoteException {
if (mFrozenCalleePolicy != FROZEN_CALLEE_POLICY_UNSET) {
try {
- mBinder.addFrozenStateChangeCallback(this);
+ mBinder.addFrozenStateChangeCallback(mExecutor, this);
} catch (UnsupportedOperationException e) {
// The kernel does not support frozen notifications. In this case we want to
// silently fall back to FROZEN_CALLEE_POLICY_UNSET. This is done by simply
@@ -237,6 +240,7 @@ public class RemoteCallbackList<E extends IInterface> {
private @FrozenCalleePolicy int mFrozenCalleePolicy;
private int mMaxQueueSize = DEFAULT_MAX_QUEUE_SIZE;
private InterfaceDiedCallback mInterfaceDiedCallback;
+ private Executor mExecutor;
/**
* Creates a Builder for {@link RemoteCallbackList}.
@@ -285,6 +289,18 @@ public class RemoteCallbackList<E extends IInterface> {
}
/**
+ * Sets the executor to be used when invoking callbacks asynchronously.
+ *
+ * This is only used when callbacks need to be invoked asynchronously, e.g. when the process
+ * hosting a callback becomes unfrozen. Callbacks that can be invoked immediately run on the
+ * same thread that calls {@link #broadcast} synchronously.
+ */
+ public @NonNull Builder setExecutor(@NonNull @CallbackExecutor Executor executor) {
+ mExecutor = executor;
+ return this;
+ }
+
+ /**
* For notifying when the process hosting a callback interface has died.
*
* @param <E> The remote callback interface type.
@@ -308,15 +324,21 @@ public class RemoteCallbackList<E extends IInterface> {
* @return The built {@link RemoteCallbackList} object.
*/
public @NonNull RemoteCallbackList<E> build() {
+ Executor executor = mExecutor;
+ if (executor == null && mFrozenCalleePolicy != FROZEN_CALLEE_POLICY_UNSET) {
+ // TODO Throw an exception here once the existing API caller is updated to provide
+ // an executor.
+ executor = new HandlerExecutor(Handler.getMain());
+ }
if (mInterfaceDiedCallback != null) {
- return new RemoteCallbackList<E>(mFrozenCalleePolicy, mMaxQueueSize) {
+ return new RemoteCallbackList<E>(mFrozenCalleePolicy, mMaxQueueSize, executor) {
@Override
public void onCallbackDied(E deadInterface, Object cookie) {
mInterfaceDiedCallback.onInterfaceDied(this, deadInterface, cookie);
}
};
}
- return new RemoteCallbackList<E>(mFrozenCalleePolicy, mMaxQueueSize);
+ return new RemoteCallbackList<E>(mFrozenCalleePolicy, mMaxQueueSize, executor);
}
}
@@ -341,13 +363,23 @@ public class RemoteCallbackList<E extends IInterface> {
}
/**
+ * Returns the executor used when invoking callbacks asynchronously.
+ *
+ * @return The executor.
+ */
+ @FlaggedApi(Flags.FLAG_BINDER_FROZEN_STATE_CHANGE_CALLBACK)
+ public @Nullable Executor getExecutor() {
+ return mExecutor;
+ }
+
+ /**
* Creates a RemoteCallbackList with {@link #FROZEN_CALLEE_POLICY_UNSET}. This is equivalent to
* <pre>
* new RemoteCallbackList.Build(RemoteCallbackList.FROZEN_CALLEE_POLICY_UNSET).build()
* </pre>
*/
public RemoteCallbackList() {
- this(FROZEN_CALLEE_POLICY_UNSET, DEFAULT_MAX_QUEUE_SIZE);
+ this(FROZEN_CALLEE_POLICY_UNSET, DEFAULT_MAX_QUEUE_SIZE, null);
}
/**
@@ -362,10 +394,14 @@ public class RemoteCallbackList<E extends IInterface> {
* recipient's process is frozen. Once the limit is reached, the oldest callbacks would be
* dropped to keep the size under limit. Ignored except for
* {@link #FROZEN_CALLEE_POLICY_ENQUEUE_ALL}.
+ *
+ * @param executor The executor used when invoking callbacks asynchronously.
*/
- private RemoteCallbackList(@FrozenCalleePolicy int frozenCalleePolicy, int maxQueueSize) {
+ private RemoteCallbackList(@FrozenCalleePolicy int frozenCalleePolicy, int maxQueueSize,
+ @CallbackExecutor Executor executor) {
mFrozenCalleePolicy = frozenCalleePolicy;
mMaxQueueSize = maxQueueSize;
+ mExecutor = executor;
}
/**
diff --git a/core/java/android/os/VibrationEffect.java b/core/java/android/os/VibrationEffect.java
index 70cbc732366a..f6bc3894be4b 100644
--- a/core/java/android/os/VibrationEffect.java
+++ b/core/java/android/os/VibrationEffect.java
@@ -1826,52 +1826,6 @@ public abstract class VibrationEffect implements Parcelable {
}
/**
- * Start building a waveform vibration.
- *
- * <p>The waveform envelope builder offers more flexibility for creating waveform effects,
- * allowing control over vibration amplitude and frequency via smooth transitions between
- * values. The waveform will start the first transition from the vibrator off state, using
- * the same frequency of the first control point. To provide a different initial vibration
- * frequency, use {@link #startWaveformEnvelope(float)}.
- *
- * <p>Note: To check whether waveform envelope effects are supported, use
- * {@link Vibrator#areEnvelopeEffectsSupported()}.
- *
- * @see VibrationEffect.WaveformEnvelopeBuilder
- */
- @FlaggedApi(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
- @NonNull
- public static VibrationEffect.WaveformEnvelopeBuilder startWaveformEnvelope() {
- return new WaveformEnvelopeBuilder();
- }
-
- /**
- * Start building a waveform vibration with an initial frequency.
- *
- * <p>The waveform envelope builder offers more flexibility for creating waveform effects,
- * allowing control over vibration amplitude and frequency via smooth transitions between
- * values.
- *
- * <p>This is the same as {@link #startWaveformEnvelope()}, but the waveform will start
- * vibrating at given frequency, in hertz, while it transitions to the new amplitude and
- * frequency of the first control point.
- *
- * <p>Note: To check whether waveform envelope effects are supported, use
- * {@link Vibrator#areEnvelopeEffectsSupported()}.
- *
- * @param initialFrequencyHz The starting frequency of the vibration, in hertz. Must be greater
- * than zero.
- *
- * @see VibrationEffect.WaveformEnvelopeBuilder
- */
- @FlaggedApi(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
- @NonNull
- public static VibrationEffect.WaveformEnvelopeBuilder startWaveformEnvelope(
- @FloatRange(from = 0) float initialFrequencyHz) {
- return new WaveformEnvelopeBuilder(initialFrequencyHz);
- }
-
- /**
* A builder for waveform effects described by its envelope.
*
* <p>Waveform effect envelopes are defined by one or more control points describing a target
@@ -1882,7 +1836,7 @@ public abstract class VibrationEffect implements Parcelable {
* 100ms, holds that state for 200ms, and then ramps back down over 100ms:
*
* <pre>{@code
- * VibrationEffect effect = VibrationEffect.startWaveformEnvelope()
+ * VibrationEffect effect = new VibrationEffect.WaveformEnvelopeBuilder()
* .addControlPoint(1.0f, 120f, 100)
* .addControlPoint(1.0f, 120f, 200)
* .addControlPoint(0.0f, 120f, 100)
@@ -1916,20 +1870,48 @@ public abstract class VibrationEffect implements Parcelable {
* {@link VibratorEnvelopeEffectInfo#getMaxControlPointDurationMillis()}
* <li>Maximum total effect duration: {@link VibratorEnvelopeEffectInfo#getMaxDurationMillis()}
* </ul>
- *
- * @see VibrationEffect#startWaveformEnvelope()
*/
@FlaggedApi(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
public static final class WaveformEnvelopeBuilder {
private ArrayList<PwleSegment> mSegments = new ArrayList<>();
private float mLastAmplitude = 0f;
- private float mLastFrequencyHz = 0f;
+ private float mLastFrequencyHz = Float.NaN;
+
+ public WaveformEnvelopeBuilder() {}
+
+ /**
+ * Sets the initial frequency for the waveform in Hertz.
+ *
+ * <p>The effect will start vibrating at this frequency when it transitions to the
+ * amplitude and frequency defined by the first control point.
+ *
+ * <p>The frequency must be greater than zero and within the supported range. To determine
+ * the supported range, use {@link Vibrator#getFrequencyProfile()}. Creating
+ * effects using frequencies outside this range will result in the vibration not playing.
+ *
+ * @param initialFrequencyHz The starting frequency of the vibration, in Hz. Must be
+ * greater than zero.
+ */
+ @FlaggedApi(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
+ @SuppressWarnings("MissingGetterMatchingBuilder")// No getter to initial frequency once set.
+ @NonNull
+ public WaveformEnvelopeBuilder setInitialFrequencyHz(
+ @FloatRange(from = 0) float initialFrequencyHz) {
- private WaveformEnvelopeBuilder() {}
+ if (mSegments.isEmpty()) {
+ mLastFrequencyHz = initialFrequencyHz;
+ } else {
+ PwleSegment firstSegment = mSegments.getFirst();
+ mSegments.set(0, new PwleSegment(
+ firstSegment.getStartAmplitude(),
+ firstSegment.getEndAmplitude(),
+ initialFrequencyHz, // Update start frequency
+ firstSegment.getEndFrequencyHz(),
+ (int) firstSegment.getDuration()));
+ }
- private WaveformEnvelopeBuilder(float initialFrequency) {
- mLastFrequencyHz = initialFrequency;
+ return this;
}
/**
@@ -1940,15 +1922,13 @@ public abstract class VibrationEffect implements Parcelable {
* perceived intensity. It's determined by the actuator response curve.
*
* <p>Frequency must be greater than zero and within the supported range. To determine
- * the supported range, use {@link Vibrator#getFrequencyProfile()}. This method returns a
- * {@link android.os.vibrator.VibratorFrequencyProfile} object, which contains the
- * minimum and maximum frequencies, among other frequency-related information. Creating
+ * the supported range, use {@link Vibrator#getFrequencyProfile()}. Creating
* effects using frequencies outside this range will result in the vibration not playing.
*
* <p>Time specifies the duration (in milliseconds) for the vibrator to smoothly transition
* from the previous control point to this new one. It must be greater than zero. To
* transition as quickly as possible, use
- * {@link Vibrator#getMinEnvelopeEffectControlPointDurationMillis()}.
+ * {@link VibratorEnvelopeEffectInfo#getMinControlPointDurationMillis()}.
*
* @param amplitude The amplitude value between 0 and 1, inclusive. 0 represents the
* vibrator being off, and 1 represents the maximum achievable amplitude
@@ -1963,7 +1943,7 @@ public abstract class VibrationEffect implements Parcelable {
@FloatRange(from = 0, to = 1) float amplitude,
@FloatRange(from = 0) float frequencyHz, int timeMillis) {
- if (mLastFrequencyHz == 0) {
+ if (Float.isNaN(mLastFrequencyHz)) {
mLastFrequencyHz = frequencyHz;
}
@@ -1984,6 +1964,7 @@ public abstract class VibrationEffect implements Parcelable {
* calling this method again.
*
* @return The {@link VibrationEffect} resulting from the list of control points.
+ * @throws IllegalStateException if no control points were added to the builder.
*/
@FlaggedApi(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
@NonNull
diff --git a/core/java/android/os/flags.aconfig b/core/java/android/os/flags.aconfig
index 01445069af67..9b1bf057b815 100644
--- a/core/java/android/os/flags.aconfig
+++ b/core/java/android/os/flags.aconfig
@@ -203,6 +203,17 @@ flag {
}
flag {
+ name: "material_colors_10_2024"
+ namespace: "systemui"
+ description: "Adding new Material Tokens as of October 2024"
+ bug: "376195115"
+ is_exported: true
+ metadata {
+ purpose: PURPOSE_FEATURE
+ }
+}
+
+flag {
name: "message_queue_tail_tracking"
namespace: "system_performance"
description: "track tail of message queue."
diff --git a/core/java/android/os/vibrator/VibratorEnvelopeEffectInfo.java b/core/java/android/os/vibrator/VibratorEnvelopeEffectInfo.java
index f2ad7a402b60..afaab55f4ed4 100644
--- a/core/java/android/os/vibrator/VibratorEnvelopeEffectInfo.java
+++ b/core/java/android/os/vibrator/VibratorEnvelopeEffectInfo.java
@@ -34,11 +34,11 @@ import java.util.Objects;
* </ul>
*
* <p>This information can be used to help construct waveform envelope effects with
- * {@link VibrationEffect#startWaveformEnvelope()}. When designing these effects, it is also
+ * {@link VibrationEffect.WaveformEnvelopeBuilder}. When designing these effects, it is also
* recommended to check the {@link VibratorFrequencyProfile} for information about the supported
* frequency range and the vibrator's output response.
*
- * @see VibrationEffect#startWaveformEnvelope()
+ * @see VibrationEffect.WaveformEnvelopeBuilder
* @see VibratorFrequencyProfile
*/
@FlaggedApi(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
diff --git a/core/java/android/permission/flags.aconfig b/core/java/android/permission/flags.aconfig
index 0a35fe399531..b5a822b715d5 100644
--- a/core/java/android/permission/flags.aconfig
+++ b/core/java/android/permission/flags.aconfig
@@ -383,7 +383,7 @@ flag {
bug: "363318732"
}
-flag{
+flag {
name: "note_op_batching_enabled"
is_fixed_read_only: true
is_exported: true
@@ -409,3 +409,12 @@ flag {
description: "This flag is used to short circuit the request for permananently denied permissions"
bug: "378923900"
}
+
+flag {
+ name: "check_op_overload_api_enabled"
+ is_exported: true
+ is_fixed_read_only: true
+ namespace: "permissions"
+ description: "Add new checkOp APIs that accept attributionTag"
+ bug: "240617242"
+}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index d2a20b65c1ee..a35c9c1cd4ec 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6395,27 +6395,6 @@ public final class Settings {
public static final String SCREEN_FLASH_NOTIFICATION_COLOR =
"screen_flash_notification_color_global";
-
- /**
- * A semi-colon separated list of Bluetooth hearing devices' local ambient volume.
- * Each entry is encoded as a key=value list, separated by commas. Ex:
- *
- * "addr=XX:XX:XX:00:11,ambient=20,group_ambient=30;addr=XX:XX:XX:00:22,ambient=50"
- *
- * The following keys are supported:
- * <pre>
- * addr (String)
- * ambient (int)
- * group_ambient (int)
- * control_expanded (boolean)
- * </pre>
- *
- * Each entry must contains "addr" attribute, otherwise it'll be ignored.
- * @hide
- */
- public static final String HEARING_DEVICE_LOCAL_AMBIENT_VOLUME =
- "hearing_device_local_ambient_volume";
-
/**
* IMPORTANT: If you add a new public settings you also have to add it to
* PUBLIC_SETTINGS below. If the new setting is hidden you have to add
@@ -6560,7 +6539,6 @@ public final class Settings {
PRIVATE_SETTINGS.add(DEFAULT_DEVICE_FONT_SCALE);
PRIVATE_SETTINGS.add(MOUSE_REVERSE_VERTICAL_SCROLLING);
PRIVATE_SETTINGS.add(MOUSE_SWAP_PRIMARY_BUTTON);
- PRIVATE_SETTINGS.add(HEARING_DEVICE_LOCAL_AMBIENT_VOLUME);
}
/**
@@ -18138,6 +18116,44 @@ public final class Settings {
public static final String ONE_HANDED_KEYGUARD_SIDE = "one_handed_keyguard_side";
/**
+ * A semi-colon separated list of Bluetooth hearing devices' local ambient volume data.
+ * Each entry is encoded as a key=value list, separated by commas. Ex:
+ *
+ * "addr=XX:XX:XX:00:11,ambient=20,group_ambient=30;addr=XX:XX:XX:00:22,ambient=50"
+ *
+ * The following keys are supported:
+ * <pre>
+ * addr (String)
+ * ambient (int)
+ * group_ambient (int)
+ * control_expanded (boolean)
+ * </pre>
+ *
+ * Each entry must contains "addr" attribute, otherwise it'll be ignored.
+ * @hide
+ */
+ public static final String HEARING_DEVICE_LOCAL_AMBIENT_VOLUME =
+ "hearing_device_local_ambient_volume";
+
+ /**
+ * A semi-colon separated list of Bluetooth hearing devices' notification data.
+ * Each entry is encoded as a key=value list, separated by commas. Ex:
+ *
+ * "addr=XX:XX:XX:00:11,input_changes=1"
+ *
+ * The following keys are supported:
+ * <pre>
+ * addr (String)
+ * input_changes (boolean)
+ * </pre>
+ *
+ * Each entry must contains "addr" attribute, otherwise it'll be ignored.
+ * @hide
+ */
+ public static final String HEARING_DEVICE_LOCAL_NOTIFICATION =
+ "hearing_device_local_notification";
+
+ /**
* Global settings that shouldn't be persisted.
*
* @hide
diff --git a/core/java/android/security/forensic/ForensicEvent.java b/core/java/android/security/forensic/ForensicEvent.java
index 90906edcc636..3d908cca150c 100644
--- a/core/java/android/security/forensic/ForensicEvent.java
+++ b/core/java/android/security/forensic/ForensicEvent.java
@@ -17,13 +17,17 @@
package android.security.forensic;
import android.annotation.FlaggedApi;
+import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.app.admin.ConnectEvent;
+import android.app.admin.DnsEvent;
+import android.app.admin.SecurityLog.SecurityEvent;
import android.os.Parcel;
import android.os.Parcelable;
import android.security.Flags;
-import android.util.ArrayMap;
-import java.util.Map;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
/**
* A class that represents a forensic event.
@@ -33,11 +37,24 @@ import java.util.Map;
public final class ForensicEvent implements Parcelable {
private static final String TAG = "ForensicEvent";
- @NonNull
- private final String mType;
+ public static final int SECURITY_EVENT = 0;
+ public static final int NETWORK_EVENT_DNS = 1;
+ public static final int NETWORK_EVENT_CONNECT = 2;
- @NonNull
- private final Map<String, String> mKeyValuePairs;
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({
+ ForensicEvent.SECURITY_EVENT,
+ ForensicEvent.NETWORK_EVENT_DNS,
+ ForensicEvent.NETWORK_EVENT_CONNECT,
+ })
+ public @interface EventType {}
+
+ @NonNull @EventType private final int mType;
+
+ private final SecurityEvent mSecurityEvent;
+ private final DnsEvent mNetworkEventDns;
+ private final ConnectEvent mNetworkEventConnect;
public static final @NonNull Parcelable.Creator<ForensicEvent> CREATOR =
new Parcelable.Creator<>() {
@@ -50,30 +67,99 @@ public final class ForensicEvent implements Parcelable {
}
};
- public ForensicEvent(@NonNull String type, @NonNull Map<String, String> keyValuePairs) {
- mType = type;
- mKeyValuePairs = keyValuePairs;
+ public ForensicEvent(@NonNull SecurityEvent securityEvent) {
+ mType = SECURITY_EVENT;
+ mSecurityEvent = securityEvent;
+ mNetworkEventDns = null;
+ mNetworkEventConnect = null;
+ }
+
+ public ForensicEvent(@NonNull DnsEvent dnsEvent) {
+ mType = NETWORK_EVENT_DNS;
+ mNetworkEventDns = dnsEvent;
+ mSecurityEvent = null;
+ mNetworkEventConnect = null;
+ }
+
+ public ForensicEvent(@NonNull ConnectEvent connectEvent) {
+ mType = NETWORK_EVENT_CONNECT;
+ mNetworkEventConnect = connectEvent;
+ mSecurityEvent = null;
+ mNetworkEventDns = null;
}
private ForensicEvent(@NonNull Parcel in) {
- mType = in.readString();
- mKeyValuePairs = new ArrayMap<>(in.readInt());
- in.readMap(mKeyValuePairs, getClass().getClassLoader(), String.class, String.class);
+ mType = in.readInt();
+ switch (mType) {
+ case SECURITY_EVENT:
+ mSecurityEvent = SecurityEvent.CREATOR.createFromParcel(in);
+ mNetworkEventDns = null;
+ mNetworkEventConnect = null;
+ break;
+ case NETWORK_EVENT_DNS:
+ mNetworkEventDns = DnsEvent.CREATOR.createFromParcel(in);
+ mSecurityEvent = null;
+ mNetworkEventConnect = null;
+ break;
+ case NETWORK_EVENT_CONNECT:
+ mNetworkEventConnect = ConnectEvent.CREATOR.createFromParcel(in);
+ mSecurityEvent = null;
+ mNetworkEventDns = null;
+ break;
+ default:
+ throw new IllegalArgumentException("Invalid event type: " + mType);
+ }
}
- public String getType() {
+ /** Returns the type of the forensic event. */
+ @NonNull
+ public @EventType int getType() {
return mType;
}
- public Map<String, String> getKeyValuePairs() {
- return mKeyValuePairs;
+ /** Returns the SecurityEvent object. */
+ @NonNull
+ public SecurityEvent getSecurityEvent() {
+ if (mType == SECURITY_EVENT) {
+ return mSecurityEvent;
+ }
+ throw new IllegalArgumentException("Event type is not security event: " + mType);
+ }
+
+ /** Returns the DnsEvent object. */
+ @NonNull
+ public DnsEvent getDnsEvent() {
+ if (mType == NETWORK_EVENT_DNS) {
+ return mNetworkEventDns;
+ }
+ throw new IllegalArgumentException("Event type is not network DNS event: " + mType);
+ }
+
+ /** Returns the ConnectEvent object. */
+ @NonNull
+ public ConnectEvent getConnectEvent() {
+ if (mType == NETWORK_EVENT_CONNECT) {
+ return mNetworkEventConnect;
+ }
+ throw new IllegalArgumentException("Event type is not network connect event: " + mType);
}
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
- out.writeString(mType);
- out.writeInt(mKeyValuePairs.size());
- out.writeMap(mKeyValuePairs);
+ out.writeInt(mType);
+ switch (mType) {
+ case SECURITY_EVENT:
+ out.writeParcelable(mSecurityEvent, flags);
+ break;
+ case NETWORK_EVENT_DNS:
+ out.writeParcelable(mNetworkEventDns, flags);
+ break;
+ case NETWORK_EVENT_CONNECT:
+ out.writeParcelable(mNetworkEventConnect, flags);
+ break;
+ default:
+ throw new IllegalArgumentException("Invalid event type: " + mType);
+ }
}
@FlaggedApi(Flags.FLAG_AFL_API)
@@ -86,7 +172,6 @@ public final class ForensicEvent implements Parcelable {
public String toString() {
return "ForensicEvent{"
+ "mType=" + mType
- + ", mKeyValuePairs=" + mKeyValuePairs
+ '}';
}
}
diff --git a/core/java/android/telephony/PhoneStateListener.java b/core/java/android/telephony/PhoneStateListener.java
index 1df3b4332754..c16a510ed729 100644
--- a/core/java/android/telephony/PhoneStateListener.java
+++ b/core/java/android/telephony/PhoneStateListener.java
@@ -1712,6 +1712,15 @@ public class PhoneStateListener {
@NonNull NtnSignalStrength ntnSignalStrength) {
// not supported on the deprecated interface - Use TelephonyCallback instead
}
+
+ public final void onSecurityAlgorithmsChanged(SecurityAlgorithmUpdate update) {
+ // not supported on the deprecated interface - Use TelephonyCallback instead
+ }
+
+ public final void onCellularIdentifierDisclosedChanged(
+ CellularIdentifierDisclosure disclosure) {
+ // not supported on the deprecated interface - Use TelephonyCallback instead
+ }
}
private void log(String s) {
diff --git a/core/java/android/telephony/TelephonyCallback.java b/core/java/android/telephony/TelephonyCallback.java
index 0d1dc4611343..2c585e640fdd 100644
--- a/core/java/android/telephony/TelephonyCallback.java
+++ b/core/java/android/telephony/TelephonyCallback.java
@@ -705,6 +705,28 @@ public class TelephonyCallback {
public static final int EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED = 45;
/**
+ * Event for changes to mobile network ciphering algorithms.
+ * See {@link SecurityAlgorithmsListener#onSecurityAlgorithmsChanged}
+ *
+ * @hide
+ */
+ @FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @SystemApi
+ public static final int EVENT_SECURITY_ALGORITHMS_CHANGED = 46;
+
+ /**
+ * Event for updates to sensitive device identifier disclosures (IMSI, IMEI, unciphered SUCI).
+ * See {@link CellularIdentifierDisclosedListener#onCellularIdentifierDisclosedChanged}
+ *
+ * @hide
+ */
+ @FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @SystemApi
+ public static final int EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED = 47;
+
+ /**
* @hide
*/
@IntDef(prefix = {"EVENT_"}, value = {
@@ -752,7 +774,9 @@ public class TelephonyCallback {
EVENT_CARRIER_ROAMING_NTN_MODE_CHANGED,
EVENT_CARRIER_ROAMING_NTN_ELIGIBLE_STATE_CHANGED,
EVENT_CARRIER_ROAMING_NTN_AVAILABLE_SERVICES_CHANGED,
- EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED
+ EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED,
+ EVENT_SECURITY_ALGORITHMS_CHANGED,
+ EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED
})
@Retention(RetentionPolicy.SOURCE)
public @interface TelephonyEvent {
@@ -1827,6 +1851,41 @@ public class TelephonyCallback {
}
/**
+ * Interface for CellularIdentifierDisclosedListener
+ * @hide
+ */
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
+ public interface CellularIdentifierDisclosedListener {
+ /**
+ * Callback invoked when a device identifier (IMSI, IMEI, or unciphered SUCI)
+ * is disclosed over the network before a security context is established
+ * ("pre-authentication").
+ *
+ * @param disclosure details of the identifier disclosure
+ * See {@link CellularIdentifierDisclosure} for more details
+ */
+ void onCellularIdentifierDisclosedChanged(@NonNull CellularIdentifierDisclosure disclosure);
+ }
+
+ /**
+ * Interface for SecurityAlgorithmsListener
+ * @hide
+ */
+ @SystemApi
+ @FlaggedApi(Flags.FLAG_SECURITY_ALGORITHMS_UPDATE_INDICATIONS)
+ public interface SecurityAlgorithmsListener {
+ /**
+ * Callback invoked when the most recently reported security algorithms has changed,
+ * per a specified connection event.
+ *
+ * @param securityAlgorithmUpdate details of the security algorithm update
+ * See {@link SecurityAlgorithmUpdate} for more details
+ */
+ void onSecurityAlgorithmsChanged(@NonNull SecurityAlgorithmUpdate securityAlgorithmUpdate);
+ }
+
+ /**
* The callback methods need to be called on the handler thread where
* this object was created. If the binder did that for us it'd be nice.
* <p>
@@ -2302,5 +2361,27 @@ public class TelephonyCallback {
() -> listener.onCarrierRoamingNtnSignalStrengthChanged(ntnSignalStrength)));
}
+
+ public void onSecurityAlgorithmsChanged(SecurityAlgorithmUpdate update) {
+ if (!Flags.securityAlgorithmsUpdateIndications()) return;
+
+ SecurityAlgorithmsListener listener =
+ (SecurityAlgorithmsListener) mTelephonyCallbackWeakRef.get();
+ if (listener == null) return;
+
+ Binder.withCleanCallingIdentity(() -> mExecutor.execute(
+ () -> listener.onSecurityAlgorithmsChanged(update)));
+ }
+
+ public void onCellularIdentifierDisclosedChanged(CellularIdentifierDisclosure disclosure) {
+ if (!Flags.cellularIdentifierDisclosureIndications()) return;
+
+ CellularIdentifierDisclosedListener listener =
+ (CellularIdentifierDisclosedListener) mTelephonyCallbackWeakRef.get();
+ if (listener == null) return;
+
+ Binder.withCleanCallingIdentity(() -> mExecutor.execute(
+ () -> listener.onCellularIdentifierDisclosedChanged(disclosure)));
+ }
}
}
diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java
index 90b0bb34c145..4ec429d0c4ad 100644
--- a/core/java/android/telephony/TelephonyRegistryManager.java
+++ b/core/java/android/telephony/TelephonyRegistryManager.java
@@ -1154,6 +1154,40 @@ public class TelephonyRegistryManager {
}
}
+ /**
+ * Notify external listeners that the radio security algorithms have changed.
+ * @param slotIndex for the phone object that got updated
+ * @param subId for which the security algorithm changed
+ * @param update details of the security algorithm update
+ * @hide
+ */
+ public void notifySecurityAlgorithmsChanged(
+ int slotIndex, int subId, SecurityAlgorithmUpdate update) {
+ try {
+ sRegistry.notifySecurityAlgorithmsChanged(slotIndex, subId, update);
+ } catch (RemoteException ex) {
+ // system server crash
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Notify external listeners of a new cellular identifier disclosure change.
+ * @param slotIndex for the phone object that the disclosure applies to
+ * @param subId for which the disclosure applies to
+ * @param disclosure details of the identifier disclosure
+ * @hide
+ */
+ public void notifyCellularIdentifierDisclosedChanged(
+ int slotIndex, int subId, CellularIdentifierDisclosure disclosure) {
+ try {
+ sRegistry.notifyCellularIdentifierDisclosedChanged(slotIndex, subId, disclosure);
+ } catch (RemoteException ex) {
+ // system server crash
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
/**
* Processes potential event changes from the provided {@link TelephonyCallback}.
*
@@ -1313,6 +1347,15 @@ public class TelephonyRegistryManager {
eventList.add(TelephonyCallback.EVENT_CARRIER_ROAMING_NTN_AVAILABLE_SERVICES_CHANGED);
eventList.add(TelephonyCallback.EVENT_CARRIER_ROAMING_NTN_SIGNAL_STRENGTH_CHANGED);
}
+
+ if (telephonyCallback instanceof TelephonyCallback.CellularIdentifierDisclosedListener) {
+ eventList.add(TelephonyCallback.EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED);
+ }
+
+ if (telephonyCallback instanceof TelephonyCallback.SecurityAlgorithmsListener) {
+ eventList.add(TelephonyCallback.EVENT_SECURITY_ALGORITHMS_CHANGED);
+ }
+
return eventList;
}
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java
index 5a28d5f7fc01..80ae3c3d4e73 100644
--- a/core/java/android/view/ScaleGestureDetector.java
+++ b/core/java/android/view/ScaleGestureDetector.java
@@ -437,16 +437,16 @@ public class ScaleGestureDetector {
}
}
- /**
- * Return whether the quick scale gesture, in which the user performs a double tap followed by a
- * swipe, should perform scaling. {@see #setQuickScaleEnabled(boolean)}.
- */
+ /**
+ * Return whether the quick scale gesture, in which the user performs a double tap followed by a
+ * swipe, should perform scaling. {@see #setQuickScaleEnabled(boolean)}.
+ */
public boolean isQuickScaleEnabled() {
return mQuickScaleEnabled;
}
/**
- * Sets whether the associates {@link OnScaleGestureListener} should receive
+ * Sets whether the associated {@link OnScaleGestureListener} should receive
* onScale callbacks when the user uses a stylus and presses the button.
* Note that this is enabled by default if the app targets API 23 and newer.
*
diff --git a/core/java/com/android/internal/app/IAppOpsService.aidl b/core/java/com/android/internal/app/IAppOpsService.aidl
index 3ec70649294b..2cfc680a3fe8 100644
--- a/core/java/com/android/internal/app/IAppOpsService.aidl
+++ b/core/java/com/android/internal/app/IAppOpsService.aidl
@@ -152,7 +152,7 @@ interface IAppOpsService {
in AttributionSourceState attributionSourceStateState, boolean skipProxyOperation);
int checkOperationRawForDevice(int code, int uid, String packageName,
@nullable String attributionTag, int virtualDeviceId);
- int checkOperationForDevice(int code, int uid, String packageName, int virtualDeviceId);
+ int checkOperationForDevice(int code, int uid, String packageName, @nullable String attributionTag, int virtualDeviceId);
SyncNotedAppOp noteOperationForDevice(int code, int uid, String packageName,
@nullable String attributionTag, int virtualDeviceId,
boolean shouldCollectAsyncNotedOp, String message, boolean shouldCollectMessage);
diff --git a/core/java/com/android/internal/pm/pkg/parsing/ParsingPackageUtils.java b/core/java/com/android/internal/pm/pkg/parsing/ParsingPackageUtils.java
index 6db3c4dba0e6..8a6e6be1abbf 100644
--- a/core/java/com/android/internal/pm/pkg/parsing/ParsingPackageUtils.java
+++ b/core/java/com/android/internal/pm/pkg/parsing/ParsingPackageUtils.java
@@ -2377,7 +2377,6 @@ public class ParsingPackageUtils {
* Flags are separated by type and by default value. They are sorted alphabetically within each
* section.
*/
- @SuppressWarnings("AndroidFrameworkCompatChange")
private void parseBaseAppBasicFlags(ParsingPackage pkg, TypedArray sa) {
int targetSdk = pkg.getTargetSdkVersion();
//@formatter:off
@@ -2415,19 +2414,12 @@ public class ParsingPackageUtils {
.setResetEnabledSettingsOnAppDataCleared(bool(false,
R.styleable.AndroidManifestApplication_resetEnabledSettingsOnAppDataCleared,
sa))
+ .setOnBackInvokedCallbackEnabled(bool(false, R.styleable.AndroidManifestApplication_enableOnBackInvokedCallback, sa))
// targetSdkVersion gated
.setAllowAudioPlaybackCapture(bool(targetSdk >= Build.VERSION_CODES.Q, R.styleable.AndroidManifestApplication_allowAudioPlaybackCapture, sa))
.setHardwareAccelerated(bool(targetSdk >= Build.VERSION_CODES.ICE_CREAM_SANDWICH, R.styleable.AndroidManifestApplication_hardwareAccelerated, sa))
.setRequestLegacyExternalStorage(bool(targetSdk < Build.VERSION_CODES.Q, R.styleable.AndroidManifestApplication_requestLegacyExternalStorage, sa))
.setCleartextTrafficAllowed(bool(targetSdk < Build.VERSION_CODES.P, R.styleable.AndroidManifestApplication_usesCleartextTraffic, sa))
- // CompatChange.isChangeEnabled() can't be used here because this is called during
- // PackageManagerService initialization. PlatformCompat can't be used because this
- // code is not guaranteed to be called from the system_server process. Therefore
- // accessing Build.VERSION_CODES directly and suppressing
- // AndroidFrameworkCompatChange warning
- .setOnBackInvokedCallbackEnabled(bool(
- targetSdk > Build.VERSION_CODES.VANILLA_ICE_CREAM,
- R.styleable.AndroidManifestApplication_enableOnBackInvokedCallback, sa))
// Ints Default 0
.setUiOptions(anInt(R.styleable.AndroidManifestApplication_uiOptions, sa))
// Ints
diff --git a/core/java/com/android/internal/policy/IDeviceLockedStateListener.aidl b/core/java/com/android/internal/policy/IDeviceLockedStateListener.aidl
new file mode 100644
index 000000000000..cc626f699d43
--- /dev/null
+++ b/core/java/com/android/internal/policy/IDeviceLockedStateListener.aidl
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2024 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.policy;
+
+oneway interface IDeviceLockedStateListener {
+ void onDeviceLockedStateChanged(boolean isDeviceLocked);
+} \ No newline at end of file
diff --git a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl
index 0e85e046e1b6..bf8a56508f54 100644
--- a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl
+++ b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl
@@ -20,6 +20,7 @@ import android.telephony.BarringInfo;
import android.telephony.CallState;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
+import android.telephony.CellularIdentifierDisclosure;
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.LinkCapacityEstimate;
import android.telephony.TelephonyDisplayInfo;
@@ -28,6 +29,7 @@ import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.satellite.NtnSignalStrength;
+import android.telephony.SecurityAlgorithmUpdate;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.emergency.EmergencyNumber;
@@ -87,4 +89,6 @@ oneway interface IPhoneStateListener {
void onCarrierRoamingNtnEligibleStateChanged(in boolean eligible);
void onCarrierRoamingNtnAvailableServicesChanged(in int[] availableServices);
void onCarrierRoamingNtnSignalStrengthChanged(in NtnSignalStrength ntnSignalStrength);
+ void onSecurityAlgorithmsChanged(in SecurityAlgorithmUpdate update);
+ void onCellularIdentifierDisclosedChanged(in CellularIdentifierDisclosure disclosure);
}
diff --git a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index 0f268d5de62b..a296fbd1cfe4 100644
--- a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -23,6 +23,7 @@ import android.telephony.BarringInfo;
import android.telephony.CallQuality;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
+import android.telephony.CellularIdentifierDisclosure;
import android.telephony.LinkCapacityEstimate;
import android.telephony.TelephonyDisplayInfo;
import android.telephony.ims.ImsReasonInfo;
@@ -30,6 +31,7 @@ import android.telephony.PhoneCapability;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseDataConnectionState;
import android.telephony.satellite.NtnSignalStrength;
+import android.telephony.SecurityAlgorithmUpdate;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.emergency.EmergencyNumber;
@@ -132,4 +134,7 @@ interface ITelephonyRegistry {
void removeSatelliteStateChangeListener(ISatelliteStateChangeListener listener, String pkg);
void notifySatelliteStateChanged(boolean isEnabled);
+ void notifySecurityAlgorithmsChanged(int phoneId, int subId, in SecurityAlgorithmUpdate update);
+ void notifyCellularIdentifierDisclosedChanged(
+ int phoneId, int subId, in CellularIdentifierDisclosure disclosure);
}
diff --git a/core/java/com/android/internal/widget/NotificationProgressBar.java b/core/java/com/android/internal/widget/NotificationProgressBar.java
index f2b36c3b9981..7a21275d611e 100644
--- a/core/java/com/android/internal/widget/NotificationProgressBar.java
+++ b/core/java/com/android/internal/widget/NotificationProgressBar.java
@@ -59,6 +59,8 @@ import java.util.TreeSet;
public final class NotificationProgressBar extends ProgressBar {
private static final String TAG = "NotificationProgressBar";
+ private NotificationProgressDrawable mNotificationProgressDrawable;
+
private NotificationProgressModel mProgressModel;
@Nullable
@@ -94,6 +96,12 @@ public final class NotificationProgressBar extends ProgressBar {
defStyleAttr,
defStyleRes);
+ try {
+ mNotificationProgressDrawable = getNotificationProgressDrawable();
+ } catch (IllegalStateException ex) {
+ Log.e(TAG, "Can't get NotificationProgressDrawable", ex);
+ }
+
// Supports setting the tracker in xml, but ProgressStyle notifications set/override it
// via {@code setProgressTrackerIcon}.
final Drawable tracker = a.getDrawable(R.styleable.NotificationProgressBar_tracker);
@@ -131,11 +139,8 @@ public final class NotificationProgressBar extends ProgressBar {
progressMax,
mProgressModel.isStyledByProgress());
- try {
- final NotificationProgressDrawable drawable = getNotificationProgressDrawable();
- drawable.setParts(mProgressDrawableParts);
- } catch (IllegalStateException ex) {
- Log.e(TAG, "Can't set parts because can't get NotificationProgressDrawable", ex);
+ if (mNotificationProgressDrawable != null) {
+ mNotificationProgressDrawable.setParts(mProgressDrawableParts);
}
setMax(progressMax);
@@ -195,10 +200,6 @@ public final class NotificationProgressBar extends ProgressBar {
}
private void setTracker(@Nullable Drawable tracker) {
- if (isIndeterminate() && tracker != null) {
- return;
- }
-
final boolean needUpdate = mTracker != null && tracker != mTracker;
if (needUpdate) {
mTracker.setCallback(null);
@@ -222,6 +223,9 @@ public final class NotificationProgressBar extends ProgressBar {
}
mTracker = tracker;
+ if (mNotificationProgressDrawable != null) {
+ mNotificationProgressDrawable.setHasTrackerIcon(mTracker != null);
+ }
configureTrackerBounds();
@@ -275,16 +279,6 @@ public final class NotificationProgressBar extends ProgressBar {
}
@Override
- @RemotableViewMethod
- public synchronized void setIndeterminate(boolean indeterminate) {
- super.setIndeterminate(indeterminate);
-
- if (isIndeterminate()) {
- setTracker(null);
- }
- }
-
- @Override
protected boolean verifyDrawable(@NonNull Drawable who) {
return who == mTracker || super.verifyDrawable(who);
}
@@ -421,6 +415,8 @@ public final class NotificationProgressBar extends ProgressBar {
@Override
protected synchronized void onDraw(Canvas canvas) {
super.onDraw(canvas);
+
+ if (isIndeterminate()) return;
drawTracker(canvas);
}
diff --git a/core/java/com/android/internal/widget/NotificationProgressDrawable.java b/core/java/com/android/internal/widget/NotificationProgressDrawable.java
index fb6937c94a3e..e95225eede99 100644
--- a/core/java/com/android/internal/widget/NotificationProgressDrawable.java
+++ b/core/java/com/android/internal/widget/NotificationProgressDrawable.java
@@ -23,7 +23,6 @@ import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
-import android.graphics.DashPathEffect;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
@@ -62,21 +61,15 @@ public final class NotificationProgressDrawable extends Drawable {
private boolean mMutated;
private final ArrayList<Part> mParts = new ArrayList<>();
+ private boolean mHasTrackerIcon;
private final RectF mSegRectF = new RectF();
private final Rect mPointRect = new Rect();
private final RectF mPointRectF = new RectF();
- private final Paint mStrokePaint = new Paint();
- private final Paint mDashedStrokePaint = new Paint();
private final Paint mFillPaint = new Paint();
{
- mStrokePaint.setStyle(Paint.Style.STROKE);
- mStrokePaint.setStrokeCap(Paint.Cap.ROUND);
-
- mDashedStrokePaint.setStyle(Paint.Style.STROKE);
-
mFillPaint.setStyle(Paint.Style.FILL);
}
@@ -87,49 +80,15 @@ public final class NotificationProgressDrawable extends Drawable {
}
/**
- * <p>Set the stroke width and default color for the drawable.</p>
- * <p>Note: changing this property will affect all instances of a drawable loaded from a
- * resource. It is recommended to invoke
- * {@link #mutate()} before changing this property.</p>
- *
- * @param width The width in pixels of the stroke
- * @param color The color of the stroke
- * @see #mutate()
- * @see #setStroke(int, int, float, float)
- */
- public void setStroke(int width, @ColorInt int color) {
- setStroke(width, color, 0, 0);
- }
-
- /**
- * <p>Set the stroke width and default color for the drawable. This method can also be used
- * to dash the stroke for the dashed segments.</p>
- * <p>Note: changing this property will affect all instances of a drawable loaded from a
- * resource. It is recommended to invoke {@link #mutate()} before changing this property.</p>
- *
- * @param width The width in pixels of the stroke
- * @param color The color of the stroke
- * @param dashWidth The length in pixels of the dashes, set to 0 to disable dashes
- * @param dashGap The gap in pixels between dashes
- * @see #mutate()
- * @see #setStroke(int, int)
- */
- public void setStroke(int width, @ColorInt int color, float dashWidth, float dashGap) {
- mState.setStroke(width, color, dashWidth, dashGap);
- setStrokeInternal(width, dashWidth, dashGap);
- }
-
- /**
- * <p>Set the stroke default color for the drawable.</p>
+ * <p>Set the segment default color for the drawable.</p>
* <p>Note: changing this property will affect all instances of a drawable loaded from a
* resource. It is recommended to invoke {@link #mutate()} before changing this property.</p>
*
* @param color The color of the stroke
* @see #mutate()
- * @see #setStroke(int, int, float, float)
*/
- public void setStrokeDefaultColor(@ColorInt int color) {
- mState.setStrokeColor(color);
+ public void setSegmentDefaultColor(@ColorInt int color) {
+ mState.setSegmentColor(color);
}
/**
@@ -144,25 +103,14 @@ public final class NotificationProgressDrawable extends Drawable {
mState.setPointRectColor(color);
}
- private void setStrokeInternal(int width, float dashWidth, float dashGap) {
- mStrokePaint.setStrokeWidth(width);
-
- mDashedStrokePaint.setStrokeWidth(width);
- DashPathEffect e = null;
- if (dashWidth > 0) {
- e = new DashPathEffect(new float[] { dashWidth, dashGap }, 0);
- }
- mDashedStrokePaint.setPathEffect(e);
-
- invalidateSelf();
- }
-
/**
* Set the segments and points that constitute the drawable.
*/
public void setParts(List<Part> parts) {
mParts.clear();
mParts.addAll(parts);
+
+ invalidateSelf();
}
/**
@@ -172,6 +120,16 @@ public final class NotificationProgressDrawable extends Drawable {
setParts(Arrays.asList(parts));
}
+ /**
+ * Set whether a tracker is drawn on top of this NotificationProgressDrawable.
+ */
+ public void setHasTrackerIcon(boolean hasTrackerIcon) {
+ if (mHasTrackerIcon != hasTrackerIcon) {
+ mHasTrackerIcon = hasTrackerIcon;
+ invalidateSelf();
+ }
+ }
+
@Override
public void draw(@NonNull Canvas canvas) {
final float pointRadius =
@@ -181,6 +139,7 @@ public final class NotificationProgressDrawable extends Drawable {
float x = (float) getBounds().left;
final float centerY = (float) getBounds().centerY();
final float totalWidth = (float) getBounds().width();
+ float segPointGap = mState.mSegPointGap;
final int numParts = mParts.size();
for (int iPart = 0; iPart < numParts; iPart++) {
@@ -188,15 +147,19 @@ public final class NotificationProgressDrawable extends Drawable {
final Part prevPart = iPart == 0 ? null : mParts.get(iPart - 1);
final Part nextPart = iPart + 1 == numParts ? null : mParts.get(iPart + 1);
if (part instanceof Segment segment) {
+ // Update the segment-point gap to 2X upon seeing the first faded segment.
+ // (Assuming that all segments before are solid, and all segments after are faded.)
+ if (segment.mFaded) {
+ segPointGap = mState.mSegPointGap * 2;
+ }
final float segWidth = segment.mFraction * totalWidth;
// Advance the start position to account for a point immediately prior.
- final float startOffset = getSegStartOffset(prevPart, pointRadius,
- mState.mSegPointGap, x);
+ final float startOffset = getSegStartOffset(prevPart, pointRadius, segPointGap, x);
final float start = x + startOffset;
// Retract the end position to account for the padding and a point immediately
// after.
- final float endOffset = getSegEndOffset(nextPart, pointRadius, mState.mSegPointGap,
- mState.mSegSegGap, x + segWidth, totalWidth);
+ final float endOffset = getSegEndOffset(segment, nextPart, pointRadius, segPointGap,
+ mState.mSegSegGap, x + segWidth, totalWidth, mHasTrackerIcon);
final float end = x + segWidth - endOffset;
// Advance the current position to account for the segment's fraction of the total
@@ -206,35 +169,15 @@ public final class NotificationProgressDrawable extends Drawable {
// No space left to draw the segment
if (start > end) continue;
- if (segment.mDashed) {
- // No caps when the segment is dashed.
-
- mDashedStrokePaint.setColor(segment.mColor != Color.TRANSPARENT ? segment.mColor
- : mState.mFadedStrokeColor);
- canvas.drawLine(start, centerY, end, centerY, mDashedStrokePaint);
- } else if (end - start < mState.mStrokeWidth) {
- // Not enough segment length to draw the caps
-
- final float rad = (end - start) / 2F;
- final float capWidth = mStrokePaint.getStrokeWidth() / 2F;
-
- mFillPaint.setColor(segment.mColor != Color.TRANSPARENT ? segment.mColor
- : mState.mStrokeColor);
-
- mSegRectF.set(start, centerY - capWidth, end, centerY + capWidth);
- canvas.drawRoundRect(mSegRectF, rad, rad, mFillPaint);
- } else {
- // Leave space for the rounded line cap which extends beyond start/end.
- final float capWidth = mStrokePaint.getStrokeWidth() / 2F;
+ final float radiusY = segment.mFaded ? mState.mFadedSegmentHeight / 2F
+ : mState.mSegmentHeight / 2F;
+ final float cornerRadius = mState.mSegmentCornerRadius;
- // Transparent is not allowed (and also is the default in the data), so use that
- // as a sentinel to be replaced by default
- mStrokePaint.setColor(segment.mColor != Color.TRANSPARENT ? segment.mColor
- : mState.mStrokeColor);
+ mFillPaint.setColor(segment.mColor != Color.TRANSPARENT ? segment.mColor
+ : (segment.mFaded ? mState.mFadedSegmentColor : mState.mSegmentColor));
- canvas.drawLine(start + capWidth, centerY, end - capWidth, centerY,
- mStrokePaint);
- }
+ mSegRectF.set(start, centerY - radiusY, end, centerY + radiusY);
+ canvas.drawRoundRect(mSegRectF, cornerRadius, cornerRadius, mFillPaint);
} else if (part instanceof Point point) {
final float pointWidth = 2 * pointRadius;
float start = x - pointRadius;
@@ -275,10 +218,17 @@ public final class NotificationProgressDrawable extends Drawable {
return pointOffset + pointRadius + segPointGap;
}
- private static float getSegEndOffset(Part nextPart, float pointRadius, float segPointGap,
- float segSegGap, float endX, float totalWidth) {
+ private static float getSegEndOffset(Segment seg, Part nextPart, float pointRadius,
+ float segPointGap,
+ float segSegGap, float endX, float totalWidth, boolean hasTrackerIcon) {
if (nextPart == null) return 0F;
- if (!(nextPart instanceof Point)) return segSegGap;
+ if (nextPart instanceof Segment nextSeg) {
+ if (!seg.mFaded && nextSeg.mFaded) {
+ // @see Segment#mFaded
+ return hasTrackerIcon ? 0F : segSegGap * 4F;
+ }
+ return segSegGap;
+ }
final float pointWidth = 2 * pointRadius;
final float pointOffset = (endX + pointRadius > totalWidth && totalWidth > pointWidth)
@@ -439,21 +389,17 @@ public final class NotificationProgressDrawable extends Drawable {
// Extract the theme attributes, if any.
state.mThemeAttrsSegments = a.extractThemeAttrs();
- final int width = a.getDimensionPixelSize(
- R.styleable.NotificationProgressDrawableSegments_width, state.mStrokeWidth);
- final float dashWidth = a.getDimension(
- R.styleable.NotificationProgressDrawableSegments_dashWidth, state.mStrokeDashWidth);
-
+ state.mSegmentHeight = a.getDimension(
+ R.styleable.NotificationProgressDrawableSegments_height, state.mSegmentHeight);
+ state.mFadedSegmentHeight = a.getDimension(
+ R.styleable.NotificationProgressDrawableSegments_fadedHeight,
+ state.mFadedSegmentHeight);
+ state.mSegmentCornerRadius = a.getDimension(
+ R.styleable.NotificationProgressDrawableSegments_cornerRadius,
+ state.mSegmentCornerRadius);
final int color = a.getColor(R.styleable.NotificationProgressDrawableSegments_color,
- state.mStrokeColor);
-
- if (dashWidth != 0.0f) {
- final float dashGap = a.getDimension(
- R.styleable.NotificationProgressDrawableSegments_dashGap, state.mStrokeDashGap);
- setStroke(width, color, dashWidth, dashGap);
- } else {
- setStroke(width, color);
- }
+ state.mSegmentColor);
+ setSegmentDefaultColor(color);
}
private void updatePointsFromTypedArray(TypedArray a) {
@@ -532,11 +478,24 @@ public final class NotificationProgressDrawable extends Drawable {
/**
* A segment is a part of the progress bar with non-zero length. For example, it can
* represent a portion in a navigation journey with certain traffic condition.
+ *
*/
public static final class Segment implements Part {
private final float mFraction;
@ColorInt private final int mColor;
- private final boolean mDashed;
+ /** Whether the segment is faded or not.
+ * <p>
+ * <pre>
+ * When mFaded is set to true, a combination of the following is done to the segment:
+ * 1. The drawing color is mColor with opacity updated to 15%.
+ * 2. The segment-point gap is 2X the segment-point gap for non-faded segments.
+ * 3. The gap between faded and non-faded segments is:
+ * 4X the segment-segment gap, when there is no tracker icon
+ * 0, when there is tracker icon
+ * </pre>
+ * </p>
+ */
+ private final boolean mFaded;
public Segment(float fraction) {
this(fraction, Color.TRANSPARENT);
@@ -546,10 +505,10 @@ public final class NotificationProgressDrawable extends Drawable {
this(fraction, color, false);
}
- public Segment(float fraction, @ColorInt int color, boolean dashed) {
+ public Segment(float fraction, @ColorInt int color, boolean faded) {
mFraction = fraction;
mColor = color;
- mDashed = dashed;
+ mFaded = faded;
}
public float getFraction() {
@@ -560,14 +519,14 @@ public final class NotificationProgressDrawable extends Drawable {
return this.mColor;
}
- public boolean getDashed() {
- return this.mDashed;
+ public boolean getFaded() {
+ return this.mFaded;
}
@Override
public String toString() {
- return "Segment(fraction=" + this.mFraction + ", color=" + this.mColor + ", dashed="
- + this.mDashed + ')';
+ return "Segment(fraction=" + this.mFraction + ", color=" + this.mColor + ", faded="
+ + this.mFaded + ')';
}
// Needed for unit tests
@@ -580,12 +539,12 @@ public final class NotificationProgressDrawable extends Drawable {
Segment that = (Segment) other;
if (Float.compare(this.mFraction, that.mFraction) != 0) return false;
if (this.mColor != that.mColor) return false;
- return this.mDashed == that.mDashed;
+ return this.mFaded == that.mFaded;
}
@Override
public int hashCode() {
- return Objects.hash(mFraction, mColor, mDashed);
+ return Objects.hash(mFraction, mColor, mFaded);
}
}
@@ -675,11 +634,11 @@ public final class NotificationProgressDrawable extends Drawable {
int mChangingConfigurations;
float mSegSegGap = 0.0f;
float mSegPointGap = 0.0f;
- int mStrokeWidth = 0;
- int mStrokeColor;
- int mFadedStrokeColor;
- float mStrokeDashWidth = 0.0f;
- float mStrokeDashGap = 0.0f;
+ float mSegmentHeight;
+ float mFadedSegmentHeight;
+ float mSegmentCornerRadius;
+ int mSegmentColor;
+ int mFadedSegmentColor;
float mPointRadius;
float mPointRectInset;
float mPointRectCornerRadius;
@@ -699,11 +658,11 @@ public final class NotificationProgressDrawable extends Drawable {
mChangingConfigurations = orig.mChangingConfigurations;
mSegSegGap = orig.mSegSegGap;
mSegPointGap = orig.mSegPointGap;
- mStrokeWidth = orig.mStrokeWidth;
- mStrokeColor = orig.mStrokeColor;
- mFadedStrokeColor = orig.mFadedStrokeColor;
- mStrokeDashWidth = orig.mStrokeDashWidth;
- mStrokeDashGap = orig.mStrokeDashGap;
+ mSegmentHeight = orig.mSegmentHeight;
+ mFadedSegmentHeight = orig.mFadedSegmentHeight;
+ mSegmentCornerRadius = orig.mSegmentCornerRadius;
+ mSegmentColor = orig.mSegmentColor;
+ mFadedSegmentColor = orig.mFadedSegmentColor;
mPointRadius = orig.mPointRadius;
mPointRectInset = orig.mPointRectInset;
mPointRectCornerRadius = orig.mPointRectCornerRadius;
@@ -721,17 +680,17 @@ public final class NotificationProgressDrawable extends Drawable {
}
private void applyDensityScaling(int sourceDensity, int targetDensity) {
- if (mStrokeWidth > 0) {
- mStrokeWidth = scaleFromDensity(
- mStrokeWidth, sourceDensity, targetDensity, true);
+ if (mSegmentHeight > 0) {
+ mSegmentHeight = scaleFromDensity(
+ mSegmentHeight, sourceDensity, targetDensity);
}
- if (mStrokeDashWidth > 0) {
- mStrokeDashWidth = scaleFromDensity(
- mStrokeDashWidth, sourceDensity, targetDensity);
+ if (mFadedSegmentHeight > 0) {
+ mFadedSegmentHeight = scaleFromDensity(
+ mFadedSegmentHeight, sourceDensity, targetDensity);
}
- if (mStrokeDashGap > 0) {
- mStrokeDashGap = scaleFromDensity(
- mStrokeDashGap, sourceDensity, targetDensity);
+ if (mSegmentCornerRadius > 0) {
+ mSegmentCornerRadius = scaleFromDensity(
+ mSegmentCornerRadius, sourceDensity, targetDensity);
}
if (mPointRadius > 0) {
mPointRadius = scaleFromDensity(
@@ -788,17 +747,9 @@ public final class NotificationProgressDrawable extends Drawable {
}
}
- public void setStroke(int width, int color, float dashWidth, float dashGap) {
- mStrokeWidth = width;
- mStrokeDashWidth = dashWidth;
- mStrokeDashGap = dashGap;
-
- setStrokeColor(color);
- }
-
- public void setStrokeColor(int color) {
- mStrokeColor = color;
- mFadedStrokeColor = getFadedColor(color);
+ public void setSegmentColor(int color) {
+ mSegmentColor = color;
+ mFadedSegmentColor = getFadedColor(color);
}
public void setPointRectColor(int color) {
@@ -808,11 +759,14 @@ public final class NotificationProgressDrawable extends Drawable {
}
/**
- * Get a color with an opacity that's 50% of the input color.
+ * Get a color with an opacity that's 25% of the input color.
*/
@ColorInt
static int getFadedColor(@ColorInt int color) {
- return Color.argb(Color.alpha(color) / 2, Color.red(color), Color.green(color),
+ return Color.argb(
+ (int) (Color.alpha(color) * 0.25f + 0.5f),
+ Color.red(color),
+ Color.green(color),
Color.blue(color));
}
@@ -836,15 +790,6 @@ public final class NotificationProgressDrawable extends Drawable {
}
private void updateLocalState() {
- final State state = mState;
-
- mStrokePaint.setStrokeWidth(state.mStrokeWidth);
- mDashedStrokePaint.setStrokeWidth(state.mStrokeWidth);
-
- if (state.mStrokeDashWidth != 0.0f) {
- final DashPathEffect e = new DashPathEffect(
- new float[] { state.mStrokeDashWidth, state.mStrokeDashGap }, 0);
- mDashedStrokePaint.setPathEffect(e);
- }
+ // NO-OP
}
}
diff --git a/core/java/com/android/internal/widget/NotificationRowIconView.java b/core/java/com/android/internal/widget/NotificationRowIconView.java
index 5fc61b00e331..c96e979138dd 100644
--- a/core/java/com/android/internal/widget/NotificationRowIconView.java
+++ b/core/java/com/android/internal/widget/NotificationRowIconView.java
@@ -19,12 +19,7 @@ package com.android.internal.widget;
import android.annotation.Nullable;
import android.app.Flags;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapShader;
-import android.graphics.Canvas;
-import android.graphics.Paint;
import android.graphics.Rect;
-import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.util.AttributeSet;
@@ -41,7 +36,6 @@ import android.widget.RemoteViews;
public class NotificationRowIconView extends CachingIconView {
private NotificationIconProvider mIconProvider;
- private boolean mApplyCircularCrop = false;
private Drawable mAppIcon = null;
// Padding, background and colors set on the view prior to being overridden when showing the app
@@ -221,84 +215,6 @@ public class NotificationRowIconView extends CachingIconView {
}
}
- @Nullable
- @Override
- Drawable loadSizeRestrictedIcon(@Nullable Icon icon) {
- final Drawable original = super.loadSizeRestrictedIcon(icon);
- final Drawable result;
- if (mApplyCircularCrop) {
- result = makeCircularDrawable(original);
- } else {
- result = original;
- }
-
- return result;
- }
-
- /**
- * Enables circle crop that makes given image circular
- */
- @RemotableViewMethod(asyncImpl = "setApplyCircularCropAsync")
- public void setApplyCircularCrop(boolean applyCircularCrop) {
- mApplyCircularCrop = applyCircularCrop;
- }
-
- /**
- * Async version of {@link NotificationRowIconView#setApplyCircularCrop}
- */
- public Runnable setApplyCircularCropAsync(boolean applyCircularCrop) {
- mApplyCircularCrop = applyCircularCrop;
- return () -> {
- };
- }
-
- @Nullable
- private Drawable makeCircularDrawable(@Nullable Drawable original) {
- if (original == null) {
- return original;
- }
-
- final Bitmap source = drawableToBitmap(original);
-
- int size = Math.min(source.getWidth(), source.getHeight());
-
- Bitmap squared = Bitmap.createScaledBitmap(source, size, size, /* filter= */ false);
- Bitmap result = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
-
- final Canvas canvas = new Canvas(result);
- final Paint paint = new Paint();
- paint.setShader(
- new BitmapShader(squared, BitmapShader.TileMode.CLAMP,
- BitmapShader.TileMode.CLAMP));
- paint.setAntiAlias(true);
- float radius = size / 2f;
- canvas.drawCircle(radius, radius, radius, paint);
- return new BitmapDrawable(getResources(), result);
- }
-
- private static Bitmap drawableToBitmap(Drawable drawable) {
- if (drawable instanceof BitmapDrawable bitmapDrawable) {
- final Bitmap bitmap = bitmapDrawable.getBitmap();
- if (bitmap.getConfig() == Bitmap.Config.HARDWARE) {
- return bitmap.copy(Bitmap.Config.ARGB_8888, false);
- } else {
- return bitmap;
- }
- }
-
- int width = drawable.getIntrinsicWidth();
- width = width > 0 ? width : 1;
- int height = drawable.getIntrinsicHeight();
- height = height > 0 ? height : 1;
-
- Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- Canvas canvas = new Canvas(bitmap);
- drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
- drawable.draw(canvas);
-
- return bitmap;
- }
-
/**
* A provider that allows this view to verify whether it should use the app icon instead of the
* icon provided to it via setImageIcon, as well as actually fetching the app icon. It should
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index f9d00edce3fa..5a183925e38e 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -584,14 +584,23 @@ static jboolean android_media_AudioRecord_setInputDevice(
return lpRecorder->setInputDevice(device_id) == NO_ERROR;
}
-static jint android_media_AudioRecord_getRoutedDeviceId(
- JNIEnv *env, jobject thiz) {
-
+static jintArray android_media_AudioRecord_getRoutedDeviceIds(JNIEnv *env, jobject thiz) {
sp<AudioRecord> lpRecorder = getAudioRecord(env, thiz);
- if (lpRecorder == 0) {
- return 0;
+ if (lpRecorder == NULL) {
+ return NULL;
+ }
+ DeviceIdVector deviceIds = lpRecorder->getRoutedDeviceIds();
+ jintArray result;
+ result = env->NewIntArray(deviceIds.size());
+ if (result == NULL) {
+ return NULL;
+ }
+ jint *values = env->GetIntArrayElements(result, 0);
+ for (unsigned int i = 0; i < deviceIds.size(); i++) {
+ values[i++] = static_cast<jint>(deviceIds[i]);
}
- return (jint)lpRecorder->getRoutedDeviceId();
+ env->ReleaseIntArrayElements(result, values, 0);
+ return result;
}
// Enable and Disable Callback methods are synchronized on the Java side
@@ -821,8 +830,7 @@ static const JNINativeMethod gMethods[] = {
// name, signature, funcPtr
{"native_start", "(II)I", (void *)android_media_AudioRecord_start},
{"native_stop", "()V", (void *)android_media_AudioRecord_stop},
- {"native_setup",
- "(Ljava/lang/Object;Ljava/lang/Object;[IIIII[ILandroid/os/Parcel;JII)I",
+ {"native_setup", "(Ljava/lang/Object;Ljava/lang/Object;[IIIII[ILandroid/os/Parcel;JII)I",
(void *)android_media_AudioRecord_setup},
{"native_finalize", "()V", (void *)android_media_AudioRecord_finalize},
{"native_release", "()V", (void *)android_media_AudioRecord_release},
@@ -846,7 +854,7 @@ static const JNINativeMethod gMethods[] = {
{"native_getMetrics", "()Landroid/os/PersistableBundle;",
(void *)android_media_AudioRecord_native_getMetrics},
{"native_setInputDevice", "(I)Z", (void *)android_media_AudioRecord_setInputDevice},
- {"native_getRoutedDeviceId", "()I", (void *)android_media_AudioRecord_getRoutedDeviceId},
+ {"native_getRoutedDeviceIds", "()[I", (void *)android_media_AudioRecord_getRoutedDeviceIds},
{"native_enableDeviceCallback", "()V",
(void *)android_media_AudioRecord_enableDeviceCallback},
{"native_disableDeviceCallback", "()V",
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index 8eaa7aa99a2d..3d9a19e129a8 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -109,6 +109,7 @@ static struct {
// Valid only if an AudioDevicePort
jfieldID mType;
jfieldID mAddress;
+ jfieldID mSpeakerLayoutChannelMask;
// other fields unused by JNI
} gAudioPortFields;
@@ -1084,6 +1085,8 @@ static jint convertAudioPortConfigToNativeWithDevicePort(JNIEnv *env,
strncpy(nAudioPortConfig->ext.device.address,
nDeviceAddress, AUDIO_DEVICE_MAX_ADDRESS_LEN - 1);
env->ReleaseStringUTFChars(jDeviceAddress, nDeviceAddress);
+ nAudioPortConfig->ext.device.speaker_layout_channel_mask = outChannelMaskToNative(
+ env->GetIntField(jAudioDevicePort, gAudioPortFields.mSpeakerLayoutChannelMask));
env->DeleteLocalRef(jDeviceAddress);
env->DeleteLocalRef(jAudioDevicePort);
return jStatus;
@@ -1541,10 +1544,12 @@ static jint convertAudioPortFromNative(JNIEnv *env, ScopedLocalRef<jobject> *jAu
.encapsulation_metadata_types));
ALOGV("convertAudioPortFromNative is a device %08x", nAudioPort->ext.device.type);
ScopedLocalRef<jstring> jAddress(env, env->NewStringUTF(nAudioPort->ext.device.address));
+ int speakerLayoutChannelMask = outChannelMaskFromNative(
+ nAudioPort->active_config.ext.device.speaker_layout_channel_mask);
jAudioPort->reset(env->NewObject(gAudioDevicePortClass, gAudioDevicePortCstor,
jHandle.get(), jDeviceName.get(), jAudioProfiles.get(),
jGains.get(), nAudioPort->ext.device.type, jAddress.get(),
- jEncapsulationModes.get(),
+ speakerLayoutChannelMask, jEncapsulationModes.get(),
jEncapsulationMetadataTypes.get(),
jAudioDescriptors.get()));
} else if (nAudioPort->type == AUDIO_PORT_TYPE_MIX) {
@@ -3705,14 +3710,15 @@ int register_android_media_AudioSystem(JNIEnv *env)
gAudioDevicePortCstor =
GetMethodIDOrDie(env, audioDevicePortClass, "<init>",
"(Landroid/media/AudioHandle;Ljava/lang/String;Ljava/util/List;"
- "[Landroid/media/AudioGain;ILjava/lang/String;[I[I"
+ "[Landroid/media/AudioGain;ILjava/lang/String;I[I[I"
"Ljava/util/List;)V");
// When access AudioPort as AudioDevicePort
gAudioPortFields.mType = GetFieldIDOrDie(env, audioDevicePortClass, "mType", "I");
gAudioPortFields.mAddress = GetFieldIDOrDie(env, audioDevicePortClass, "mAddress",
"Ljava/lang/String;");
-
+ gAudioPortFields.mSpeakerLayoutChannelMask =
+ GetFieldIDOrDie(env, audioDevicePortClass, "mSpeakerLayoutChannelMask", "I");
jclass audioMixPortClass = FindClassOrDie(env, "android/media/AudioMixPort");
gAudioMixPortClass = MakeGlobalRefOrDie(env, audioMixPortClass);
gAudioMixPortCstor =
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index 1557f9ed47a5..5d4d1ce20e5d 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -1190,15 +1190,23 @@ static jboolean android_media_AudioTrack_setOutputDevice(
}
return lpTrack->setOutputDevice(device_id) == NO_ERROR;
}
-
-static jint android_media_AudioTrack_getRoutedDeviceId(
- JNIEnv *env, jobject thiz) {
-
+static jintArray android_media_AudioTrack_getRoutedDeviceIds(JNIEnv *env, jobject thiz) {
sp<AudioTrack> lpTrack = getAudioTrack(env, thiz);
if (lpTrack == NULL) {
- return 0;
+ return NULL;
+ }
+ DeviceIdVector deviceIds = lpTrack->getRoutedDeviceIds();
+ jintArray result;
+ result = env->NewIntArray(deviceIds.size());
+ if (result == NULL) {
+ return NULL;
+ }
+ jint *values = env->GetIntArrayElements(result, 0);
+ for (unsigned int i = 0; i < deviceIds.size(); i++) {
+ values[i++] = static_cast<jint>(deviceIds[i]);
}
- return (jint)lpTrack->getRoutedDeviceId();
+ env->ReleaseIntArrayElements(result, values, 0);
+ return result;
}
static void android_media_AudioTrack_enableDeviceCallback(
@@ -1503,7 +1511,7 @@ static const JNINativeMethod gMethods[] = {
(void *)android_media_AudioTrack_setAuxEffectSendLevel},
{"native_attachAuxEffect", "(I)I", (void *)android_media_AudioTrack_attachAuxEffect},
{"native_setOutputDevice", "(I)Z", (void *)android_media_AudioTrack_setOutputDevice},
- {"native_getRoutedDeviceId", "()I", (void *)android_media_AudioTrack_getRoutedDeviceId},
+ {"native_getRoutedDeviceIds", "()[I", (void *)android_media_AudioTrack_getRoutedDeviceIds},
{"native_enableDeviceCallback", "()V",
(void *)android_media_AudioTrack_enableDeviceCallback},
{"native_disableDeviceCallback", "()V",
diff --git a/core/jni/android_media_DeviceCallback.cpp b/core/jni/android_media_DeviceCallback.cpp
index a1a035110caf..ccdf633c842a 100644
--- a/core/jni/android_media_DeviceCallback.cpp
+++ b/core/jni/android_media_DeviceCallback.cpp
@@ -61,21 +61,20 @@ JNIDeviceCallback::~JNIDeviceCallback()
}
void JNIDeviceCallback::onAudioDeviceUpdate(audio_io_handle_t audioIo,
- audio_port_handle_t deviceId)
-{
+ const DeviceIdVector& deviceIds) {
JNIEnv *env = AndroidRuntime::getJNIEnv();
if (env == NULL) {
return;
}
- ALOGV("%s audioIo %d deviceId %d", __FUNCTION__, audioIo, deviceId);
- env->CallStaticVoidMethod(mClass,
- mPostEventFromNative,
- mObject,
- AUDIO_NATIVE_EVENT_ROUTING_CHANGE, deviceId, 0, NULL);
+ ALOGV("%s audioIo %d deviceIds %s", __FUNCTION__, audioIo, toString(deviceIds).c_str());
+ // Java should query the new device ids once it gets the event.
+ // TODO(b/378505346): Pass the deviceIds to Java to avoid race conditions.
+ env->CallStaticVoidMethod(mClass, mPostEventFromNative, mObject,
+ AUDIO_NATIVE_EVENT_ROUTING_CHANGE, 0 /*arg1*/, 0 /*arg2*/,
+ NULL /*obj*/);
if (env->ExceptionCheck()) {
ALOGW("An exception occurred while notifying an event.");
env->ExceptionClear();
}
}
-
diff --git a/core/jni/android_media_DeviceCallback.h b/core/jni/android_media_DeviceCallback.h
index 7ae788eaf058..0c9ccc89ba1a 100644
--- a/core/jni/android_media_DeviceCallback.h
+++ b/core/jni/android_media_DeviceCallback.h
@@ -31,8 +31,7 @@ public:
JNIDeviceCallback(JNIEnv* env, jobject thiz, jobject weak_thiz, jmethodID postEventFromNative);
~JNIDeviceCallback();
- virtual void onAudioDeviceUpdate(audio_io_handle_t audioIo,
- audio_port_handle_t deviceId);
+ virtual void onAudioDeviceUpdate(audio_io_handle_t audioIo, const DeviceIdVector& deviceIds);
private:
void sendEvent(int event);
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 1925b3a41b5f..593b982d4cf2 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -2201,29 +2201,9 @@ public:
return false;
}
- // Compute the count of data items we'll actually forward to Java.
- size_t count = 0;
- if (mRemovedVsyncId <= 0) {
- count = jankData.size();
- } else {
- for (const gui::JankData& frame : jankData) {
- if (frame.frameVsyncId <= mRemovedVsyncId) {
- count++;
- }
- }
- }
-
- if (count == 0) {
- return false;
- }
-
- jobjectArray jJankDataArray = env->NewObjectArray(count, gJankDataClassInfo.clazz, nullptr);
- for (size_t i = 0, j = 0; i < jankData.size() && j < count; i++) {
- // Filter any data for frames past our removal vsync.
- if (mRemovedVsyncId > 0 && jankData[i].frameVsyncId > mRemovedVsyncId) {
- continue;
- }
-
+ jobjectArray jJankDataArray =
+ env->NewObjectArray(jankData.size(), gJankDataClassInfo.clazz, nullptr);
+ for (size_t i = 0; i < jankData.size(); i++) {
// The exposed constants in SurfaceControl are simplified, so we need to translate the
// jank type we get from SF to what is exposed in Java.
int sfJankType = jankData[i].jankType;
@@ -2250,7 +2230,7 @@ public:
jankData[i].frameVsyncId, javaJankType,
jankData[i].frameIntervalNs, jankData[i].scheduledAppFrameTimeNs,
jankData[i].actualAppFrameTimeNs);
- env->SetObjectArrayElement(jJankDataArray, j++, jJankData);
+ env->SetObjectArrayElement(jJankDataArray, i, jJankData);
env->DeleteLocalRef(jJankData);
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 00424590b2c8..7fcbf19d137f 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -914,13 +914,26 @@
android:featureFlag="android.provider.user_keys" />
<!-- Allows an application to set default account for new contacts.
- <p> This permission is only granted to system applications fulfilling the Contacts app role.
+ <p>This permission is only granted to system applications fulfilling the Contacts app role.
<p>Protection level: internal|role
@SystemApi
@hide
-->
<permission android:name="android.permission.SET_DEFAULT_ACCOUNT_FOR_CONTACTS"
- android:protectionLevel="internal|role" />
+ android:protectionLevel="internal|role"
+ android:featureFlag="!android.provider.new_default_account_api_enabled"/>
+
+ <!-- Allows an application to set default account for new contacts.
+ <p>This permission is only granted to system applications fulfilling the Contacts app role
+ and the application with known signers.
+ <p>Protection level: internal|role|knownSigner
+ @SystemApi
+ @hide
+ -->
+ <permission android:name="android.permission.SET_DEFAULT_ACCOUNT_FOR_CONTACTS"
+ android:protectionLevel="internal|role|knownSigner"
+ android:knownCerts="@array/config_setContactsDefaultAccountKnownSigners"
+ android:featureFlag="android.provider.new_default_account_api_enabled"/>
<!-- ====================================================================== -->
<!-- Permissions for accessing user's calendar -->
@@ -5574,7 +5587,8 @@
<permission android:name="android.permission.BIND_VISUAL_QUERY_DETECTION_SERVICE"
android:protectionLevel="signature" />
- <!-- Allows an application to subscribe to keyguard locked (i.e., showing) state.
+ <!-- Allows an application to subscribe to device locked and keyguard locked (i.e., showing)
+ state.
<p>Protection level: signature|role
<p>Intended for use by ROLE_ASSISTANT and signature apps only.
-->
diff --git a/core/res/res/drawable/notification_progress.xml b/core/res/res/drawable/notification_progress.xml
index 3a6b60077045..5d272fb00e34 100644
--- a/core/res/res/drawable/notification_progress.xml
+++ b/core/res/res/drawable/notification_progress.xml
@@ -24,9 +24,9 @@
android:segPointGap="@dimen/notification_progress_segPoint_gap">
<segments
android:color="?attr/colorProgressBackgroundNormal"
- android:dashGap="@dimen/notification_progress_segments_dash_gap"
- android:dashWidth="@dimen/notification_progress_segments_dash_width"
- android:width="@dimen/notification_progress_segments_height" />
+ android:height="@dimen/notification_progress_segments_height"
+ android:fadedHeight="@dimen/notification_progress_segments_faded_height"
+ android:cornerRadius="@dimen/notification_progress_segments_corner_radius"/>
<points
android:color="?attr/colorProgressBackgroundNormal"
android:radius="@dimen/notification_progress_points_radius"
diff --git a/core/res/res/layout/notification_2025_template_collapsed_base.xml b/core/res/res/layout/notification_2025_template_collapsed_base.xml
new file mode 100644
index 000000000000..c003820a247f
--- /dev/null
+++ b/core/res/res/layout/notification_2025_template_collapsed_base.xml
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright (C) 2024 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
+ -->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/status_bar_latest_event_content"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:minHeight="@dimen/notification_headerless_min_height"
+ android:tag="base"
+ >
+
+ <ImageView
+ android:id="@+id/left_icon"
+ android:layout_width="@dimen/notification_2025_left_icon_size"
+ android:layout_height="@dimen/notification_2025_left_icon_size"
+ android:layout_gravity="center_vertical|start"
+ android:layout_marginStart="@dimen/notification_left_icon_start"
+ android:background="@drawable/notification_large_icon_outline"
+ android:clipToOutline="true"
+ android:importantForAccessibility="no"
+ android:scaleType="centerCrop"
+ android:visibility="gone"
+ />
+
+ <com.android.internal.widget.NotificationRowIconView
+ android:id="@+id/icon"
+ android:layout_width="@dimen/notification_2025_icon_circle_size"
+ android:layout_height="@dimen/notification_2025_icon_circle_size"
+ android:layout_gravity="center_vertical|start"
+ android:layout_marginStart="@dimen/notification_icon_circle_start"
+ android:background="@drawable/notification_icon_circle"
+ android:padding="@dimen/notification_2025_icon_circle_padding"
+ android:maxDrawableWidth="@dimen/notification_2025_icon_circle_size"
+ android:maxDrawableHeight="@dimen/notification_2025_icon_circle_size"
+ />
+
+ <FrameLayout
+ android:id="@+id/alternate_expand_target"
+ android:layout_width="@dimen/notification_2025_content_margin_start"
+ android:layout_height="match_parent"
+ android:layout_gravity="start"
+ android:importantForAccessibility="no"
+ android:focusable="false"
+ />
+
+ <LinearLayout
+ android:id="@+id/notification_headerless_view_row"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginStart="@dimen/notification_2025_content_margin_start"
+ android:orientation="horizontal"
+ >
+
+ <LinearLayout
+ android:id="@+id/notification_headerless_view_column"
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_weight="1"
+ android:layout_marginBottom="@dimen/notification_headerless_margin_twoline"
+ android:layout_marginTop="@dimen/notification_headerless_margin_twoline"
+ android:orientation="vertical"
+ >
+
+ <NotificationTopLineView
+ android:id="@+id/notification_top_line"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/notification_headerless_line_height"
+ android:clipChildren="false"
+ android:theme="@style/Theme.DeviceDefault.Notification"
+ >
+
+ <!--
+ NOTE: The notification_top_line_views layout contains the app_name_text.
+ In order to include the title view at the beginning, the Notification.Builder
+ has logic to hide that view whenever this title view is to be visible.
+ -->
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/notification_header_separating_margin"
+ android:ellipsize="end"
+ android:fadingEdge="horizontal"
+ android:singleLine="true"
+ android:textAlignment="viewStart"
+ android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Title"
+ />
+
+ <include layout="@layout/notification_top_line_views" />
+
+ </NotificationTopLineView>
+
+ <LinearLayout
+ android:id="@+id/notification_main_column"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ >
+
+ <com.android.internal.widget.NotificationVanishingFrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/notification_headerless_line_height"
+ >
+ <!-- This is the simplest way to keep this text vertically centered without
+ gravity="center_vertical" which causes jumpiness in expansion animations. -->
+ <include
+ layout="@layout/notification_template_text"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/notification_text_height"
+ android:layout_gravity="center_vertical"
+ android:layout_marginTop="0dp"
+ />
+ </com.android.internal.widget.NotificationVanishingFrameLayout>
+
+ <include
+ layout="@layout/notification_template_progress"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/notification_headerless_line_height"
+ />
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+ <com.android.internal.widget.CachingIconView
+ android:id="@+id/right_icon"
+ android:layout_width="@dimen/notification_right_icon_size"
+ android:layout_height="@dimen/notification_right_icon_size"
+ android:layout_gravity="center_vertical|end"
+ android:layout_marginTop="@dimen/notification_right_icon_headerless_margin"
+ android:layout_marginBottom="@dimen/notification_right_icon_headerless_margin"
+ android:layout_marginStart="@dimen/notification_right_icon_content_margin"
+ android:background="@drawable/notification_large_icon_outline"
+ android:clipToOutline="true"
+ android:importantForAccessibility="no"
+ android:scaleType="centerCrop"
+ android:maxDrawableWidth="@dimen/notification_right_icon_size"
+ android:maxDrawableHeight="@dimen/notification_right_icon_size"
+ />
+
+ <LinearLayout
+ android:id="@+id/notification_buttons_column"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentEnd="true"
+ android:orientation="vertical"
+ >
+
+ <include layout="@layout/notification_close_button"
+ android:layout_width="@dimen/notification_close_button_size"
+ android:layout_height="@dimen/notification_close_button_size"
+ android:layout_gravity="end"
+ android:layout_marginEnd="20dp"
+ />
+
+ <FrameLayout
+ android:id="@+id/expand_button_touch_container"
+ android:layout_width="wrap_content"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:minWidth="@dimen/notification_content_margin_end"
+ >
+
+ <include layout="@layout/notification_expand_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical|end"
+ />
+
+ </FrameLayout>
+
+ </LinearLayout>
+
+ </LinearLayout>
+
+</FrameLayout>
diff --git a/core/res/res/layout/notification_2025_template_header.xml b/core/res/res/layout/notification_2025_template_header.xml
new file mode 100644
index 000000000000..b7fe454e09d4
--- /dev/null
+++ b/core/res/res/layout/notification_2025_template_header.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright (C) 2024 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
+ -->
+
+<!-- extends RelativeLayout -->
+<NotificationHeaderView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/notification_header"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/notification_2025_header_height"
+ android:layout_marginBottom="@dimen/notification_header_margin_bottom"
+ android:clipChildren="false"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:theme="@style/Theme.DeviceDefault.Notification"
+ android:importantForAccessibility="no"
+ >
+
+ <ImageView
+ android:id="@+id/left_icon"
+ android:layout_width="@dimen/notification_2025_left_icon_size"
+ android:layout_height="@dimen/notification_2025_left_icon_size"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_marginStart="@dimen/notification_left_icon_start"
+ android:background="@drawable/notification_large_icon_outline"
+ android:clipToOutline="true"
+ android:importantForAccessibility="no"
+ android:scaleType="centerCrop"
+ android:visibility="gone"
+ />
+
+ <com.android.internal.widget.NotificationRowIconView
+ android:id="@+id/icon"
+ android:layout_width="@dimen/notification_2025_icon_circle_size"
+ android:layout_height="@dimen/notification_2025_icon_circle_size"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_marginStart="@dimen/notification_icon_circle_start"
+ android:background="@drawable/notification_icon_circle"
+ android:padding="@dimen/notification_2025_icon_circle_padding"
+ android:maxDrawableWidth="@dimen/notification_2025_icon_circle_size"
+ android:maxDrawableHeight="@dimen/notification_2025_icon_circle_size"
+ />
+
+ <!-- extends ViewGroup -->
+ <NotificationTopLineView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/notification_top_line"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_toStartOf="@id/notification_buttons_column"
+ android:layout_alignWithParentIfMissing="true"
+ android:clipChildren="false"
+ android:gravity="center_vertical"
+ android:paddingStart="@dimen/notification_2025_content_margin_start"
+ android:theme="@style/Theme.DeviceDefault.Notification"
+ >
+
+ <include layout="@layout/notification_top_line_views" />
+
+ </NotificationTopLineView>
+
+ <FrameLayout
+ android:id="@+id/alternate_expand_target"
+ android:layout_width="@dimen/notification_2025_content_margin_start"
+ android:layout_height="match_parent"
+ android:layout_alignParentStart="true"
+ android:importantForAccessibility="no"
+ android:focusable="false"
+ />
+
+ <LinearLayout
+ android:id="@+id/notification_buttons_column"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:orientation="vertical"
+ >
+
+ <include layout="@layout/notification_close_button"
+ android:layout_width="@dimen/notification_close_button_size"
+ android:layout_height="@dimen/notification_close_button_size"
+ android:layout_gravity="end"
+ android:layout_marginEnd="20dp"
+ />
+
+ <include layout="@layout/notification_expand_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_centerVertical="true"
+ />
+
+ </LinearLayout>
+
+</NotificationHeaderView>
diff --git a/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml b/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml
index 82920bad95cd..149a5a9568f2 100644
--- a/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml
+++ b/core/res/res/layout/notification_template_material_messaging_compact_heads_up.xml
@@ -34,12 +34,14 @@
android:maxDrawableWidth="@dimen/notification_icon_circle_size"
android:maxDrawableHeight="@dimen/notification_icon_circle_size"
/>
- <com.android.internal.widget.NotificationRowIconView
+ <com.android.internal.widget.CachingIconView
android:id="@+id/conversation_icon"
android:layout_width="@dimen/notification_icon_circle_size"
android:layout_height="@dimen/notification_icon_circle_size"
android:layout_gravity="center_vertical|start"
android:layout_marginStart="@dimen/notification_icon_circle_start"
+ android:background="@drawable/notification_icon_circle"
+ android:clipToOutline="true"
android:maxDrawableWidth="@dimen/notification_icon_circle_size"
android:maxDrawableHeight="@dimen/notification_icon_circle_size"
android:scaleType="centerCrop"
diff --git a/core/res/res/values-night/colors_dynamic.xml b/core/res/res/values-night/colors_dynamic.xml
new file mode 100644
index 000000000000..7e95ff4f409e
--- /dev/null
+++ b/core/res/res/values-night/colors_dynamic.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2024 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.
+-->
+
+<!-- Colors specific to Material themes. -->
+<resources>
+ <color name="materialColorBackground">@color/system_background_dark</color>
+ <color name="materialColorControlActivated">@color/system_control_activated_dark</color>
+ <color name="materialColorControlHighlight">@color/system_control_highlight_dark</color>
+ <color name="materialColorControlNormal">@color/system_control_normal_dark</color>
+ <color name="materialColorError">@color/system_error_dark</color>
+ <color name="materialColorErrorContainer">@color/system_error_container_dark</color>
+ <color name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</color>
+ <color name="materialColorInversePrimary">@color/system_inverse_primary_dark</color>
+ <color name="materialColorInverseSurface">@color/system_inverse_surface_dark</color>
+ <color name="materialColorOnBackground">@color/system_on_background_dark</color>
+ <color name="materialColorOnError">@color/system_on_error_dark</color>
+ <color name="materialColorOnErrorContainer">@color/system_on_error_container_dark</color>
+ <color name="materialColorOnPrimary">@color/system_on_primary_dark</color>
+ <color name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</color>
+ <color name="materialColorOnSecondary">@color/system_on_secondary_dark</color>
+ <color name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</color>
+ <color name="materialColorOnSurface">@color/system_on_surface_dark</color>
+ <color name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</color>
+ <color name="materialColorOnTertiary">@color/system_on_tertiary_dark</color>
+ <color name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</color>
+ <color name="materialColorOutline">@color/system_outline_dark</color>
+ <color name="materialColorOutlineVariant">@color/system_outline_variant_dark</color>
+ <color name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</color>
+ <color name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</color>
+ <color name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</color>
+ <color name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</color>
+ <color name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</color>
+ <color name="materialColorPrimary">@color/system_primary_dark</color>
+ <color name="materialColorPrimaryContainer">@color/system_primary_container_dark</color>
+ <color name="materialColorScrim">@color/system_scrim_dark</color>
+ <color name="materialColorSecondary">@color/system_secondary_dark</color>
+ <color name="materialColorSecondaryContainer">@color/system_secondary_container_dark</color>
+ <color name="materialColorShadow">@color/system_shadow_dark</color>
+ <color name="materialColorSurface">@color/system_surface_dark</color>
+ <color name="materialColorSurfaceBright">@color/system_surface_bright_dark</color>
+ <color name="materialColorSurfaceContainer">@color/system_surface_container_dark</color>
+ <color name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</color>
+ <color name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</color>
+ <color name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</color>
+ <color name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</color>
+ <color name="materialColorSurfaceDim">@color/system_surface_dim_dark</color>
+ <color name="materialColorSurfaceTint">@color/system_surface_tint_dark</color>
+ <color name="materialColorSurfaceVariant">@color/system_surface_variant_dark</color>
+ <color name="materialColorTertiary">@color/system_tertiary_dark</color>
+ <color name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</color>
+ <color name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</color>
+ <color name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</color>
+ <color name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</color>
+ <color name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</color>
+ <color name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</color>
+ <color name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</color>
+ <color name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</color>
+ <color name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</color>
+ <color name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</color>
+ <color name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</color>
+ <color name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</color>
+ <color name="materialColorPrimaryFixed">@color/system_primary_fixed</color>
+ <color name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</color>
+ <color name="materialColorSecondaryFixed">@color/system_secondary_fixed</color>
+ <color name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</color>
+ <color name="materialColorTertiaryFixed">@color/system_tertiary_fixed</color>
+ <color name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</color>
+ <color name="customColorBrandA">@color/system_brand_a_dark</color>
+ <color name="customColorBrandB">@color/system_brand_b_dark</color>
+ <color name="customColorBrandC">@color/system_brand_c_dark</color>
+ <color name="customColorBrandD">@color/system_brand_d_dark</color>
+ <color name="customColorClockHour">@color/system_clock_hour_dark</color>
+ <color name="customColorClockMinute">@color/system_clock_minute_dark</color>
+ <color name="customColorClockSecond">@color/system_clock_second_dark</color>
+ <color name="customColorOnShadeActive">@color/system_on_shade_active_dark</color>
+ <color name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</color>
+ <color name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</color>
+ <color name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</color>
+ <color name="customColorOnThemeApp">@color/system_on_theme_app_dark</color>
+ <color name="customColorOverviewBackground">@color/system_overview_background_dark</color>
+ <color name="customColorShadeActive">@color/system_shade_active_dark</color>
+ <color name="customColorShadeDisabled">@color/system_shade_disabled_dark</color>
+ <color name="customColorShadeInactive">@color/system_shade_inactive_dark</color>
+ <color name="customColorThemeApp">@color/system_theme_app_dark</color>
+ <color name="customColorThemeAppRing">@color/system_theme_app_ring_dark</color>
+ <color name="customColorThemeNotif">@color/system_theme_notif_dark</color>
+ <color name="customColorUnderSurface">@color/system_under_surface_dark</color>
+ <color name="customColorWeatherTemp">@color/system_weather_temp_dark</color>
+ <color name="customColorWidgetBackground">@color/system_widget_background_dark</color>
+</resources>
diff --git a/core/res/res/values-watch/themes_device_defaults.xml b/core/res/res/values-watch/themes_device_defaults.xml
index 4d2085bbe0c7..7ac17595a278 100644
--- a/core/res/res/values-watch/themes_device_defaults.xml
+++ b/core/res/res/values-watch/themes_device_defaults.xml
@@ -238,16 +238,16 @@ a similar way.
<item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
<item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
<item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_on_surface_light</item>
<item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
<item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
<item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
<item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
+ <item name="materialColorInversePrimary">@color/system_primary_light</item>
<item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
+ <item name="materialColorInverseSurface">@color/system_surface_light</item>
<item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
<item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 72467b367cd5..f6590b1360f8 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1218,155 +1218,132 @@
it prevent any 'false' in any of its children. -->
<attr name="forceDarkAllowed" format="boolean" />
- <!-- A lower-emphasized variant of the color on the fixed secondary branding color. @hide
- -->
- <attr name="materialColorOnSecondaryFixedVariant" format="color"/>
- <!-- A lower-emphasized variant of the color on the fixed tertiary branding color. @hide
- -->
- <attr name="materialColorOnTertiaryFixedVariant" format="color"/>
- <!-- The container color of surface the most lowered. @hide -->
- <attr name="materialColorSurfaceContainerLowest" format="color"/>
- <!-- A lower-emphasized variant of the color on the fixed primary branding color. @hide -->
- <attr name="materialColorOnPrimaryFixedVariant" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- the secondary container color. @hide -->
- <attr name="materialColorOnSecondaryContainer" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- the tertiary container color. @hide -->
- <attr name="materialColorOnTertiaryContainer" format="color"/>
- <!-- The container color of surface slightly lowered, which replaces the previous surface
- at elevation level 1. @hide -->
- <attr name="materialColorSurfaceContainerLow" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- the primary container color. @hide -->
- <attr name="materialColorOnPrimaryContainer" format="color"/>
- <!-- A stronger, more emphasized variant of the fixed secondary branding color. @hide -->
- <attr name="materialColorSecondaryFixedDim" format="color"/>
- <!-- A tonal variation of the on error color that passes accessibility guidelines for
- text/iconography when drawn on top of error container. @hide -->
- <attr name="materialColorOnErrorContainer" format="color"/>
- <!-- The color text/iconography when drawn on top of the fixed secondary branding color.
- @hide -->
- <attr name="materialColorOnSecondaryFixed" format="color"/>
- <!-- The "on surface" inverse color, useful for inverted backgrounds. @hide -->
- <attr name="materialColorOnSurfaceInverse" format="color"/>
- <!-- A stronger, more emphasized variant of the fixed tertiary branding color. @hide -->
- <attr name="materialColorTertiaryFixedDim" format="color"/>
- <!-- The color text/iconography when drawn on top of the fixed tertiary branding color.
- @hide -->
- <attr name="materialColorOnTertiaryFixed" format="color"/>
- <!-- A stronger, more emphasized variant of the fixed primary branding color. @hide -->
- <attr name="materialColorPrimaryFixedDim" format="color"/>
- <!-- A tonal variation of the secondary color suitable for background color of container
- views. @hide -->
- <attr name="materialColorSecondaryContainer" format="color"/>
- <!-- A tonal variation of the error color suitable for background color of container views.
- @hide -->
+ <!-- Dynamic Tokens -->
+
+ <!-- @hide -->
+ <attr name="materialColorBackground" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorControlActivated" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorControlHighlight" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorControlNormal" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorError" format="color"/>
+ <!-- @hide -->
<attr name="materialColorErrorContainer" format="color"/>
- <!-- The color text/iconography when drawn on top of the fixed primary branding color.
- @hide -->
- <attr name="materialColorOnPrimaryFixed" format="color"/>
- <!-- The inverse color of colorPrimary. @hide -->
- <attr name="materialColorPrimaryInverse" format="color"/>
- <!-- A secondary branding color for the app, which stays the same between light and dark
- themes. @hide -->
- <attr name="materialColorSecondaryFixed" format="color"/>
- <!-- The surface inverse color, useful for inverted backgrounds. @hide -->
- <attr name="materialColorSurfaceInverse" format="color"/>
- <!-- A tonal variation of the surface color. @hide -->
- <attr name="materialColorSurfaceVariant" format="color"/>
- <!-- A tonal variation of the tertiary color suitable for background color of container
- views. @hide -->
- <attr name="materialColorTertiaryContainer" format="color"/>
- <!-- A tertiary branding color for the app, which stays the same between light and dark
- themes. @hide -->
- <attr name="materialColorTertiaryFixed" format="color"/>
- <!-- A tonal variation of the primary color suitable for background color of container
- views. @hide -->
- <attr name="materialColorPrimaryContainer" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- background. @hide -->
+ <!-- @hide -->
+ <attr name="materialColorInverseOnSurface" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorInversePrimary" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorInverseSurface" format="color"/>
+ <!-- @hide -->
<attr name="materialColorOnBackground" format="color"/>
- <!-- A primary branding color for the app, which stays the same between light and dark
- themes. @hide -->
- <attr name="materialColorPrimaryFixed" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- secondary. @hide -->
- <attr name="materialColorOnSecondary" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- tertiary. @hide -->
- <attr name="materialColorOnTertiary" format="color"/>
- <!-- The surface color which always stay the dimmest in either dark or light theme. @hide
- -->
- <attr name="materialColorSurfaceDim" format="color"/>
- <!-- The surface color which always stay the brightest in either dark or light theme. @hide
- -->
- <attr name="materialColorSurfaceBright" format="color"/>
- <!-- The secondary branding color for the app, usually a bright complement to the primary
- branding color. @hide -->
- <attr name="materialColorSecondary" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- error. @hide -->
+ <!-- @hide -->
<attr name="materialColorOnError" format="color"/>
- <!-- The color of surfaces such as cards, sheets, menus. @hide -->
- <attr name="materialColorSurface" format="color"/>
- <!-- The container color of surface slightly elevated, which replaces the previous surface
- at elevation level 3. @hide -->
- <attr name="materialColorSurfaceContainerHigh" format="color"/>
- <!-- The tertiary branding color for the app, usually a bright complement to the primary
- branding color. @hide -->
- <attr name="materialColorTertiary" format="color"/>
- <!-- The container color of surface the most elevated, which replaces the previous surface
- variant. @hide -->
- <attr name="materialColorSurfaceContainerHighest" format="color"/>
- <!-- A tonal variation of the on surface color that passes accessibility guidelines for
- text/iconography when drawn on top of surface variant. @hide -->
+ <!-- @hide -->
+ <attr name="materialColorOnErrorContainer" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnPrimary" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnPrimaryContainer" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnSecondary" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnSecondaryContainer" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnSurface" format="color"/>
+ <!-- @hide -->
<attr name="materialColorOnSurfaceVariant" format="color"/>
- <!-- A color meant to be used in element outlines. @hide -->
+ <!-- @hide -->
+ <attr name="materialColorOnTertiary" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnTertiaryContainer" format="color"/>
+ <!-- @hide -->
<attr name="materialColorOutline" format="color"/>
- <!-- A color meant to be used in element outlines on the surface-variant color. @hide -->
+ <!-- @hide -->
<attr name="materialColorOutlineVariant" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- primary. @hide -->
- <attr name="materialColorOnPrimary" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top of
- surface. @hide -->
- <attr name="materialColorOnSurface" format="color"/>
- <!-- The container color of surface, which replaces the previous surface at elevation level
- 2. @hide -->
- <attr name="materialColorSurfaceContainer" format="color"/>
- <!-- The container color of surface, which replaces the previous surface at elevation level
- 2. @hide -->
- <attr name="materialColorSurfaceContainer" format="color"/>
- <!-- The primary branding color for the app. By default, this is the color applied to the
- action bar background. @hide -->
+ <!-- @hide -->
+ <attr name="materialColorPaletteKeyColorNeutral" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorPaletteKeyColorNeutralVariant" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorPaletteKeyColorPrimary" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorPaletteKeyColorSecondary" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorPaletteKeyColorTertiary" format="color"/>
+ <!-- @hide -->
<attr name="materialColorPrimary" format="color"/>
- <!-- The secondary branding color for the app, usually a bright complement to the primary
- branding color. @hide -->
+ <!-- @hide -->
+ <attr name="materialColorPrimaryContainer" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorScrim" format="color"/>
+ <!-- @hide -->
<attr name="materialColorSecondary" format="color"/>
- <!-- A color that passes accessibility guidelines for text/iconography when drawn on top
- of tertiary. @hide -->
+ <!-- @hide -->
+ <attr name="materialColorSecondaryContainer" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorShadow" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurface" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceBright" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceContainer" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceContainerHigh" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceContainerHighest" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceContainerLow" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceContainerLowest" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceDim" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceTint" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSurfaceVariant" format="color"/>
+ <!-- @hide -->
<attr name="materialColorTertiary" format="color"/>
- <!-- The error color for the app, intended to draw attention to error conditions. @hide -->
- <attr name="materialColorError" format="color"/>
-
- <!-- System Custom Tokens-->
<!-- @hide -->
- <attr name="customColorWidgetBackground" format="color"/>
+ <attr name="materialColorTertiaryContainer" format="color"/>
<!-- @hide -->
- <attr name="customColorClockHour" format="color"/>
+ <attr name="materialColorTextHintInverse" format="color"/>
<!-- @hide -->
- <attr name="customColorClockMinute" format="color"/>
+ <attr name="materialColorTextPrimaryInverse" format="color"/>
<!-- @hide -->
- <attr name="customColorClockSecond" format="color"/>
+ <attr name="materialColorTextPrimaryInverseDisableOnly" format="color"/>
<!-- @hide -->
- <attr name="customColorThemeApp" format="color"/>
+ <attr name="materialColorTextSecondaryAndTertiaryInverse" format="color"/>
<!-- @hide -->
- <attr name="customColorOnThemeApp" format="color"/>
+ <attr name="materialColorTextSecondaryAndTertiaryInverseDisabled" format="color"/>
<!-- @hide -->
- <attr name="customColorThemeAppRing" format="color"/>
+ <attr name="materialColorOnPrimaryFixed" format="color"/>
<!-- @hide -->
- <attr name="customColorThemeNotif" format="color"/>
+ <attr name="materialColorOnPrimaryFixedVariant" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnSecondaryFixed" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnSecondaryFixedVariant" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnTertiaryFixed" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorOnTertiaryFixedVariant" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorPrimaryFixed" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorPrimaryFixedDim" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSecondaryFixed" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorSecondaryFixedDim" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorTertiaryFixed" format="color"/>
+ <!-- @hide -->
+ <attr name="materialColorTertiaryFixedDim" format="color"/>
<!-- @hide -->
<attr name="customColorBrandA" format="color"/>
<!-- @hide -->
@@ -1376,23 +1353,41 @@
<!-- @hide -->
<attr name="customColorBrandD" format="color"/>
<!-- @hide -->
- <attr name="customColorUnderSurface" format="color"/>
+ <attr name="customColorClockHour" format="color"/>
<!-- @hide -->
- <attr name="customColorShadeActive" format="color"/>
+ <attr name="customColorClockMinute" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorClockSecond" format="color"/>
<!-- @hide -->
<attr name="customColorOnShadeActive" format="color"/>
<!-- @hide -->
<attr name="customColorOnShadeActiveVariant" format="color"/>
<!-- @hide -->
- <attr name="customColorShadeInactive" format="color"/>
- <!-- @hide -->
<attr name="customColorOnShadeInactive" format="color"/>
<!-- @hide -->
<attr name="customColorOnShadeInactiveVariant" format="color"/>
<!-- @hide -->
- <attr name="customColorShadeDisabled" format="color"/>
+ <attr name="customColorOnThemeApp" format="color"/>
<!-- @hide -->
<attr name="customColorOverviewBackground" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorShadeActive" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorShadeDisabled" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorShadeInactive" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorThemeApp" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorThemeAppRing" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorThemeNotif" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorUnderSurface" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorWeatherTemp" format="color"/>
+ <!-- @hide -->
+ <attr name="customColorWidgetBackground" format="color"/>
</declare-styleable>
@@ -7753,14 +7748,14 @@
<!-- Used to config the segments of a NotificationProgressDrawable. -->
<!-- @hide internal use only -->
<declare-styleable name="NotificationProgressDrawableSegments">
- <!-- Width of the stroke. -->
- <attr name="width" />
- <!-- Default color of the stroke. -->
+ <!-- Height of the solid segments -->
+ <attr name="height" />
+ <!-- Height of the faded segments -->
+ <attr name="fadedHeight" format="dimension"/>
+ <!-- Corner radius of the segment rect. -->
+ <attr name="cornerRadius" format="dimension" />
+ <!-- Default color of the segment. -->
<attr name="color" />
- <!-- Length of a dash in the stroke for the dashed segments. -->
- <attr name="dashWidth" />
- <!-- Gap between dashes in the stroke for the dashed segments. -->
- <attr name="dashGap" />
</declare-styleable>
<!-- Used to config the points of a NotificationProgressDrawable. -->
@@ -7771,7 +7766,7 @@
<!-- Inset of the point icon or rect. -->
<attr name="inset" />
<!-- Corner radius of the point rect. -->
- <attr name="cornerRadius" format="dimension" />
+ <attr name="cornerRadius"/>
<!-- Default color of the point rect. -->
<attr name="color" />
</declare-styleable>
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index f5bb554b0b32..13dd4a35564c 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -238,393 +238,319 @@
<color name="conversation_important_highlight">#F9AB00</color>
- <!--Lightest shade of the Primary color used by the system. White.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Lightest shade of the Primary color used by the system. White. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_0">#FFFFFF</color>
- <!--Shade of the Primary system color at 99% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_10">#FEFBFF</color>
- <!--Shade of the Primary system color at 95% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_50">#EEF0FF</color>
- <!--Shade of the Primary system color at 90% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_100">#D9E2FF</color>
- <!--Shade of the Primary system color at 80% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_200">#B0C6FF</color>
- <!--Shade of the Primary system color at 70% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_300">#94AAE4</color>
- <!--Shade of the Primary system color at 60% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_400">#7A90C8</color>
- <!--Shade of the Primary system color at 50% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 50% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_500">#6076AC</color>
- <!--Shade of the Primary system color at 40% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_600">#475D92</color>
- <!--Shade of the Primary system color at 30% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_700">#2F4578</color>
- <!--Shade of the Primary system color at 20% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_800">#152E60</color>
- <!--Shade of the Primary system color at 10% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Primary system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_900">#001945</color>
- <!--Darkest shade of the Primary color used by the system. Black.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Darkest shade of the Primary color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent1_1000">#000000</color>
-
- <!--Lightest shade of the Secondary color used by the system. White.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Lightest shade of the Secondary color used by the system. White. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_0">#FFFFFF</color>
- <!--Shade of the Secondary system color at 99% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_10">#FEFBFF</color>
- <!--Shade of the Secondary system color at 95% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_50">#EEF0FF</color>
- <!--Shade of the Secondary system color at 90% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_100">#DCE2F9</color>
- <!--Shade of the Secondary system color at 80% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_200">#C0C6DC</color>
- <!--Shade of the Secondary system color at 70% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_300">#A4ABC1</color>
- <!--Shade of the Secondary system color at 60% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_400">#8A90A5</color>
- <!--Shade of the Secondary system color at 50% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 50% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_500">#70778B</color>
- <!--Shade of the Secondary system color at 40% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_600">#575E71</color>
- <!--Shade of the Secondary system color at 30% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_700">#404659</color>
- <!--Shade of the Secondary system color at 20% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_800">#2A3042</color>
- <!--Shade of the Secondary system color at 10% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_900">#151B2C</color>
- <!--Darkest shade of the Secondary color used by the system. Black.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Darkest shade of the Secondary color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent2_1000">#000000</color>
-
- <!--Lightest shade of the Tertiary color used by the system. White.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Lightest shade of the Tertiary color used by the system. White. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_0">#FFFFFF</color>
- <!--Shade of the Tertiary system color at 99% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_10">#FFFBFF</color>
- <!--Shade of the Tertiary system color at 95% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_50">#FFEBFA</color>
- <!--Shade of the Tertiary system color at 90% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_100">#FDD7FA</color>
- <!--Shade of the Tertiary system color at 80% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_200">#E0BBDD</color>
- <!--Shade of the Tertiary system color at 70% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_300">#C3A0C1</color>
- <!--Shade of the Tertiary system color at 60% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_400">#A886A6</color>
- <!--Shade of the Tertiary system color at 50% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 50% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_500">#8C6D8C</color>
- <!--Shade of the Tertiary system color at 40% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_600">#725572</color>
- <!--Shade of the Tertiary system color at 30% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_700">#593D59</color>
- <!--Shade of the Tertiary system color at 20% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_800">#412742</color>
- <!--Shade of the Tertiary system color at 10% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Tertiary system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_900">#2A122C</color>
- <!--Darkest shade of the Tertiary color used by the system. Black.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Darkest shade of the Tertiary color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_accent3_1000">#000000</color>
-
- <!--Lightest shade of the Neutral color used by the system. White.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Lightest shade of the Neutral color used by the system. White. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_0">#FFFFFF</color>
- <!--Shade of the Neutral system color at 99% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_10">#FEFBFF</color>
- <!--Shade of the Neutral system color at 95% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_50">#F1F0F7</color>
- <!--Shade of the Neutral system color at 90% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_100">#E2E2E9</color>
- <!--Shade of the Neutral system color at 80% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_200">#C6C6CD</color>
- <!--Shade of the Neutral system color at 70% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_300">#ABABB1</color>
- <!--Shade of the Neutral system color at 60% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_400">#909097</color>
- <!--Shade of the Neutral system color at 50% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 50% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_500">#76777D</color>
- <!--Shade of the Neutral system color at 40% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_600">#5D5E64</color>
- <!--Shade of the Neutral system color at 30% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_700">#45464C</color>
- <!--Shade of the Neutral system color at 20% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_800">#2F3036</color>
- <!--Shade of the Neutral system color at 10% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Neutral system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_900">#1A1B20</color>
- <!--Darkest shade of the Neutral color used by the system. Black.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Darkest shade of the Neutral color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral1_1000">#000000</color>
-
- <!--Lightest shade of the Secondary Neutral color used by the system. White.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Lightest shade of the Secondary Neutral color used by the system. White. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_0">#FFFFFF</color>
- <!--Shade of the Secondary Neutral system color at 99% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_10">#FEFBFF</color>
- <!--Shade of the Secondary Neutral system color at 95% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_50">#F0F0FA</color>
- <!--Shade of the Secondary Neutral system color at 90% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_100">#E1E2EC</color>
- <!--Shade of the Secondary Neutral system color at 80% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_200">#C5C6D0</color>
- <!--Shade of the Secondary Neutral system color at 70% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_300">#A9ABB4</color>
- <!--Shade of the Secondary Neutral system color at 60% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_400">#8F9099</color>
- <!--Shade of the Secondary Neutral system color at 50% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 50% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_500">#757780</color>
- <!--Shade of the Secondary Neutral system color at 40% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_600">#5C5E67</color>
- <!--Shade of the Secondary Neutral system color at 30% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_700">#44464F</color>
- <!--Shade of the Secondary Neutral system color at 20% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_800">#2E3038</color>
- <!--Shade of the Secondary Neutral system color at 10% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Shade of the Secondary Neutral system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_900">#191B23</color>
- <!--Darkest shade of the Secondary Neutral color used by the system. Black.
- This value can be overlaid at runtime by OverlayManager RROs.-->
+ <!--Darkest shade of the Secondary Neutral color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_neutral2_1000">#000000</color>
-
- <!-- Lightest shade of the error color used by the system. White.
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_0">#ffffff</color>
- <!-- Shade of the error system color at 99% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_10">#FFFBF9</color>
- <!-- Shade of the error system color at 95% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_50">#FCEEEE</color>
- <!-- Shade of the error system color at 90% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_100">#F9DEDC</color>
- <!-- Shade of the error system color at 80% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_200">#F2B8B5</color>
- <!-- Shade of the error system color at 70% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_300">#EC928E</color>
- <!-- Shade of the error system color at 60% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_400">#E46962</color>
- <!-- Shade of the error system color at 49% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_500">#DC362E</color>
- <!-- Shade of the error system color at 40% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_600">#B3261E</color>
- <!-- Shade of the error system color at 30% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_700">#8C1D18</color>
- <!-- Shade of the error system color at 20% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_800">#601410</color>
- <!-- Shade of the error system color at 10% perceptual luminance (L* in L*a*b* color space).
- This value can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_error_900">#410E0B</color>
- <!-- Darkest shade of the error color used by the system. Black.
- This value can be overlaid at runtime by OverlayManager RROs. -->
+ <!--Lightest shade of the Error color used by the system. White. This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_0">#FFFFFF</color>
+ <!--Shade of the Error system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_10">#FFFBFF</color>
+ <!--Shade of the Error system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_50">#FFEDEA</color>
+ <!--Shade of the Error system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_100">#FFDAD6</color>
+ <!--Shade of the Error system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_200">#FFB4AB</color>
+ <!--Shade of the Error system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_300">#FF897D</color>
+ <!--Shade of the Error system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_400">#FF5449</color>
+ <!--Shade of the Error system color at 50% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_500">#DE3730</color>
+ <!--Shade of the Error system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_600">#BA1A1A</color>
+ <!--Shade of the Error system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_700">#93000A</color>
+ <!--Shade of the Error system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_800">#690005</color>
+ <!--Shade of the Error system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs.-->
+ <color name="system_error_900">#410002</color>
+ <!--Darkest shade of the Error color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs.-->
<color name="system_error_1000">#000000</color>
- <!-- Colors used in Android system, from design system.
- These values can be overlaid at runtime by OverlayManager RROs. -->
- <color name="system_primary_container_light">#D9E2FF</color>
- <color name="system_on_primary_container_light">#001945</color>
- <color name="system_primary_light">#475D92</color>
+ <!--Colors used in Android system, from design system. These values can be overlaid at runtime by OverlayManager RROs.--><color name="system_background_light">#FAF8FF</color>
+ <color name="system_control_activated_light">#D9E2FF</color>
+ <color name="system_control_highlight_light">#000000</color>
+ <color name="system_control_normal_light">#44464F</color>
+ <color name="system_error_light">#BA1A1A</color>
+ <color name="system_error_container_light">#FFDAD6</color>
+ <color name="system_inverse_on_surface_light">#F1F0F7</color>
+ <color name="system_inverse_primary_light">#B0C6FF</color>
+ <color name="system_inverse_surface_light">#2F3036</color>
+ <color name="system_on_background_light">#1A1B20</color>
+ <color name="system_on_error_light">#FFFFFF</color>
+ <color name="system_on_error_container_light">#93000A</color>
<color name="system_on_primary_light">#FFFFFF</color>
- <color name="system_secondary_container_light">#DCE2F9</color>
- <color name="system_on_secondary_container_light">#151B2C</color>
- <color name="system_secondary_light">#575E71</color>
+ <color name="system_on_primary_container_light">#2F4578</color>
<color name="system_on_secondary_light">#FFFFFF</color>
- <color name="system_tertiary_container_light">#FDD7FA</color>
- <color name="system_on_tertiary_container_light">#2A122C</color>
- <color name="system_tertiary_light">#725572</color>
+ <color name="system_on_secondary_container_light">#404659</color>
+ <color name="system_on_surface_light">#1A1B20</color>
+ <color name="system_on_surface_variant_light">#44464F</color>
<color name="system_on_tertiary_light">#FFFFFF</color>
- <color name="system_background_light">#FAF8FF</color>
- <color name="system_on_background_light">#1A1B20</color>
+ <color name="system_on_tertiary_container_light">#593D59</color>
+ <color name="system_outline_light">#757780</color>
+ <color name="system_outline_variant_light">#C5C6D0</color>
+ <color name="system_palette_key_color_neutral_light">#76777D</color>
+ <color name="system_palette_key_color_neutral_variant_light">#757780</color>
+ <color name="system_palette_key_color_primary_light">#6076AC</color>
+ <color name="system_palette_key_color_secondary_light">#70778B</color>
+ <color name="system_palette_key_color_tertiary_light">#8C6D8C</color>
+ <color name="system_primary_light">#475D92</color>
+ <color name="system_primary_container_light">#D9E2FF</color>
+ <color name="system_scrim_light">#000000</color>
+ <color name="system_secondary_light">#575E71</color>
+ <color name="system_secondary_container_light">#DCE2F9</color>
+ <color name="system_shadow_light">#000000</color>
<color name="system_surface_light">#FAF8FF</color>
- <color name="system_on_surface_light">#1A1B20</color>
- <color name="system_surface_container_low_light">#F4F3FA</color>
- <color name="system_surface_container_lowest_light">#FFFFFF</color>
+ <color name="system_surface_bright_light">#FAF8FF</color>
<color name="system_surface_container_light">#EEEDF4</color>
<color name="system_surface_container_high_light">#E8E7EF</color>
<color name="system_surface_container_highest_light">#E2E2E9</color>
- <color name="system_surface_bright_light">#FAF8FF</color>
+ <color name="system_surface_container_low_light">#F4F3FA</color>
+ <color name="system_surface_container_lowest_light">#FFFFFF</color>
<color name="system_surface_dim_light">#DAD9E0</color>
+ <color name="system_surface_tint_light">#475D92</color>
<color name="system_surface_variant_light">#E1E2EC</color>
- <color name="system_on_surface_variant_light">#44464F</color>
- <color name="system_outline_light">#757780</color>
- <color name="system_outline_variant_light">#C5C6D0</color>
- <color name="system_error_light">#BA1A1A</color>
- <color name="system_on_error_light">#FFFFFF</color>
- <color name="system_error_container_light">#FFDAD6</color>
- <color name="system_on_error_container_light">#410002</color>
- <color name="system_control_activated_light">#D9E2FF</color>
- <color name="system_control_normal_light">#44464F</color>
- <color name="system_control_highlight_light">#000000</color>
-<color name="system_text_primary_inverse_light">#E2E2E9</color>
- <color name="system_text_secondary_and_tertiary_inverse_light">#C5C6D0</color>
+ <color name="system_tertiary_light">#725572</color>
+ <color name="system_tertiary_container_light">#FDD7FA</color>
+ <color name="system_text_hint_inverse_light">#E2E2E9</color>
+ <color name="system_text_primary_inverse_light">#E2E2E9</color>
<color name="system_text_primary_inverse_disable_only_light">#E2E2E9</color>
+ <color name="system_text_secondary_and_tertiary_inverse_light">#C5C6D0</color>
<color name="system_text_secondary_and_tertiary_inverse_disabled_light">#E2E2E9</color>
- <color name="system_text_hint_inverse_light">#E2E2E9</color>
- <color name="system_palette_key_color_primary_light">#6076AC</color>
- <color name="system_palette_key_color_secondary_light">#70778B</color>
- <color name="system_palette_key_color_tertiary_light">#8C6D8C</color>
- <color name="system_palette_key_color_neutral_light">#76777D</color>
- <color name="system_palette_key_color_neutral_variant_light">#757780</color>
- <color name="system_primary_container_dark">#2F4578</color>
- <color name="system_on_primary_container_dark">#D9E2FF</color>
- <color name="system_primary_dark">#B0C6FF</color>
+ <color name="system_background_dark">#121318</color>
+ <color name="system_control_activated_dark">#2F4578</color>
+ <color name="system_control_highlight_dark">#FFFFFF</color>
+ <color name="system_control_normal_dark">#C5C6D0</color>
+ <color name="system_error_dark">#FFB4AB</color>
+ <color name="system_error_container_dark">#93000A</color>
+ <color name="system_inverse_on_surface_dark">#2F3036</color>
+ <color name="system_inverse_primary_dark">#475D92</color>
+ <color name="system_inverse_surface_dark">#E2E2E9</color>
+ <color name="system_on_background_dark">#E2E2E9</color>
+ <color name="system_on_error_dark">#690005</color>
+ <color name="system_on_error_container_dark">#FFDAD6</color>
<color name="system_on_primary_dark">#152E60</color>
- <color name="system_secondary_container_dark">#404659</color>
- <color name="system_on_secondary_container_dark">#DCE2F9</color>
- <color name="system_secondary_dark">#C0C6DC</color>
+ <color name="system_on_primary_container_dark">#D9E2FF</color>
<color name="system_on_secondary_dark">#2A3042</color>
- <color name="system_tertiary_container_dark">#593D59</color>
- <color name="system_on_tertiary_container_dark">#FDD7FA</color>
- <color name="system_tertiary_dark">#E0BBDD</color>
+ <color name="system_on_secondary_container_dark">#DCE2F9</color>
+ <color name="system_on_surface_dark">#E2E2E9</color>
+ <color name="system_on_surface_variant_dark">#C5C6D0</color>
<color name="system_on_tertiary_dark">#412742</color>
- <color name="system_background_dark">#121318</color>
- <color name="system_on_background_dark">#E2E2E9</color>
+ <color name="system_on_tertiary_container_dark">#FDD7FA</color>
+ <color name="system_outline_dark">#8F9099</color>
+ <color name="system_outline_variant_dark">#44464F</color>
+ <color name="system_palette_key_color_neutral_dark">#76777D</color>
+ <color name="system_palette_key_color_neutral_variant_dark">#757780</color>
+ <color name="system_palette_key_color_primary_dark">#6076AC</color>
+ <color name="system_palette_key_color_secondary_dark">#70778B</color>
+ <color name="system_palette_key_color_tertiary_dark">#8C6D8C</color>
+ <color name="system_primary_dark">#B0C6FF</color>
+ <color name="system_primary_container_dark">#2F4578</color>
+ <color name="system_scrim_dark">#000000</color>
+ <color name="system_secondary_dark">#C0C6DC</color>
+ <color name="system_secondary_container_dark">#404659</color>
+ <color name="system_shadow_dark">#000000</color>
<color name="system_surface_dark">#121318</color>
- <color name="system_on_surface_dark">#E2E2E9</color>
- <color name="system_surface_container_low_dark">#1A1B20</color>
- <color name="system_surface_container_lowest_dark">#0C0E13</color>
+ <color name="system_surface_bright_dark">#38393F</color>
<color name="system_surface_container_dark">#1E1F25</color>
<color name="system_surface_container_high_dark">#282A2F</color>
<color name="system_surface_container_highest_dark">#33343A</color>
- <color name="system_surface_bright_dark">#38393F</color>
+ <color name="system_surface_container_low_dark">#1A1B20</color>
+ <color name="system_surface_container_lowest_dark">#0C0E13</color>
<color name="system_surface_dim_dark">#121318</color>
+ <color name="system_surface_tint_dark">#B0C6FF</color>
<color name="system_surface_variant_dark">#44464F</color>
- <color name="system_on_surface_variant_dark">#C5C6D0</color>
- <color name="system_outline_dark">#8F9099</color>
- <color name="system_outline_variant_dark">#44464F</color>
- <color name="system_error_dark">#FFB4AB</color>
- <color name="system_on_error_dark">#690005</color>
- <color name="system_error_container_dark">#93000A</color>
- <color name="system_on_error_container_dark">#FFDAD6</color>
- <color name="system_control_activated_dark">#2F4578</color>
- <color name="system_control_normal_dark">#C5C6D0</color>
- <color name="system_control_highlight_dark">#FFFFFF</color>
+ <color name="system_tertiary_dark">#E0BBDD</color>
+ <color name="system_tertiary_container_dark">#593D59</color>
+ <color name="system_text_hint_inverse_dark">#1A1B20</color>
<color name="system_text_primary_inverse_dark">#1A1B20</color>
- <color name="system_text_secondary_and_tertiary_inverse_dark">#44464F</color>
<color name="system_text_primary_inverse_disable_only_dark">#1A1B20</color>
+ <color name="system_text_secondary_and_tertiary_inverse_dark">#44464F</color>
<color name="system_text_secondary_and_tertiary_inverse_disabled_dark">#1A1B20</color>
- <color name="system_text_hint_inverse_dark">#1A1B20</color>
- <color name="system_palette_key_color_primary_dark">#6076AC</color>
- <color name="system_palette_key_color_secondary_dark">#70778B</color>
- <color name="system_palette_key_color_tertiary_dark">#8C6D8C</color>
- <color name="system_palette_key_color_neutral_dark">#76777D</color>
- <color name="system_palette_key_color_neutral_variant_dark">#757780</color>
- <color name="system_primary_fixed">#D9E2FF</color>
- <color name="system_primary_fixed_dim">#B0C6FF</color>
<color name="system_on_primary_fixed">#001945</color>
<color name="system_on_primary_fixed_variant">#2F4578</color>
- <color name="system_secondary_fixed">#DCE2F9</color>
- <color name="system_secondary_fixed_dim">#C0C6DC</color>
<color name="system_on_secondary_fixed">#151B2C</color>
<color name="system_on_secondary_fixed_variant">#404659</color>
- <color name="system_tertiary_fixed">#FDD7FA</color>
- <color name="system_tertiary_fixed_dim">#E0BBDD</color>
<color name="system_on_tertiary_fixed">#2A122C</color>
<color name="system_on_tertiary_fixed_variant">#593D59</color>
-
- <!--Colors used in Android system, from design system. These values can be overlaid at runtime
- by OverlayManager RROs.-->
- <color name="system_widget_background_light">#EEF0FF</color>
- <color name="system_clock_hour_light">#373D50</color>
- <color name="system_clock_minute_light">#3D5487</color>
- <color name="system_clock_second_light">#4F659A</color>
- <color name="system_theme_app_light">#D9E2FF</color>
- <color name="system_on_theme_app_light">#475D92</color>
- <color name="system_theme_app_ring_light">#94AAE4</color>
- <color name="system_theme_notif_light">#E0BBDD</color>
+ <color name="system_primary_fixed">#D9E2FF</color>
+ <color name="system_primary_fixed_dim">#B0C6FF</color>
+ <color name="system_secondary_fixed">#DCE2F9</color>
+ <color name="system_secondary_fixed_dim">#C0C6DC</color>
+ <color name="system_tertiary_fixed">#FDD7FA</color>
+ <color name="system_tertiary_fixed_dim">#E0BBDD</color>
<color name="system_brand_a_light">#475D92</color>
<color name="system_brand_b_light">#6E7488</color>
<color name="system_brand_c_light">#5E73A9</color>
<color name="system_brand_d_light">#8A6A89</color>
- <color name="system_under_surface_light">#000000</color>
-<color name="system_shade_active_light">#D9E2FF</color>
+ <color name="system_clock_hour_light">#373D50</color>
+ <color name="system_clock_minute_light">#3D5487</color>
+ <color name="system_clock_second_light">#725572</color>
<color name="system_on_shade_active_light">#152E60</color>
<color name="system_on_shade_active_variant_light">#2F4578</color>
- <color name="system_shade_inactive_light">#2F3036</color>
<color name="system_on_shade_inactive_light">#E1E2EC</color>
<color name="system_on_shade_inactive_variant_light">#C5C6D0</color>
- <color name="system_shade_disabled_light">#0C0E13</color>
+ <color name="system_on_theme_app_light">#475D92</color>
<color name="system_overview_background_light">#C5C6D0</color>
- <color name="system_widget_background_dark">#152E60</color>
- <color name="system_clock_hour_dark">#8A90A5</color>
- <color name="system_clock_minute_dark">#D9E2FF</color>
- <color name="system_clock_second_dark">#B0C6FF</color>
- <color name="system_theme_app_dark">#2F4578</color>
- <color name="system_on_theme_app_dark">#B0C6FF</color>
- <color name="system_theme_app_ring_dark">#94AAE4</color>
- <color name="system_theme_notif_dark">#FDD7FA</color>
+ <color name="system_shade_active_light">#D9E2FF</color>
+ <color name="system_shade_disabled_light">#0C0E13</color>
+ <color name="system_shade_inactive_light">#2F3036</color>
+ <color name="system_theme_app_light">#D9E2FF</color>
+ <color name="system_theme_app_ring_light">#94AAE4</color>
+ <color name="system_theme_notif_light">#E0BBDD</color>
+ <color name="system_under_surface_light">#000000</color>
+ <color name="system_weather_temp_light">#4F659A</color>
+ <color name="system_widget_background_light">#EEF0FF</color>
<color name="system_brand_a_dark">#B0C6FF</color>
<color name="system_brand_b_dark">#DCE2F9</color>
<color name="system_brand_c_dark">#7A90C8</color>
<color name="system_brand_d_dark">#FDD7FA</color>
- <color name="system_under_surface_dark">#000000</color>
-<color name="system_shade_active_dark">#D9E2FF</color>
+ <color name="system_clock_hour_dark">#8A90A5</color>
+ <color name="system_clock_minute_dark">#D9E2FF</color>
+ <color name="system_clock_second_dark">#FDD7FA</color>
<color name="system_on_shade_active_dark">#001945</color>
<color name="system_on_shade_active_variant_dark">#2F4578</color>
- <color name="system_shade_inactive_dark">#2F3036</color>
<color name="system_on_shade_inactive_dark">#E1E2EC</color>
<color name="system_on_shade_inactive_variant_dark">#C5C6D0</color>
- <color name="system_shade_disabled_dark">#0C0E13</color>
+ <color name="system_on_theme_app_dark">#B0C6FF</color>
<color name="system_overview_background_dark">#50525A</color>
+ <color name="system_shade_active_dark">#D9E2FF</color>
+ <color name="system_shade_disabled_dark">#0C0E13</color>
+ <color name="system_shade_inactive_dark">#2F3036</color>
+ <color name="system_theme_app_dark">#2F4578</color>
+ <color name="system_theme_app_ring_dark">#94AAE4</color>
+ <color name="system_theme_notif_dark">#FDD7FA</color>
+ <color name="system_under_surface_dark">#000000</color>
+ <color name="system_weather_temp_dark">#B0C6FF</color>
+ <color name="system_widget_background_dark">#152E60</color>
<!-- Accessibility shortcut icon background color -->
<color name="accessibility_feature_background">#5F6368</color> <!-- Google grey 700 -->
diff --git a/core/res/res/values/colors_dynamic.xml b/core/res/res/values/colors_dynamic.xml
new file mode 100644
index 000000000000..ab283eb3c6c8
--- /dev/null
+++ b/core/res/res/values/colors_dynamic.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2024 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.
+-->
+
+<!-- Colors specific to Material themes. -->
+<resources>
+ <color name="materialColorBackground">@color/system_background_light</color>
+ <color name="materialColorControlActivated">@color/system_control_activated_light</color>
+ <color name="materialColorControlHighlight">@color/system_control_highlight_light</color>
+ <color name="materialColorControlNormal">@color/system_control_normal_light</color>
+ <color name="materialColorError">@color/system_error_light</color>
+ <color name="materialColorErrorContainer">@color/system_error_container_light</color>
+ <color name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</color>
+ <color name="materialColorInversePrimary">@color/system_inverse_primary_light</color>
+ <color name="materialColorInverseSurface">@color/system_inverse_surface_light</color>
+ <color name="materialColorOnBackground">@color/system_on_background_light</color>
+ <color name="materialColorOnError">@color/system_on_error_light</color>
+ <color name="materialColorOnErrorContainer">@color/system_on_error_container_light</color>
+ <color name="materialColorOnPrimary">@color/system_on_primary_light</color>
+ <color name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</color>
+ <color name="materialColorOnSecondary">@color/system_on_secondary_light</color>
+ <color name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</color>
+ <color name="materialColorOnSurface">@color/system_on_surface_light</color>
+ <color name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</color>
+ <color name="materialColorOnTertiary">@color/system_on_tertiary_light</color>
+ <color name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</color>
+ <color name="materialColorOutline">@color/system_outline_light</color>
+ <color name="materialColorOutlineVariant">@color/system_outline_variant_light</color>
+ <color name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</color>
+ <color name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</color>
+ <color name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</color>
+ <color name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</color>
+ <color name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</color>
+ <color name="materialColorPrimary">@color/system_primary_light</color>
+ <color name="materialColorPrimaryContainer">@color/system_primary_container_light</color>
+ <color name="materialColorScrim">@color/system_scrim_light</color>
+ <color name="materialColorSecondary">@color/system_secondary_light</color>
+ <color name="materialColorSecondaryContainer">@color/system_secondary_container_light</color>
+ <color name="materialColorShadow">@color/system_shadow_light</color>
+ <color name="materialColorSurface">@color/system_surface_light</color>
+ <color name="materialColorSurfaceBright">@color/system_surface_bright_light</color>
+ <color name="materialColorSurfaceContainer">@color/system_surface_container_light</color>
+ <color name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</color>
+ <color name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</color>
+ <color name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</color>
+ <color name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</color>
+ <color name="materialColorSurfaceDim">@color/system_surface_dim_light</color>
+ <color name="materialColorSurfaceTint">@color/system_surface_tint_light</color>
+ <color name="materialColorSurfaceVariant">@color/system_surface_variant_light</color>
+ <color name="materialColorTertiary">@color/system_tertiary_light</color>
+ <color name="materialColorTertiaryContainer">@color/system_tertiary_container_light</color>
+ <color name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</color>
+ <color name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</color>
+ <color name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</color>
+ <color name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</color>
+ <color name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</color>
+ <color name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</color>
+ <color name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</color>
+ <color name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</color>
+ <color name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</color>
+ <color name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</color>
+ <color name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</color>
+ <color name="materialColorPrimaryFixed">@color/system_primary_fixed</color>
+ <color name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</color>
+ <color name="materialColorSecondaryFixed">@color/system_secondary_fixed</color>
+ <color name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</color>
+ <color name="materialColorTertiaryFixed">@color/system_tertiary_fixed</color>
+ <color name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</color>
+ <color name="customColorBrandA">@color/system_brand_a_light</color>
+ <color name="customColorBrandB">@color/system_brand_b_light</color>
+ <color name="customColorBrandC">@color/system_brand_c_light</color>
+ <color name="customColorBrandD">@color/system_brand_d_light</color>
+ <color name="customColorClockHour">@color/system_clock_hour_light</color>
+ <color name="customColorClockMinute">@color/system_clock_minute_light</color>
+ <color name="customColorClockSecond">@color/system_clock_second_light</color>
+ <color name="customColorOnShadeActive">@color/system_on_shade_active_light</color>
+ <color name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</color>
+ <color name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</color>
+ <color name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</color>
+ <color name="customColorOnThemeApp">@color/system_on_theme_app_light</color>
+ <color name="customColorOverviewBackground">@color/system_overview_background_light</color>
+ <color name="customColorShadeActive">@color/system_shade_active_light</color>
+ <color name="customColorShadeDisabled">@color/system_shade_disabled_light</color>
+ <color name="customColorShadeInactive">@color/system_shade_inactive_light</color>
+ <color name="customColorThemeApp">@color/system_theme_app_light</color>
+ <color name="customColorThemeAppRing">@color/system_theme_app_ring_light</color>
+ <color name="customColorThemeNotif">@color/system_theme_notif_light</color>
+ <color name="customColorUnderSurface">@color/system_under_surface_light</color>
+ <color name="customColorWeatherTemp">@color/system_weather_temp_light</color>
+ <color name="customColorWidgetBackground">@color/system_widget_background_light</color>
+</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 5088b5af4725..3f4ea2df9266 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -5906,6 +5906,11 @@
<!-- <item>com.android.settings</item> -->
</string-array>
+ <!-- Certificate digests for trusted apps that will be allowed to obtain the knownSigner
+ SET_DEFAULT_ACCOUNT_FOR_CONTACTS permissions. The digest should be computed over the DER
+ encoding of the trusted certificate using the SHA-256 digest algorithm. -->
+ <string-array name="config_setContactsDefaultAccountKnownSigners">
+ </string-array>
<!-- Class name of the custom country detector to be used. -->
<string name="config_customCountryDetector" translatable="false">com.android.server.location.ComprehensiveCountryDetector</string>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index db752065289e..375748786817 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -247,9 +247,14 @@
<!-- Default padding for dialogs. -->
<dimen name="dialog_padding">16dp</dimen>
- <!-- The margin on the start of the content view (accommodates the icon) -->
+ <!-- The margin on the start of the content view (accommodates the icon)
+ This represents 16dp for the left margin + 24dp for the icon + 12dp for the right margin -->
<dimen name="notification_content_margin_start">52dp</dimen>
+ <!-- The margin on the start of the content view (accommodates the icon), 2025 redesign version
+ This represents 16dp for the left margin + 40dp for the icon + 16dp for the right margin -->
+ <dimen name="notification_2025_content_margin_start">72dp</dimen>
+
<!-- The margin on the end of most content views (ignores the expander) -->
<dimen name="notification_content_margin_end">16dp</dimen>
@@ -310,6 +315,9 @@
<!-- height of the notification header -->
<dimen name="notification_header_height">56dp</dimen>
+ <!-- height of the notification header (2025 redesign version) -->
+ <dimen name="notification_2025_header_height">72dp</dimen>
+
<!-- The height of the background for a notification header on a group -->
<dimen name="notification_header_background_height">49.5dp</dimen>
@@ -331,9 +339,17 @@
<!-- size (width and height) of the circle around the icon in the notification header -->
<dimen name="notification_icon_circle_size">24dp</dimen>
+ <!-- size (width and height) of the circular icon in the notification header
+ (2025 redesign version) -->
+ <dimen name="notification_2025_icon_circle_size">40dp</dimen>
+
<!-- padding between the notification icon and the circle containing it -->
<dimen name="notification_icon_circle_padding">4dp</dimen>
+ <!-- padding between the notification icon and the circle containing it
+ (2025 redesign version) -->
+ <dimen name="notification_2025_icon_circle_padding">8dp</dimen>
+
<!-- start margin of the icon circle in the notification view -->
<dimen name="notification_icon_circle_start">16dp</dimen>
@@ -803,6 +819,8 @@
<dimen name="notification_right_icon_big_margin_top">16dp</dimen>
<!-- The size of the left icon -->
<dimen name="notification_left_icon_size">@dimen/notification_icon_circle_size</dimen>
+ <!-- The size of the left icon (2025 redesign version) -->
+ <dimen name="notification_2025_left_icon_size">@dimen/notification_2025_icon_circle_size</dimen>
<!-- The left padding of the left icon -->
<dimen name="notification_left_icon_start">@dimen/notification_icon_circle_start</dimen>
<!-- The alpha of a disabled notification button -->
@@ -820,13 +838,13 @@
<!-- The gap between segments in the notification progress bar -->
<dimen name="notification_progress_segSeg_gap">2dp</dimen>
<!-- The gap between a segment and a point in the notification progress bar -->
- <dimen name="notification_progress_segPoint_gap">8dp</dimen>
- <!-- The dash gap of the notification progress bar segments -->
- <dimen name="notification_progress_segments_dash_gap">8dp</dimen>
- <!-- The dash width of the notification progress bar segments -->
- <dimen name="notification_progress_segments_dash_width">3dp</dimen>
+ <dimen name="notification_progress_segPoint_gap">4dp</dimen>
<!-- The height of the notification progress bar segments -->
<dimen name="notification_progress_segments_height">6dp</dimen>
+ <!-- The height of the notification progress bar faded segments -->
+ <dimen name="notification_progress_segments_faded_height">2dp</dimen>
+ <!-- The corner radius of the notification progress bar segments -->
+ <dimen name="notification_progress_segments_corner_radius">16dp</dimen>
<!-- The radius of the notification progress bar points -->
<dimen name="notification_progress_points_radius">6dp</dimen>
<!-- The corner radius of the notification progress bar points drawn as rects -->
diff --git a/core/res/res/values/public-staging.xml b/core/res/res/values/public-staging.xml
index ce46c649148c..b0b87d1dead6 100644
--- a/core/res/res/values/public-staging.xml
+++ b/core/res/res/values/public-staging.xml
@@ -151,6 +151,30 @@
</staging-public-group>
<staging-public-group type="color" first-id="0x01b20000">
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_inverse_on_surface_light"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_inverse_primary_light"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_inverse_surface_light"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_scrim_light"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_shadow_light"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_surface_tint_light"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_inverse_on_surface_dark"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_inverse_primary_dark"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_inverse_surface_dark"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_scrim_dark"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_shadow_dark"/>
+ <!-- @FlaggedApi(android.os.Flags.FLAG_MATERIAL_COLORS_10_2024)-->
+ <public name="system_surface_tint_dark"/>
</staging-public-group>
<staging-public-group type="array" first-id="0x01b10000">
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 0e120758a144..a2a19a23d431 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2389,6 +2389,8 @@
<java-symbol type="layout" name="notification_material_action" />
<java-symbol type="layout" name="notification_material_action_list" />
<java-symbol type="layout" name="notification_material_action_tombstone" />
+ <java-symbol type="layout" name="notification_2025_template_collapsed_base" />
+ <java-symbol type="layout" name="notification_2025_template_header" />
<java-symbol type="layout" name="notification_template_material_base" />
<java-symbol type="layout" name="notification_template_material_heads_up_base" />
<java-symbol type="layout" name="notification_template_material_compact_heads_up_base" />
@@ -3879,9 +3881,9 @@
<java-symbol type="dimen" name="notification_progress_tracker_height" />
<java-symbol type="dimen" name="notification_progress_segSeg_gap" />
<java-symbol type="dimen" name="notification_progress_segPoint_gap" />
- <java-symbol type="dimen" name="notification_progress_segments_dash_gap" />
- <java-symbol type="dimen" name="notification_progress_segments_dash_width" />
<java-symbol type="dimen" name="notification_progress_segments_height" />
+ <java-symbol type="dimen" name="notification_progress_segments_faded_height" />
+ <java-symbol type="dimen" name="notification_progress_segments_corner_radius" />
<java-symbol type="dimen" name="notification_progress_points_radius" />
<java-symbol type="dimen" name="notification_progress_points_corner_radius" />
<java-symbol type="dimen" name="notification_progress_points_inset" />
@@ -5314,73 +5316,91 @@
<java-symbol type="integer" name="config_aggregatedPowerStatsSpanDuration" />
<java-symbol type="integer" name="config_accumulatedBatteryUsageStatsSpanSize" />
- <java-symbol name="materialColorOnSecondaryFixedVariant" type="attr"/>
- <java-symbol name="materialColorOnTertiaryFixedVariant" type="attr"/>
- <java-symbol name="materialColorSurfaceContainerLowest" type="attr"/>
- <java-symbol name="materialColorOnPrimaryFixedVariant" type="attr"/>
- <java-symbol name="materialColorOnSecondaryContainer" type="attr"/>
- <java-symbol name="materialColorOnTertiaryContainer" type="attr"/>
- <java-symbol name="materialColorSurfaceContainerLow" type="attr"/>
- <java-symbol name="materialColorOnPrimaryContainer" type="attr"/>
- <java-symbol name="materialColorSecondaryFixedDim" type="attr"/>
- <java-symbol name="materialColorOnErrorContainer" type="attr"/>
- <java-symbol name="materialColorOnSecondaryFixed" type="attr"/>
- <java-symbol name="materialColorOnSurfaceInverse" type="attr"/>
- <java-symbol name="materialColorTertiaryFixedDim" type="attr"/>
- <java-symbol name="materialColorOnTertiaryFixed" type="attr"/>
- <java-symbol name="materialColorPrimaryFixedDim" type="attr"/>
- <java-symbol name="materialColorSecondaryContainer" type="attr"/>
- <java-symbol name="materialColorErrorContainer" type="attr"/>
- <java-symbol name="materialColorOnPrimaryFixed" type="attr"/>
- <java-symbol name="materialColorPrimaryInverse" type="attr"/>
- <java-symbol name="materialColorSecondaryFixed" type="attr"/>
- <java-symbol name="materialColorSurfaceInverse" type="attr"/>
- <java-symbol name="materialColorSurfaceVariant" type="attr"/>
- <java-symbol name="materialColorTertiaryContainer" type="attr"/>
- <java-symbol name="materialColorTertiaryFixed" type="attr"/>
- <java-symbol name="materialColorPrimaryContainer" type="attr"/>
- <java-symbol name="materialColorOnBackground" type="attr"/>
- <java-symbol name="materialColorPrimaryFixed" type="attr"/>
- <java-symbol name="materialColorOnSecondary" type="attr"/>
- <java-symbol name="materialColorOnTertiary" type="attr"/>
- <java-symbol name="materialColorSurfaceDim" type="attr"/>
- <java-symbol name="materialColorSurfaceBright" type="attr"/>
- <java-symbol name="materialColorOnError" type="attr"/>
- <java-symbol name="materialColorSurface" type="attr"/>
- <java-symbol name="materialColorSurfaceContainerHigh" type="attr"/>
- <java-symbol name="materialColorSurfaceContainerHighest" type="attr"/>
- <java-symbol name="materialColorOnSurfaceVariant" type="attr"/>
- <java-symbol name="materialColorOutline" type="attr"/>
- <java-symbol name="materialColorOutlineVariant" type="attr"/>
- <java-symbol name="materialColorOnPrimary" type="attr"/>
- <java-symbol name="materialColorOnSurface" type="attr"/>
- <java-symbol name="materialColorSurfaceContainer" type="attr"/>
- <java-symbol name="materialColorPrimary" type="attr"/>
- <java-symbol name="materialColorSecondary" type="attr"/>
- <java-symbol name="materialColorTertiary" type="attr"/>
- <java-symbol name="materialColorError" type="attr"/>
-
- <java-symbol name="customColorWidgetBackground" type="attr"/>
- <java-symbol name="customColorClockHour" type="attr"/>
- <java-symbol name="customColorClockMinute" type="attr"/>
- <java-symbol name="customColorClockSecond" type="attr"/>
- <java-symbol name="customColorThemeApp" type="attr"/>
- <java-symbol name="customColorOnThemeApp" type="attr"/>
- <java-symbol name="customColorThemeAppRing" type="attr"/>
- <java-symbol name="customColorThemeNotif" type="attr"/>
- <java-symbol name="customColorBrandA" type="attr"/>
- <java-symbol name="customColorBrandB" type="attr"/>
- <java-symbol name="customColorBrandC" type="attr"/>
- <java-symbol name="customColorBrandD" type="attr"/>
- <java-symbol name="customColorUnderSurface" type="attr"/>
- <java-symbol name="customColorShadeActive" type="attr"/>
- <java-symbol name="customColorOnShadeActive" type="attr"/>
- <java-symbol name="customColorOnShadeActiveVariant" type="attr"/>
- <java-symbol name="customColorShadeInactive" type="attr"/>
- <java-symbol name="customColorOnShadeInactive" type="attr"/>
- <java-symbol name="customColorOnShadeInactiveVariant" type="attr"/>
- <java-symbol name="customColorShadeDisabled" type="attr"/>
- <java-symbol name="customColorOverviewBackground" type="attr"/>
+ <!--Dynamic Tokens-->
+ <java-symbol type="attr" name="materialColorBackground"/>
+ <java-symbol type="attr" name="materialColorControlActivated"/>
+ <java-symbol type="attr" name="materialColorControlHighlight"/>
+ <java-symbol type="attr" name="materialColorControlNormal"/>
+ <java-symbol type="attr" name="materialColorError"/>
+ <java-symbol type="attr" name="materialColorErrorContainer"/>
+ <java-symbol type="attr" name="materialColorInverseOnSurface"/>
+ <java-symbol type="attr" name="materialColorInversePrimary"/>
+ <java-symbol type="attr" name="materialColorInverseSurface"/>
+ <java-symbol type="attr" name="materialColorOnBackground"/>
+ <java-symbol type="attr" name="materialColorOnError"/>
+ <java-symbol type="attr" name="materialColorOnErrorContainer"/>
+ <java-symbol type="attr" name="materialColorOnPrimary"/>
+ <java-symbol type="attr" name="materialColorOnPrimaryContainer"/>
+ <java-symbol type="attr" name="materialColorOnSecondary"/>
+ <java-symbol type="attr" name="materialColorOnSecondaryContainer"/>
+ <java-symbol type="attr" name="materialColorOnSurface"/>
+ <java-symbol type="attr" name="materialColorOnSurfaceVariant"/>
+ <java-symbol type="attr" name="materialColorOnTertiary"/>
+ <java-symbol type="attr" name="materialColorOnTertiaryContainer"/>
+ <java-symbol type="attr" name="materialColorOutline"/>
+ <java-symbol type="attr" name="materialColorOutlineVariant"/>
+ <java-symbol type="attr" name="materialColorPaletteKeyColorNeutral"/>
+ <java-symbol type="attr" name="materialColorPaletteKeyColorNeutralVariant"/>
+ <java-symbol type="attr" name="materialColorPaletteKeyColorPrimary"/>
+ <java-symbol type="attr" name="materialColorPaletteKeyColorSecondary"/>
+ <java-symbol type="attr" name="materialColorPaletteKeyColorTertiary"/>
+ <java-symbol type="attr" name="materialColorPrimary"/>
+ <java-symbol type="attr" name="materialColorPrimaryContainer"/>
+ <java-symbol type="attr" name="materialColorScrim"/>
+ <java-symbol type="attr" name="materialColorSecondary"/>
+ <java-symbol type="attr" name="materialColorSecondaryContainer"/>
+ <java-symbol type="attr" name="materialColorShadow"/>
+ <java-symbol type="attr" name="materialColorSurface"/>
+ <java-symbol type="attr" name="materialColorSurfaceBright"/>
+ <java-symbol type="attr" name="materialColorSurfaceContainer"/>
+ <java-symbol type="attr" name="materialColorSurfaceContainerHigh"/>
+ <java-symbol type="attr" name="materialColorSurfaceContainerHighest"/>
+ <java-symbol type="attr" name="materialColorSurfaceContainerLow"/>
+ <java-symbol type="attr" name="materialColorSurfaceContainerLowest"/>
+ <java-symbol type="attr" name="materialColorSurfaceDim"/>
+ <java-symbol type="attr" name="materialColorSurfaceTint"/>
+ <java-symbol type="attr" name="materialColorSurfaceVariant"/>
+ <java-symbol type="attr" name="materialColorTertiary"/>
+ <java-symbol type="attr" name="materialColorTertiaryContainer"/>
+ <java-symbol type="attr" name="materialColorTextHintInverse"/>
+ <java-symbol type="attr" name="materialColorTextPrimaryInverse"/>
+ <java-symbol type="attr" name="materialColorTextPrimaryInverseDisableOnly"/>
+ <java-symbol type="attr" name="materialColorTextSecondaryAndTertiaryInverse"/>
+ <java-symbol type="attr" name="materialColorTextSecondaryAndTertiaryInverseDisabled"/>
+ <java-symbol type="attr" name="materialColorOnPrimaryFixed"/>
+ <java-symbol type="attr" name="materialColorOnPrimaryFixedVariant"/>
+ <java-symbol type="attr" name="materialColorOnSecondaryFixed"/>
+ <java-symbol type="attr" name="materialColorOnSecondaryFixedVariant"/>
+ <java-symbol type="attr" name="materialColorOnTertiaryFixed"/>
+ <java-symbol type="attr" name="materialColorOnTertiaryFixedVariant"/>
+ <java-symbol type="attr" name="materialColorPrimaryFixed"/>
+ <java-symbol type="attr" name="materialColorPrimaryFixedDim"/>
+ <java-symbol type="attr" name="materialColorSecondaryFixed"/>
+ <java-symbol type="attr" name="materialColorSecondaryFixedDim"/>
+ <java-symbol type="attr" name="materialColorTertiaryFixed"/>
+ <java-symbol type="attr" name="materialColorTertiaryFixedDim"/>
+ <java-symbol type="attr" name="customColorBrandA"/>
+ <java-symbol type="attr" name="customColorBrandB"/>
+ <java-symbol type="attr" name="customColorBrandC"/>
+ <java-symbol type="attr" name="customColorBrandD"/>
+ <java-symbol type="attr" name="customColorClockHour"/>
+ <java-symbol type="attr" name="customColorClockMinute"/>
+ <java-symbol type="attr" name="customColorClockSecond"/>
+ <java-symbol type="attr" name="customColorOnShadeActive"/>
+ <java-symbol type="attr" name="customColorOnShadeActiveVariant"/>
+ <java-symbol type="attr" name="customColorOnShadeInactive"/>
+ <java-symbol type="attr" name="customColorOnShadeInactiveVariant"/>
+ <java-symbol type="attr" name="customColorOnThemeApp"/>
+ <java-symbol type="attr" name="customColorOverviewBackground"/>
+ <java-symbol type="attr" name="customColorShadeActive"/>
+ <java-symbol type="attr" name="customColorShadeDisabled"/>
+ <java-symbol type="attr" name="customColorShadeInactive"/>
+ <java-symbol type="attr" name="customColorThemeApp"/>
+ <java-symbol type="attr" name="customColorThemeAppRing"/>
+ <java-symbol type="attr" name="customColorThemeNotif"/>
+ <java-symbol type="attr" name="customColorUnderSurface"/>
+ <java-symbol type="attr" name="customColorWeatherTemp"/>
+ <java-symbol type="attr" name="customColorWidgetBackground"/>
<java-symbol name="system_widget_background_light" type="color"/>
<java-symbol name="system_clock_hour_light" type="color"/>
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index 352c3904406c..d8346d87f624 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -239,73 +239,90 @@ easier.
<item name="colorForeground">@color/foreground_device_default_dark</item>
<item name="colorForegroundInverse">@color/foreground_device_default_light</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<style name="Theme.DeviceDefault" parent="Theme.DeviceDefaultBase" />
@@ -357,73 +374,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar. This theme
@@ -474,73 +508,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar and
@@ -593,73 +644,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault} that has no title bar and translucent
@@ -711,73 +779,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- DeviceDefault theme for dialog windows and activities. This changes the window to be
@@ -837,73 +922,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Dialog} that has a nice minimum width for a
@@ -954,73 +1056,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Dialog} without an action bar -->
@@ -1070,73 +1189,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Dialog_NoActionBar} that has a nice minimum width
@@ -1187,73 +1323,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of Theme.DeviceDefault.Dialog that has a fixed size. -->
@@ -1320,73 +1473,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- DeviceDefault theme for a window without an action bar that will be displayed either
@@ -1438,73 +1608,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- DeviceDefault theme for a presentation window on a secondary display. -->
@@ -1554,73 +1741,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- DeviceDefault theme for panel windows. This removes all extraneous window
@@ -1672,73 +1876,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
@@ -1789,73 +2010,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
@@ -1906,73 +2144,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- DeviceDefault style for input methods, which is used by the
@@ -2023,73 +2278,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- DeviceDefault style for input methods, which is used by the
@@ -2140,73 +2412,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Material.Dialog.Alert">
@@ -2257,73 +2546,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Theme for the dialog shown when an app crashes or ANRs. -->
@@ -2379,73 +2685,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Material.Dialog.NoFrame">
@@ -2494,73 +2817,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault} with a light-colored style -->
@@ -2747,73 +3087,90 @@ easier.
<item name="colorPopupBackground">?attr/colorBackgroundFloating</item>
<item name="panelColorBackground">?attr/colorBackgroundFloating</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of the DeviceDefault (light) theme that has a solid (opaque) action bar with an
@@ -2864,73 +3221,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar -->
@@ -2980,73 +3354,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar and no status bar.
@@ -3097,73 +3488,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar and no status bar
@@ -3216,73 +3624,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Light} that has no title bar and translucent
@@ -3334,73 +3759,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- DeviceDefault light theme for dialog windows and activities. This changes the window to be
@@ -3458,73 +3900,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} that has a nice minimum width for a
@@ -3578,73 +4037,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} without an action bar -->
@@ -3697,73 +4173,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog_NoActionBar} that has a nice minimum
@@ -3817,73 +4310,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of Theme.DeviceDefault.Dialog that has a fixed size. -->
@@ -3918,73 +4428,90 @@ easier.
<item name="colorForeground">@color/foreground_device_default_light</item>
<item name="colorForegroundInverse">@color/foreground_device_default_dark</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of Theme.DeviceDefault.Dialog.NoActionBar that has a fixed size. -->
@@ -4019,73 +4546,90 @@ easier.
<item name="colorForeground">@color/foreground_device_default_light</item>
<item name="colorForegroundInverse">@color/foreground_device_default_dark</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- DeviceDefault light theme for a window that will be displayed either full-screen on smaller
@@ -4139,73 +4683,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- DeviceDefault light theme for a window without an action bar that will be displayed either
@@ -4260,73 +4821,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- DeviceDefault light theme for a presentation window on a secondary display. -->
@@ -4379,73 +4957,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- DeviceDefault light theme for panel windows. This removes all extraneous window
@@ -4497,73 +5092,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Light.Dialog.Alert" parent="Theme.Material.Light.Dialog.Alert">
@@ -4614,73 +5226,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Dialog.Alert.DayNight" parent="Theme.DeviceDefault.Light.Dialog.Alert" />
@@ -4731,73 +5360,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Light.Voice" parent="Theme.Material.Light.Voice">
@@ -4846,73 +5492,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- DeviceDefault theme for a window that should look like the Settings app. -->
@@ -4968,74 +5631,90 @@ easier.
<item name="colorListDivider">@color/list_divider_color_light</item>
<item name="opacityListDivider">@color/list_divider_opacity_device_default_light</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
-
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.SystemUI" parent="Theme.DeviceDefault.Light">
@@ -5072,74 +5751,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
-
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.SystemUI.Dialog" parent="Theme.DeviceDefault.Light.Dialog">
@@ -5168,74 +5863,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
-
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Variant of {@link #Theme_DeviceDefault_Settings_Dark} with no action bar -->
@@ -5286,73 +5997,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<style name="Theme.DeviceDefault.Settings.DialogBase" parent="Theme.Material.Light.BaseDialog">
@@ -5387,73 +6115,90 @@ easier.
<!-- Dialog attributes -->
<item name="alertDialogTheme">@style/Theme.DeviceDefault.Light.Dialog.Alert</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Settings.Dialog" parent="Theme.DeviceDefault.Settings.DialogBase">
@@ -5528,73 +6273,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Settings.Dialog.Alert" parent="Theme.Material.Settings.Dialog.Alert">
@@ -5647,73 +6409,90 @@ easier.
<!-- Toolbar attributes -->
<item name="toolbarStyle">@style/Widget.DeviceDefault.Toolbar</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Settings.Dialog.NoActionBar" parent="Theme.DeviceDefault.Light.Dialog.NoActionBar" />
@@ -5792,73 +6571,90 @@ easier.
<item name="colorAccentSecondary">@color/system_secondary_dark</item>
<item name="colorAccentTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<style name="ThemeOverlay.DeviceDefault.Accent.Light">
@@ -5867,73 +6663,90 @@ easier.
<item name="colorAccentSecondary">@color/system_secondary_dark</item>
<item name="colorAccentTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<!-- Theme overlay that replaces colorAccent with the colorAccent from {@link #Theme_DeviceDefault_DayNight}. -->
@@ -5946,73 +6759,90 @@ easier.
<item name="colorAccentSecondary">@color/system_secondary_dark</item>
<item name="colorAccentTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<style name="Theme.DeviceDefault.Light.Dialog.Alert.UserSwitchingDialog" parent="Theme.DeviceDefault.NoActionBar.Fullscreen">
@@ -6021,73 +6851,90 @@ easier.
<item name="layout_gravity">center</item>
<item name="windowAnimationStyle">@style/Animation.DeviceDefault.Dialog</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_dark</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorBackground">@color/system_background_light</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_light</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_light</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_light</item>
+ <item name="materialColorError">@color/system_error_light</item>
<item name="materialColorErrorContainer">@color/system_error_container_light</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_dark</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_dark</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_light</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_light</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_light</item>
<item name="materialColorOnBackground">@color/system_on_background_light</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
<item name="materialColorOnError">@color/system_on_error_light</item>
- <item name="materialColorSurface">@color/system_surface_light</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_light</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_light</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_light</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_light</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_light</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_light</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_light</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_light</item>
<item name="materialColorOutline">@color/system_outline_light</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_light</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_light</item>
- <item name="materialColorOnSurface">@color/system_on_surface_light</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_light</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_light</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_light</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_light</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_light</item>
<item name="materialColorPrimary">@color/system_primary_light</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_light</item>
+ <item name="materialColorScrim">@color/system_scrim_light</item>
<item name="materialColorSecondary">@color/system_secondary_light</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_light</item>
+ <item name="materialColorShadow">@color/system_shadow_light</item>
+ <item name="materialColorSurface">@color/system_surface_light</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_light</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_light</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_light</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_light</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_light</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_light</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_light</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_light</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_light</item>
<item name="materialColorTertiary">@color/system_tertiary_light</item>
- <item name="materialColorError">@color/system_error_light</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
- <item name="customColorClockHour">@color/system_clock_hour_light</item>
- <item name="customColorClockMinute">@color/system_clock_minute_light</item>
- <item name="customColorClockSecond">@color/system_clock_second_light</item>
- <item name="customColorThemeApp">@color/system_theme_app_light</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_light</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_light</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_light</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_light</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_light</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_light</item>
<item name="customColorBrandB">@color/system_brand_b_light</item>
<item name="customColorBrandC">@color/system_brand_c_light</item>
<item name="customColorBrandD">@color/system_brand_d_light</item>
- <item name="customColorUnderSurface">@color/system_under_surface_light</item>
- <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorClockHour">@color/system_clock_hour_light</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_light</item>
+ <item name="customColorClockSecond">@color/system_clock_second_light</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_light</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_light</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_light</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_light</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_light</item>
<item name="customColorOverviewBackground">@color/system_overview_background_light</item>
+ <item name="customColorShadeActive">@color/system_shade_active_light</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_light</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_light</item>
+ <item name="customColorThemeApp">@color/system_theme_app_light</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_light</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_light</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_light</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_light</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_light</item>
</style>
<style name="Theme.DeviceDefault.Notification" parent="@style/Theme.Material.Notification">
@@ -6107,73 +6954,90 @@ easier.
<item name="textColorPrimary">@color/system_neutral1_900</item>
<item name="textColorSecondary">@color/system_neutral2_700</item>
- <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
- <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
- <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
- <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
- <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
- <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
- <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
- <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
- <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
- <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
- <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
- <item name="materialColorOnSurfaceInverse">@color/system_on_surface_light</item>
- <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
- <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
- <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
- <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorBackground">@color/system_background_dark</item>
+ <item name="materialColorControlActivated">@color/system_control_activated_dark</item>
+ <item name="materialColorControlHighlight">@color/system_control_highlight_dark</item>
+ <item name="materialColorControlNormal">@color/system_control_normal_dark</item>
+ <item name="materialColorError">@color/system_error_dark</item>
<item name="materialColorErrorContainer">@color/system_error_container_dark</item>
- <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
- <item name="materialColorPrimaryInverse">@color/system_primary_light</item>
- <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
- <item name="materialColorSurfaceInverse">@color/system_surface_light</item>
- <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
- <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
- <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
- <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorInverseOnSurface">@color/system_inverse_on_surface_dark</item>
+ <item name="materialColorInversePrimary">@color/system_inverse_primary_dark</item>
+ <item name="materialColorInverseSurface">@color/system_inverse_surface_dark</item>
<item name="materialColorOnBackground">@color/system_on_background_dark</item>
- <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
- <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
- <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
- <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
- <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
<item name="materialColorOnError">@color/system_on_error_dark</item>
- <item name="materialColorSurface">@color/system_surface_dark</item>
- <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
- <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorOnErrorContainer">@color/system_on_error_container_dark</item>
+ <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
+ <item name="materialColorOnPrimaryContainer">@color/system_on_primary_container_dark</item>
+ <item name="materialColorOnSecondary">@color/system_on_secondary_dark</item>
+ <item name="materialColorOnSecondaryContainer">@color/system_on_secondary_container_dark</item>
+ <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
<item name="materialColorOnSurfaceVariant">@color/system_on_surface_variant_dark</item>
+ <item name="materialColorOnTertiary">@color/system_on_tertiary_dark</item>
+ <item name="materialColorOnTertiaryContainer">@color/system_on_tertiary_container_dark</item>
<item name="materialColorOutline">@color/system_outline_dark</item>
<item name="materialColorOutlineVariant">@color/system_outline_variant_dark</item>
- <item name="materialColorOnPrimary">@color/system_on_primary_dark</item>
- <item name="materialColorOnSurface">@color/system_on_surface_dark</item>
- <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorPaletteKeyColorNeutral">@color/system_palette_key_color_neutral_dark</item>
+ <item name="materialColorPaletteKeyColorNeutralVariant">@color/system_palette_key_color_neutral_variant_dark</item>
+ <item name="materialColorPaletteKeyColorPrimary">@color/system_palette_key_color_primary_dark</item>
+ <item name="materialColorPaletteKeyColorSecondary">@color/system_palette_key_color_secondary_dark</item>
+ <item name="materialColorPaletteKeyColorTertiary">@color/system_palette_key_color_tertiary_dark</item>
<item name="materialColorPrimary">@color/system_primary_dark</item>
+ <item name="materialColorPrimaryContainer">@color/system_primary_container_dark</item>
+ <item name="materialColorScrim">@color/system_scrim_dark</item>
<item name="materialColorSecondary">@color/system_secondary_dark</item>
+ <item name="materialColorSecondaryContainer">@color/system_secondary_container_dark</item>
+ <item name="materialColorShadow">@color/system_shadow_dark</item>
+ <item name="materialColorSurface">@color/system_surface_dark</item>
+ <item name="materialColorSurfaceBright">@color/system_surface_bright_dark</item>
+ <item name="materialColorSurfaceContainer">@color/system_surface_container_dark</item>
+ <item name="materialColorSurfaceContainerHigh">@color/system_surface_container_high_dark</item>
+ <item name="materialColorSurfaceContainerHighest">@color/system_surface_container_highest_dark</item>
+ <item name="materialColorSurfaceContainerLow">@color/system_surface_container_low_dark</item>
+ <item name="materialColorSurfaceContainerLowest">@color/system_surface_container_lowest_dark</item>
+ <item name="materialColorSurfaceDim">@color/system_surface_dim_dark</item>
+ <item name="materialColorSurfaceTint">@color/system_surface_tint_dark</item>
+ <item name="materialColorSurfaceVariant">@color/system_surface_variant_dark</item>
<item name="materialColorTertiary">@color/system_tertiary_dark</item>
- <item name="materialColorError">@color/system_error_dark</item>
-
- <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
- <item name="customColorClockHour">@color/system_clock_hour_dark</item>
- <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
- <item name="customColorClockSecond">@color/system_clock_second_dark</item>
- <item name="customColorThemeApp">@color/system_theme_app_dark</item>
- <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
- <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
- <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="materialColorTertiaryContainer">@color/system_tertiary_container_dark</item>
+ <item name="materialColorTextHintInverse">@color/system_text_hint_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverse">@color/system_text_primary_inverse_dark</item>
+ <item name="materialColorTextPrimaryInverseDisableOnly">@color/system_text_primary_inverse_disable_only_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverse">@color/system_text_secondary_and_tertiary_inverse_dark</item>
+ <item name="materialColorTextSecondaryAndTertiaryInverseDisabled">@color/system_text_secondary_and_tertiary_inverse_disabled_dark</item>
+ <item name="materialColorOnPrimaryFixed">@color/system_on_primary_fixed</item>
+ <item name="materialColorOnPrimaryFixedVariant">@color/system_on_primary_fixed_variant</item>
+ <item name="materialColorOnSecondaryFixed">@color/system_on_secondary_fixed</item>
+ <item name="materialColorOnSecondaryFixedVariant">@color/system_on_secondary_fixed_variant</item>
+ <item name="materialColorOnTertiaryFixed">@color/system_on_tertiary_fixed</item>
+ <item name="materialColorOnTertiaryFixedVariant">@color/system_on_tertiary_fixed_variant</item>
+ <item name="materialColorPrimaryFixed">@color/system_primary_fixed</item>
+ <item name="materialColorPrimaryFixedDim">@color/system_primary_fixed_dim</item>
+ <item name="materialColorSecondaryFixed">@color/system_secondary_fixed</item>
+ <item name="materialColorSecondaryFixedDim">@color/system_secondary_fixed_dim</item>
+ <item name="materialColorTertiaryFixed">@color/system_tertiary_fixed</item>
+ <item name="materialColorTertiaryFixedDim">@color/system_tertiary_fixed_dim</item>
<item name="customColorBrandA">@color/system_brand_a_dark</item>
<item name="customColorBrandB">@color/system_brand_b_dark</item>
<item name="customColorBrandC">@color/system_brand_c_dark</item>
<item name="customColorBrandD">@color/system_brand_d_dark</item>
- <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
- <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorClockHour">@color/system_clock_hour_dark</item>
+ <item name="customColorClockMinute">@color/system_clock_minute_dark</item>
+ <item name="customColorClockSecond">@color/system_clock_second_dark</item>
<item name="customColorOnShadeActive">@color/system_on_shade_active_dark</item>
<item name="customColorOnShadeActiveVariant">@color/system_on_shade_active_variant_dark</item>
- <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
<item name="customColorOnShadeInactive">@color/system_on_shade_inactive_dark</item>
<item name="customColorOnShadeInactiveVariant">@color/system_on_shade_inactive_variant_dark</item>
- <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorOnThemeApp">@color/system_on_theme_app_dark</item>
<item name="customColorOverviewBackground">@color/system_overview_background_dark</item>
+ <item name="customColorShadeActive">@color/system_shade_active_dark</item>
+ <item name="customColorShadeDisabled">@color/system_shade_disabled_dark</item>
+ <item name="customColorShadeInactive">@color/system_shade_inactive_dark</item>
+ <item name="customColorThemeApp">@color/system_theme_app_dark</item>
+ <item name="customColorThemeAppRing">@color/system_theme_app_ring_dark</item>
+ <item name="customColorThemeNotif">@color/system_theme_notif_dark</item>
+ <item name="customColorUnderSurface">@color/system_under_surface_dark</item>
+ <item name="customColorWeatherTemp">@color/system_weather_temp_dark</item>
+ <item name="customColorWidgetBackground">@color/system_widget_background_dark</item>
</style>
<style name="Theme.DeviceDefault.AutofillHalfScreenDialogList" parent="Theme.DeviceDefault.DayNight">
<item name="colorListDivider">@color/list_divider_opacity_device_default_light</item>
diff --git a/core/tests/coretests/BinderFrozenStateChangeCallbackTestApp/src/com/android/frameworks/coretests/bfscctestapp/BfsccTestAppCmdService.java b/core/tests/coretests/BinderFrozenStateChangeCallbackTestApp/src/com/android/frameworks/coretests/bfscctestapp/BfsccTestAppCmdService.java
index fe54aa8d87f0..945147db1ef5 100644
--- a/core/tests/coretests/BinderFrozenStateChangeCallbackTestApp/src/com/android/frameworks/coretests/bfscctestapp/BfsccTestAppCmdService.java
+++ b/core/tests/coretests/BinderFrozenStateChangeCallbackTestApp/src/com/android/frameworks/coretests/bfscctestapp/BfsccTestAppCmdService.java
@@ -18,6 +18,8 @@ package com.android.frameworks.coretests.bfscctestapp;
import android.app.Service;
import android.content.Intent;
+import android.os.Handler;
+import android.os.HandlerExecutor;
import android.os.IBinder;
import android.os.RemoteException;
@@ -36,6 +38,7 @@ public class BfsccTestAppCmdService extends Service {
@Override
public void listenTo(IBinder binder) throws RemoteException {
binder.addFrozenStateChangeCallback(
+ new HandlerExecutor(Handler.getMain()),
(IBinder who, int state) -> mNotifications.offer(state));
}
diff --git a/core/tests/coretests/src/android/app/PropertyInvalidatedCacheTests.java b/core/tests/coretests/src/android/app/PropertyInvalidatedCacheTests.java
index a2598f69e031..2fc72e1d3994 100644
--- a/core/tests/coretests/src/android/app/PropertyInvalidatedCacheTests.java
+++ b/core/tests/coretests/src/android/app/PropertyInvalidatedCacheTests.java
@@ -16,6 +16,7 @@
package android.app;
+import static android.app.Flags.FLAG_PIC_CACHE_NULLS;
import static android.app.Flags.FLAG_PIC_ISOLATE_CACHE_BY_UID;
import static android.app.PropertyInvalidatedCache.NONCE_UNSET;
import static android.app.PropertyInvalidatedCache.MODULE_BLUETOOTH;
@@ -229,7 +230,12 @@ public class PropertyInvalidatedCacheTests {
@Override
public String apply(Integer qv) {
mRecomputeCount += 1;
- return "foo" + qv.toString();
+ // Special case for testing caches of nulls. Integers in the range 30-40 return null.
+ if (qv >= 30 && qv < 40) {
+ return null;
+ } else {
+ return "foo" + qv.toString();
+ }
}
int getRecomputeCount() {
@@ -643,4 +649,35 @@ public class PropertyInvalidatedCacheTests {
Binder.restoreCallingWorkSource(token);
}
}
+
+ @RequiresFlagsEnabled(FLAG_PIC_CACHE_NULLS)
+ @Test
+ public void testCachingNulls() {
+ TestCache cache = new TestCache(new Args(MODULE_TEST)
+ .maxEntries(4).api("testCachingNulls").cacheNulls(true),
+ new TestQuery());
+ cache.invalidateCache();
+ assertEquals("foo1", cache.query(1));
+ assertEquals("foo2", cache.query(2));
+ assertEquals(null, cache.query(30));
+ assertEquals(3, cache.getRecomputeCount());
+ assertEquals("foo1", cache.query(1));
+ assertEquals("foo2", cache.query(2));
+ assertEquals(null, cache.query(30));
+ assertEquals(3, cache.getRecomputeCount());
+
+ cache = new TestCache(new Args(MODULE_TEST)
+ .maxEntries(4).api("testCachingNulls").cacheNulls(false),
+ new TestQuery());
+ cache.invalidateCache();
+ assertEquals("foo1", cache.query(1));
+ assertEquals("foo2", cache.query(2));
+ assertEquals(null, cache.query(30));
+ assertEquals(3, cache.getRecomputeCount());
+ assertEquals("foo1", cache.query(1));
+ assertEquals("foo2", cache.query(2));
+ assertEquals(null, cache.query(30));
+ // The recompute is 4 because nulls were not cached.
+ assertEquals(4, cache.getRecomputeCount());
+ }
}
diff --git a/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java b/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java
index 0db49a72c51d..ecacdb2bde0b 100644
--- a/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java
+++ b/core/tests/coretests/src/android/content/pm/parsing/ApkLiteParseUtilsTest.java
@@ -33,6 +33,7 @@ import android.content.pm.parsing.result.ParseTypeImpl;
import android.os.FileUtils;
import android.os.ParcelFileDescriptor;
import android.platform.test.annotations.Presubmit;
+import android.platform.test.annotations.RequiresFlagsEnabled;
import android.util.ArraySet;
import android.util.PackageUtils;
@@ -61,6 +62,7 @@ import java.util.List;
import java.util.Set;
@Presubmit
+@RequiresFlagsEnabled(android.content.pm.Flags.FLAG_SDK_DEPENDENCY_INSTALLER)
public class ApkLiteParseUtilsTest {
@Rule
diff --git a/core/tests/coretests/src/android/os/BinderFrozenStateChangeNotificationTest.java b/core/tests/coretests/src/android/os/BinderFrozenStateChangeNotificationTest.java
index 195a18a5f521..523fe1a8aa5d 100644
--- a/core/tests/coretests/src/android/os/BinderFrozenStateChangeNotificationTest.java
+++ b/core/tests/coretests/src/android/os/BinderFrozenStateChangeNotificationTest.java
@@ -200,7 +200,7 @@ public class BinderFrozenStateChangeNotificationTest {
IBinder.FrozenStateChangeCallback callback =
(IBinder who, int state) -> results.offer(who);
try {
- binder.addFrozenStateChangeCallback(callback);
+ binder.addFrozenStateChangeCallback(new HandlerExecutor(Handler.getMain()), callback);
} catch (UnsupportedOperationException e) {
return;
}
@@ -227,7 +227,7 @@ public class BinderFrozenStateChangeNotificationTest {
final IBinder.FrozenStateChangeCallback callback =
(IBinder who, int state) ->
queue.offer(state == IBinder.FrozenStateChangeCallback.STATE_FROZEN);
- binder.addFrozenStateChangeCallback(callback);
+ binder.addFrozenStateChangeCallback(new HandlerExecutor(Handler.getMain()), callback);
return callback;
} catch (UnsupportedOperationException e) {
return null;
diff --git a/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java b/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java
index 67de25eede42..75118873dd75 100644
--- a/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java
@@ -42,6 +42,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.FileDescriptor;
+import java.util.concurrent.Executor;
@SmallTest
@RunWith(AndroidJUnit4.class)
@@ -125,7 +126,7 @@ public class BinderDeathDispatcherTest {
}
@Override
- public void addFrozenStateChangeCallback(FrozenStateChangeCallback callback)
+ public void addFrozenStateChangeCallback(Executor e, FrozenStateChangeCallback callback)
throws RemoteException {
}
diff --git a/core/tests/vibrator/src/android/os/VibrationEffectTest.java b/core/tests/vibrator/src/android/os/VibrationEffectTest.java
index 1cd1190c4080..ccc5108abc19 100644
--- a/core/tests/vibrator/src/android/os/VibrationEffectTest.java
+++ b/core/tests/vibrator/src/android/os/VibrationEffectTest.java
@@ -414,10 +414,10 @@ public class VibrationEffectTest {
@Test
@EnableFlags(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
- public void computeLegacyPattern_effectsViaStartWaveformEnvelope() {
- // Effects created via startWaveformEnvelope are not expected to be converted to long[]
+ public void computeLegacyPattern_effectsViaWaveformEnvelopeBuilder() {
+ // Effects created via waveformEnvelopeBuilder are not expected to be converted to long[]
// patterns, as they are not configured to always play with the default amplitude.
- VibrationEffect effect = VibrationEffect.startWaveformEnvelope()
+ VibrationEffect effect = new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 50)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 80)
@@ -426,7 +426,8 @@ public class VibrationEffectTest {
assertNull(effect.computeCreateWaveformOffOnTimingsOrNull());
- effect = VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/ 60)
+ effect = new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 60)
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 50)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 80)
@@ -644,7 +645,7 @@ public class VibrationEffectTest {
@Test
@EnableFlags(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
public void testValidateWaveformEnvelopeBuilder() {
- VibrationEffect.startWaveformEnvelope()
+ new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 50)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 80)
@@ -652,7 +653,8 @@ public class VibrationEffectTest {
.build()
.validate();
- VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/ 30)
+ new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 50)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 80)
@@ -661,13 +663,13 @@ public class VibrationEffectTest {
.validate();
VibrationEffect.createRepeatingEffect(
- /*preamble=*/ VibrationEffect.startWaveformEnvelope()
+ /*preamble=*/ new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f,
/*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f,
/*timeMillis=*/ 50)
.build(),
- /*repeatingEffect=*/ VibrationEffect.startWaveformEnvelope()
+ /*repeatingEffect=*/ new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f,
/*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.5f, /*frequencyHz=*/ 150f,
@@ -676,7 +678,7 @@ public class VibrationEffectTest {
).validate();
VibrationEffect.createRepeatingEffect(
- /*effect=*/ VibrationEffect.startWaveformEnvelope()
+ /*effect=*/ new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f,
/*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.5f, /*frequencyHz=*/ 150f,
@@ -685,59 +687,70 @@ public class VibrationEffectTest {
).validate();
assertThrows(IllegalStateException.class,
- () -> VibrationEffect.startWaveformEnvelope().build().validate());
+ () -> new VibrationEffect.WaveformEnvelopeBuilder().build().validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope()
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ -1.0f, /*frequencyHz=*/ 60f,
/*timeMillis=*/ 20)
.build()
.validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope()
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 1.1f, /*frequencyHz=*/ 60f,
/*timeMillis=*/ 20)
.build()
.validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope()
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.8f, /*frequencyHz=*/ 0f,
/*timeMillis=*/ 20)
.build()
.validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope()
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.8f, /*frequencyHz=*/ 100f,
/*timeMillis=*/ 0)
.build()
.validate());
assertThrows(IllegalStateException.class,
- () -> VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/30)
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.build().validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/30)
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.addControlPoint(/*amplitude=*/ -1.0f, /*frequencyHz=*/ 60f,
/*timeMillis=*/ 20)
.build()
.validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/30)
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.addControlPoint(/*amplitude=*/ 1.1f, /*frequencyHz=*/ 60f,
/*timeMillis=*/ 20)
.build()
.validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/30)
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.addControlPoint(/*amplitude=*/ 0.8f, /*frequencyHz=*/ 0f,
/*timeMillis=*/ 20)
.build()
.validate());
assertThrows(IllegalArgumentException.class,
- () -> VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/30)
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.addControlPoint(/*amplitude=*/ 0.8f, /*frequencyHz=*/ 100f,
/*timeMillis=*/ 0)
.build()
.validate());
+ assertThrows(IllegalArgumentException.class,
+ () -> new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 0)
+ .addControlPoint(/*amplitude=*/ 0.8f, /*frequencyHz=*/ 100f,
+ /*timeMillis=*/ 20)
+ .build().validate());
}
@Test
@@ -1381,14 +1394,15 @@ public class VibrationEffectTest {
@Test
@EnableFlags(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
public void testIsHapticFeedbackCandidate_longEnvelopeEffects_notCandidates() {
- assertFalse(VibrationEffect.startWaveformEnvelope()
+ assertFalse(new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 200)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 500)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 800)
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 400)
.build()
.isHapticFeedbackCandidate());
- assertFalse(VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/ 40)
+ assertFalse(new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 40)
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 200)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 500)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 800)
@@ -1413,13 +1427,14 @@ public class VibrationEffectTest {
@Test
@EnableFlags(Flags.FLAG_NORMALIZED_PWLE_EFFECTS)
public void testIsHapticFeedbackCandidate_shortEnvelopeEffects_areCandidates() {
- assertTrue(VibrationEffect.startWaveformEnvelope()
+ assertTrue(new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 500)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 400)
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 100)
.build()
.isHapticFeedbackCandidate());
- assertTrue(VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/ 30)
+ assertTrue(new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 500)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 400)
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 100)
diff --git a/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml b/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml
index a18a2510f0f7..bfd9c818a96e 100644
--- a/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml
+++ b/libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml
@@ -23,7 +23,7 @@
android:clipChildren="false"
android:clipToPadding="false"
android:paddingBottom="@dimen/desktop_mode_handle_menu_pill_elevation"
- android:paddingRight="@dimen/desktop_mode_handle_menu_pill_elevation"
+ android:paddingEnd="@dimen/desktop_mode_handle_menu_pill_elevation"
android:orientation="vertical">
<LinearLayout
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 39dc26797a81..603a9ec6bedb 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
@@ -2087,8 +2087,9 @@ public class BubbleController implements ConfigurationChangeListener,
BubbleLogger.Event event = isExpanded ? BubbleLogger.Event.BUBBLE_BAR_EXPANDED
: BubbleLogger.Event.BUBBLE_BAR_COLLAPSED;
- if (mBubbleData.getSelectedBubble() instanceof Bubble bubble) {
- mLogger.log(bubble, event);
+ BubbleViewProvider selectedBubble = mBubbleData.getSelectedBubble();
+ if (selectedBubble instanceof Bubble) {
+ mLogger.log((Bubble) selectedBubble, event);
} else {
mLogger.log(event);
}
@@ -2099,8 +2100,9 @@ public class BubbleController implements ConfigurationChangeListener,
// Only need to update the layer view if we're currently expanded for selection changes.
if (mLayerView != null && mLayerView.isExpanded()) {
mLayerView.showExpandedView(selectedBubble);
- if (selectedBubble instanceof Bubble bubble) {
- mLogger.log(bubble, BubbleLogger.Event.BUBBLE_BAR_BUBBLE_SWITCHED);
+ if (selectedBubble instanceof Bubble) {
+ mLogger.log((Bubble) selectedBubble,
+ BubbleLogger.Event.BUBBLE_BAR_BUBBLE_SWITCHED);
}
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxCommandHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxCommandHandler.kt
new file mode 100644
index 000000000000..819b11095a9b
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxCommandHandler.kt
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2024 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.wm.shell.compatui.letterbox
+
+import android.content.Context
+import android.graphics.Color
+import com.android.internal.protolog.ProtoLog
+import com.android.window.flags.Flags
+import com.android.wm.shell.dagger.WMSingleton
+import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_APP_COMPAT
+import com.android.wm.shell.sysui.ShellCommandHandler
+import com.android.wm.shell.sysui.ShellCommandHandler.ShellCommandActionHandler
+import com.android.wm.shell.sysui.ShellInit
+import java.io.PrintWriter
+import javax.inject.Inject
+
+/**
+ * Handles the shell commands for the CompatUI.
+ *
+ * <p> Use with [adb shell dumpsys activity service SystemUIService WMShell letterbox
+ * &lt;command&gt;].
+ */
+@WMSingleton
+class LetterboxCommandHandler @Inject constructor(
+ private val context: Context,
+ shellInit: ShellInit,
+ shellCommandHandler: ShellCommandHandler,
+ private val letterboxConfiguration: LetterboxConfiguration
+) : ShellCommandActionHandler {
+
+ companion object {
+ @JvmStatic
+ private val TAG = "LetterboxCommandHandler"
+ }
+
+ init {
+ if (Flags.appCompatRefactoring()) {
+ ProtoLog.v(
+ WM_SHELL_APP_COMPAT,
+ "%s: %s",
+ TAG,
+ "Initializing LetterboxCommandHandler"
+ )
+ shellInit.addInitCallback({
+ shellCommandHandler.addCommandCallback("letterbox", this, this)
+ }, this)
+ }
+ }
+
+ override fun onShellCommand(args: Array<out String>?, pw: PrintWriter?): Boolean {
+ if (args == null || pw == null) {
+ pw!!.println("Missing arguments.")
+ return false
+ }
+ return when (args.size) {
+ 1 -> onShellDisplayCommand(args[0], pw)
+ 2 -> onShellUpdateCommand(args[0], args[1], pw)
+ else -> {
+ pw.println("Invalid command: " + args[0])
+ return false
+ }
+ }
+ }
+
+ override fun printShellCommandHelp(pw: PrintWriter?, prefix: String?) {
+ pw?.println(
+ """
+ $prefix backgroundColor color"
+ $prefix Color of letterbox which is to be used when letterbox background
+ $prefix type is 'solid-color'. See Color#parseColor for allowed color
+ $prefix formats (#RRGGBB and some colors by name, e.g. magenta or olive).
+ $prefix backgroundColorResource resource_name"
+ $prefix Color resource name of letterbox background which is used when
+ $prefix background type is 'solid-color'. Parameter is a color resource
+ $prefix name, for example, @android:color/system_accent2_50.
+ $prefix backgroundColorReset"
+ $prefix Resets the background color to the default value."
+ """.trimIndent()
+ )
+ }
+
+ private fun onShellUpdateCommand(command: String, value: String, pw: PrintWriter): Boolean {
+ when (command) {
+ "backgroundColor" -> {
+ return invokeWhenValid(
+ pw,
+ value,
+ ::strToColor,
+ { color ->
+ letterboxConfiguration.setLetterboxBackgroundColor(color)
+ },
+ { c -> "$c is not a valid color." }
+ )
+ }
+
+ "backgroundColorResource" -> return invokeWhenValid(
+ pw,
+ value,
+ ::nameToColorId,
+ { color ->
+ letterboxConfiguration.setLetterboxBackgroundColorResourceId(color)
+ },
+ { c ->
+ "$c is not a valid resource. Color in '@android:color/resource_name'" +
+ " format should be provided as an argument."
+ }
+ )
+
+ "backgroundColorReset" -> {
+ letterboxConfiguration.resetLetterboxBackgroundColor()
+ return true
+ }
+
+ else -> {
+ pw.println("Invalid command: $value")
+ return false
+ }
+ }
+ }
+
+ private fun onShellDisplayCommand(command: String, pw: PrintWriter): Boolean {
+ when (command) {
+ "backgroundColor" -> {
+ pw.println(
+ " Background color: " + Integer.toHexString(
+ letterboxConfiguration.getLetterboxBackgroundColor()
+ .toArgb()
+ )
+ )
+ return true
+ }
+
+ else -> {
+ pw.println("Invalid command: $command")
+ return false
+ }
+ }
+ }
+
+ private fun <T> invokeWhenValid(
+ pw: PrintWriter,
+ input: String,
+ converter: (String) -> T?,
+ consumer: (T) -> Unit,
+ errorMessage: (String) -> String = { value -> " Wrong input value: $value." }
+ ): Boolean {
+ converter(input)?.let {
+ consumer(it)
+ return true
+ }
+ pw.println(errorMessage(input))
+ return false
+ }
+
+ // Converts a String to Color if possible or it returns null otherwise.
+ private fun strToColor(str: String): Color? =
+ try {
+ Color.valueOf(Color.parseColor(str))
+ } catch (e: IllegalArgumentException) {
+ null
+ }
+
+ // Converts a resource id to Color if possible or it returns null otherwise.
+ private fun nameToColorId(str: String): Int? =
+ try {
+ context.resources.getIdentifier(str, "color", "com.android.internal")
+ } catch (e: IllegalArgumentException) {
+ null
+ }
+}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxConfiguration.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxConfiguration.kt
new file mode 100644
index 000000000000..83a8e3103e3f
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxConfiguration.kt
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2024 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.wm.shell.compatui.letterbox
+
+import android.annotation.ColorRes
+import android.content.Context
+import android.graphics.Color
+import com.android.internal.R
+import com.android.wm.shell.dagger.WMSingleton
+import javax.inject.Inject
+
+/**
+ * Contains configuration properties for the letterbox implementation in Shell.
+ */
+@WMSingleton
+class LetterboxConfiguration @Inject constructor(
+ private val context: Context
+) {
+ // Color to use for the solid color letterbox background type.
+ private var letterboxBackgroundColorOverride: Color? = null
+
+ // Color resource id for the solid color letterbox background type.
+ private var letterboxBackgroundColorResourceIdOverride: Int? = null
+
+ /**
+ * Sets color of letterbox background which is used when using the solid background mode.
+ */
+ fun setLetterboxBackgroundColor(color: Color) {
+ letterboxBackgroundColorOverride = color
+ }
+
+ /**
+ * Sets color ID of letterbox background which is used when using the solid background mode.
+ */
+ fun setLetterboxBackgroundColorResourceId(@ColorRes colorId: Int) {
+ letterboxBackgroundColorResourceIdOverride = colorId
+ }
+
+ /**
+ * Gets color of letterbox background which is used when the solid color mode is active.
+ */
+ fun getLetterboxBackgroundColor(): Color {
+ if (letterboxBackgroundColorOverride != null) {
+ return letterboxBackgroundColorOverride!!
+ }
+ val colorId = if (letterboxBackgroundColorResourceIdOverride != null) {
+ letterboxBackgroundColorResourceIdOverride
+ } else {
+ R.color.config_letterboxBackgroundColor
+ }
+ // Query color dynamically because material colors extracted from wallpaper are updated
+ // when wallpaper is changed.
+ return Color.valueOf(context.getResources().getColor(colorId!!, /* theme */null))
+ }
+
+ /**
+ * Resets color of letterbox background to the default.
+ */
+ fun resetLetterboxBackgroundColor() {
+ letterboxBackgroundColorOverride = null
+ letterboxBackgroundColorResourceIdOverride = null
+ }
+
+ /**
+ * The background color for the Letterbox.
+ */
+ fun getBackgroundColorRgbArray(): FloatArray = getLetterboxBackgroundColor().components
+}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxController.kt
index 406823de8269..0ac7aff306a0 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/letterbox/LetterboxController.kt
@@ -16,7 +16,6 @@
package com.android.wm.shell.compatui.letterbox
-import android.graphics.Color
import android.graphics.Rect
import android.view.SurfaceControl
import com.android.internal.protolog.ProtoLog
@@ -28,7 +27,9 @@ import javax.inject.Inject
* Component responsible for handling the lifecycle of the letterbox surfaces.
*/
@WMSingleton
-class LetterboxController @Inject constructor() {
+class LetterboxController @Inject constructor(
+ private val letterboxConfiguration: LetterboxConfiguration
+) {
companion object {
/*
@@ -64,8 +65,7 @@ class LetterboxController @Inject constructor() {
this,
TASK_CHILD_LAYER_LETTERBOX_BACKGROUND
).setColorSpaceAgnostic(this, true)
- // TODO(b/370940063): Implement LetterboxConfiguration
- .setColor(this, Color.valueOf(Color.YELLOW).components)
+ .setColor(this, letterboxConfiguration.getBackgroundColorRgbArray())
}
)
})
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
index 307e12ea7555..96f80245c76c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java
@@ -20,6 +20,9 @@ import static android.window.DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_ENTER_TRA
import static android.window.DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_TASK_LIMIT;
import static android.window.DesktopModeFlags.ENABLE_WINDOWING_TRANSITION_HANDLERS_OBSERVERS;
+import static com.android.hardware.input.Flags.manageKeyGestures;
+import static com.android.hardware.input.Flags.useKeyGestureEventHandler;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.KeyguardManager;
@@ -63,6 +66,7 @@ import com.android.wm.shell.common.MultiInstanceHelper;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.common.TaskStackListenerImpl;
+import com.android.wm.shell.compatui.letterbox.LetterboxCommandHandler;
import com.android.wm.shell.compatui.letterbox.LetterboxController;
import com.android.wm.shell.compatui.letterbox.LetterboxTransitionObserver;
import com.android.wm.shell.dagger.back.ShellBackAnimationModule;
@@ -76,6 +80,7 @@ import com.android.wm.shell.desktopmode.DesktopImmersiveController;
import com.android.wm.shell.desktopmode.DesktopMixedTransitionHandler;
import com.android.wm.shell.desktopmode.DesktopModeDragAndDropTransitionHandler;
import com.android.wm.shell.desktopmode.DesktopModeEventLogger;
+import com.android.wm.shell.desktopmode.DesktopModeKeyGestureHandler;
import com.android.wm.shell.desktopmode.DesktopModeLoggerTransitionObserver;
import com.android.wm.shell.desktopmode.DesktopRepository;
import com.android.wm.shell.desktopmode.DesktopTaskChangeListener;
@@ -758,8 +763,6 @@ public abstract class WMShellModule {
dragToDesktopTransitionHandler,
desktopImmersiveController.get(),
desktopRepository,
- desktopModeLoggerTransitionObserver,
- launchAdjacentController,
recentsTransitionHandler,
multiInstanceHelper,
mainExecutor,
@@ -767,8 +770,6 @@ public abstract class WMShellModule {
recentTasksController.orElse(null),
interactionJankMonitor,
mainHandler,
- inputManager,
- focusTransitionObserver,
desktopModeEventLogger,
desktopTilingDecorViewModel);
}
@@ -883,6 +884,72 @@ public abstract class WMShellModule {
@WMSingleton
@Provides
+ static Optional<DesktopModeKeyGestureHandler> provideDesktopModeKeyGestureHandler(
+ Context context,
+ Optional<DesktopModeWindowDecorViewModel> desktopModeWindowDecorViewModel,
+ Optional<DesktopTasksController> desktopTasksController,
+ InputManager inputManager,
+ ShellTaskOrganizer shellTaskOrganizer,
+ FocusTransitionObserver focusTransitionObserver) {
+ if (DesktopModeStatus.canEnterDesktopMode(context) && useKeyGestureEventHandler()
+ && manageKeyGestures()
+ && (Flags.enableMoveToNextDisplayShortcut()
+ || Flags.enableTaskResizingKeyboardShortcuts())) {
+ return Optional.of(new DesktopModeKeyGestureHandler(context,
+ desktopModeWindowDecorViewModel, desktopTasksController,
+ inputManager, shellTaskOrganizer, focusTransitionObserver));
+ }
+ return Optional.empty();
+ }
+
+ @WMSingleton
+ @Provides
+ static Optional<DesktopModeWindowDecorViewModel> provideDesktopModeWindowDecorViewModel(
+ Context context,
+ @ShellMainThread ShellExecutor shellExecutor,
+ @ShellMainThread Handler mainHandler,
+ Choreographer mainChoreographer,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
+ ShellInit shellInit,
+ ShellCommandHandler shellCommandHandler,
+ IWindowManager windowManager,
+ ShellTaskOrganizer taskOrganizer,
+ @DynamicOverride DesktopRepository desktopRepository,
+ DisplayController displayController,
+ ShellController shellController,
+ DisplayInsetsController displayInsetsController,
+ SyncTransactionQueue syncQueue,
+ Transitions transitions,
+ Optional<DesktopTasksController> desktopTasksController,
+ RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer,
+ InteractionJankMonitor interactionJankMonitor,
+ AppToWebGenericLinksParser genericLinksParser,
+ AssistContentRequester assistContentRequester,
+ MultiInstanceHelper multiInstanceHelper,
+ Optional<DesktopTasksLimiter> desktopTasksLimiter,
+ AppHandleEducationController appHandleEducationController,
+ AppToWebEducationController appToWebEducationController,
+ WindowDecorCaptionHandleRepository windowDecorCaptionHandleRepository,
+ Optional<DesktopActivityOrientationChangeHandler> activityOrientationChangeHandler,
+ FocusTransitionObserver focusTransitionObserver,
+ DesktopModeEventLogger desktopModeEventLogger
+ ) {
+ if (!DesktopModeStatus.canEnterDesktopMode(context)) {
+ return Optional.empty();
+ }
+ return Optional.of(new DesktopModeWindowDecorViewModel(context, shellExecutor, mainHandler,
+ mainChoreographer, bgExecutor, shellInit, shellCommandHandler, windowManager,
+ taskOrganizer, desktopRepository, displayController, shellController,
+ displayInsetsController, syncQueue, transitions, desktopTasksController,
+ rootTaskDisplayAreaOrganizer, interactionJankMonitor, genericLinksParser,
+ assistContentRequester, multiInstanceHelper, desktopTasksLimiter,
+ appHandleEducationController, appToWebEducationController,
+ windowDecorCaptionHandleRepository, activityOrientationChangeHandler,
+ focusTransitionObserver, desktopModeEventLogger));
+ }
+
+ @WMSingleton
+ @Provides
static EnterDesktopTaskTransitionHandler provideEnterDesktopModeTaskTransitionHandler(
Transitions transitions,
Optional<DesktopTasksLimiter> desktopTasksLimiter,
@@ -1233,8 +1300,10 @@ public abstract class WMShellModule {
static Object provideIndependentShellComponentsToCreate(
DragAndDropController dragAndDropController,
@NonNull LetterboxTransitionObserver letterboxTransitionObserver,
+ @NonNull LetterboxCommandHandler letterboxCommandHandler,
Optional<DesktopTasksTransitionObserver> desktopTasksTransitionObserverOptional,
- Optional<DesktopDisplayEventHandler> desktopDisplayEventHandler) {
+ Optional<DesktopDisplayEventHandler> desktopDisplayEventHandler,
+ Optional<DesktopModeKeyGestureHandler> desktopModeKeyGestureHandler) {
return new Object();
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandler.kt
new file mode 100644
index 000000000000..ac07eaa695c1
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandler.kt
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2024 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.wm.shell.desktopmode
+
+import android.hardware.input.KeyGestureEvent
+
+import android.hardware.input.InputManager
+import android.hardware.input.InputManager.KeyGestureEventHandler
+import android.os.IBinder
+import com.android.window.flags.Flags.enableMoveToNextDisplayShortcut
+import com.android.wm.shell.ShellTaskOrganizer
+import android.app.ActivityManager.RunningTaskInfo
+import com.android.wm.shell.windowdecor.DesktopModeWindowDecorViewModel
+import com.android.internal.protolog.ProtoLog
+import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
+import android.content.Context
+import com.android.hardware.input.Flags.manageKeyGestures
+import com.android.window.flags.Flags.enableTaskResizingKeyboardShortcuts
+import com.android.wm.shell.desktopmode.DesktopModeEventLogger.Companion.ResizeTrigger
+import com.android.wm.shell.transition.FocusTransitionObserver
+import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE
+import java.util.Optional
+
+/**
+ * Handles key gesture events (keyboard shortcuts) in Desktop Mode.
+ */
+class DesktopModeKeyGestureHandler(
+ private val context: Context,
+ private val desktopModeWindowDecorViewModel: Optional<DesktopModeWindowDecorViewModel>,
+ private val desktopTasksController: Optional<DesktopTasksController>,
+ inputManager: InputManager,
+ private val shellTaskOrganizer: ShellTaskOrganizer,
+ private val focusTransitionObserver: FocusTransitionObserver,
+ ) : KeyGestureEventHandler {
+
+ init {
+ inputManager.registerKeyGestureEventHandler(this)
+ }
+
+ override fun handleKeyGestureEvent(event: KeyGestureEvent, focusedToken: IBinder?): Boolean {
+ if (!isKeyGestureSupported(event.keyGestureType) || !desktopTasksController.isPresent
+ || !desktopModeWindowDecorViewModel.isPresent) {
+ return false
+ }
+ when (event.keyGestureType) {
+ KeyGestureEvent.KEY_GESTURE_TYPE_MOVE_TO_NEXT_DISPLAY -> {
+ logV("Key gesture MOVE_TO_NEXT_DISPLAY is handled")
+ getGloballyFocusedFreeformTask()?.let {
+ desktopTasksController.get().moveToNextDisplay(
+ it.taskId
+ )
+ }
+ return true
+ }
+ // TODO(b/375356876): Modify function to pass in keyboard shortcut as the input
+ // method for logging task resize
+ KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW -> {
+ logV("Key gesture SNAP_LEFT_FREEFORM_WINDOW is handled")
+ getGloballyFocusedFreeformTask()?.let {
+ desktopModeWindowDecorViewModel.get().onSnapResize(
+ it.taskId,
+ true,
+ null
+ )
+ }
+ return true
+ }
+ KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW -> {
+ logV("Key gesture SNAP_RIGHT_FREEFORM_WINDOW is handled")
+ getGloballyFocusedFreeformTask()?.let {
+ desktopModeWindowDecorViewModel.get().onSnapResize(
+ it.taskId,
+ false,
+ null
+ )
+ }
+ return true
+ }
+ KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW -> {
+ logV("Key gesture TOGGLE_MAXIMIZE_FREEFORM_WINDOW is handled")
+ getGloballyFocusedFreeformTask()?.let {
+ desktopTasksController.get().toggleDesktopTaskSize(
+ it,
+ ResizeTrigger.MAXIMIZE_MENU,
+ null,
+ )
+ }
+ return true
+ }
+ KeyGestureEvent.KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW -> {
+ logV("Key gesture MINIMIZE_FREEFORM_WINDOW is handled")
+ getGloballyFocusedFreeformTask()?.let {
+ desktopTasksController.get().minimizeTask(
+ it,
+ )
+ }
+ return true
+ }
+ else -> return false
+ }
+ }
+
+ override fun isKeyGestureSupported(gestureType: Int): Boolean = when (gestureType) {
+ KeyGestureEvent.KEY_GESTURE_TYPE_MOVE_TO_NEXT_DISPLAY
+ -> enableMoveToNextDisplayShortcut()
+ KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW,
+ KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW,
+ KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW,
+ KeyGestureEvent.KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW
+ -> enableTaskResizingKeyboardShortcuts() && manageKeyGestures()
+ else -> false
+ }
+
+ // TODO: b/364154795 - wait for the completion of moveToNextDisplay transition, otherwise it
+ // will pick a wrong task when a user quickly perform other actions with keyboard shortcuts
+ // after moveToNextDisplay, and move this to FocusTransitionObserver class.
+ private fun getGloballyFocusedFreeformTask(): RunningTaskInfo? =
+ shellTaskOrganizer.getRunningTasks().find { taskInfo ->
+ taskInfo.windowingMode == WINDOWING_MODE_FREEFORM &&
+ focusTransitionObserver.hasGlobalFocus(taskInfo)
+ }
+
+ private fun logV(msg: String, vararg arguments: Any?) {
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "%s: $msg", TAG, *arguments)
+ }
+
+ companion object {
+ private const val TAG = "DesktopModeKeyGestureHandler"
+ }
+}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
index 4db0be5c9025..0a39076a8768 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt
@@ -35,9 +35,6 @@ import android.graphics.Point
import android.graphics.PointF
import android.graphics.Rect
import android.graphics.Region
-import android.hardware.input.InputManager
-import android.hardware.input.InputManager.KeyGestureEventHandler
-import android.hardware.input.KeyGestureEvent
import android.os.Binder
import android.os.Handler
import android.os.IBinder
@@ -46,7 +43,6 @@ import android.os.UserHandle
import android.util.Size
import android.view.Display.DEFAULT_DISPLAY
import android.view.DragEvent
-import android.view.KeyEvent
import android.view.MotionEvent
import android.view.SurfaceControl
import android.view.SurfaceControl.Transaction
@@ -66,7 +62,6 @@ import android.window.TransitionInfo.Change
import android.window.TransitionRequestInfo
import android.window.WindowContainerTransaction
import androidx.annotation.BinderThread
-import com.android.hardware.input.Flags.useKeyGestureEventHandler
import com.android.internal.annotations.VisibleForTesting
import com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD
import com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE
@@ -75,13 +70,12 @@ import com.android.internal.jank.InteractionJankMonitor
import com.android.internal.policy.ScreenDecorationsUtils
import com.android.internal.protolog.ProtoLog
import com.android.window.flags.Flags
-import com.android.window.flags.Flags.enableMoveToNextDisplayShortcut
+import com.android.wm.shell.R
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayLayout
import com.android.wm.shell.common.ExternalInterfaceBinder
-import com.android.wm.shell.common.LaunchAdjacentController
import com.android.wm.shell.common.MultiInstanceHelper
import com.android.wm.shell.common.MultiInstanceHelper.Companion.getComponent
import com.android.wm.shell.common.RemoteCallable
@@ -116,7 +110,6 @@ import com.android.wm.shell.sysui.ShellCommandHandler
import com.android.wm.shell.sysui.ShellController
import com.android.wm.shell.sysui.ShellInit
import com.android.wm.shell.sysui.UserChangeListener
-import com.android.wm.shell.transition.FocusTransitionObserver
import com.android.wm.shell.transition.OneShotRemoteHandler
import com.android.wm.shell.transition.Transitions
import com.android.wm.shell.transition.Transitions.TransitionFinishCallback
@@ -134,6 +127,10 @@ import java.util.Optional
import java.util.concurrent.Executor
import java.util.function.Consumer
import com.android.wm.shell.desktopmode.DesktopModeEventLogger.Companion.ResizeTrigger
+import com.android.wm.shell.desktopmode.DragToDesktopTransitionHandler.Companion.DRAG_TO_DESKTOP_FINISH_ANIM_DURATION_MS
+import com.android.wm.shell.desktopmode.EnterDesktopTaskTransitionHandler.FREEFORM_ANIMATION_DURATION
+import com.android.wm.shell.desktopmode.ExitDesktopTaskTransitionHandler.FULLSCREEN_ANIMATION_DURATION
+
/** Handles moving tasks in and out of desktop */
class DesktopTasksController(
private val context: Context,
@@ -156,8 +153,6 @@ class DesktopTasksController(
private val dragToDesktopTransitionHandler: DragToDesktopTransitionHandler,
private val desktopImmersiveController: DesktopImmersiveController,
private val taskRepository: DesktopRepository,
- private val desktopModeLoggerTransitionObserver: DesktopModeLoggerTransitionObserver,
- private val launchAdjacentController: LaunchAdjacentController,
private val recentsTransitionHandler: RecentsTransitionHandler,
private val multiInstanceHelper: MultiInstanceHelper,
@ShellMainThread private val mainExecutor: ShellExecutor,
@@ -165,16 +160,13 @@ class DesktopTasksController(
private val recentTasksController: RecentTasksController?,
private val interactionJankMonitor: InteractionJankMonitor,
@ShellMainThread private val handler: Handler,
- private val inputManager: InputManager,
- private val focusTransitionObserver: FocusTransitionObserver,
private val desktopModeEventLogger: DesktopModeEventLogger,
private val desktopTilingDecorViewModel: DesktopTilingDecorViewModel,
) :
RemoteCallable<DesktopTasksController>,
Transitions.TransitionHandler,
DragAndDropController.DragAndDropListener,
- UserChangeListener,
- KeyGestureEventHandler {
+ UserChangeListener {
private val desktopMode: DesktopModeImpl
private var visualIndicator: DesktopModeVisualIndicator? = null
@@ -207,6 +199,9 @@ class DesktopTasksController(
@VisibleForTesting
var taskbarDesktopTaskListener: TaskbarDesktopTaskListener? = null
+ @VisibleForTesting
+ var desktopModeEnterExitTransitionListener: DesktopModeEntryExitTransitionListener? = null
+
/** Task id of the task currently being dragged from fullscreen/split. */
val draggingTaskId
get() = dragToDesktopTransitionHandler.draggingTaskId
@@ -248,9 +243,6 @@ class DesktopTasksController(
}
)
dragAndDropController.addListener(this)
- if (useKeyGestureEventHandler() && enableMoveToNextDisplayShortcut()) {
- inputManager.registerKeyGestureEventHandler(this)
- }
}
@VisibleForTesting
@@ -395,6 +387,7 @@ class DesktopTasksController(
)
// TODO(343149901): Add DPI changes for task launch
val transition = enterDesktopTaskTransitionHandler.moveToDesktop(wct, transitionSource)
+ desktopModeEnterExitTransitionListener?.onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
taskIdToMinimize?.let { addPendingMinimizeTransition(transition, it) }
exitResult.asExit()?.runOnTransitionStart?.invoke(transition)
return true
@@ -424,6 +417,7 @@ class DesktopTasksController(
addMoveToDesktopChanges(wct, task)
val transition = enterDesktopTaskTransitionHandler.moveToDesktop(wct, transitionSource)
+ desktopModeEnterExitTransitionListener?.onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
taskIdToMinimize?.let { addPendingMinimizeTransition(transition, it) }
exitResult.asExit()?.runOnTransitionStart?.invoke(transition)
}
@@ -465,6 +459,9 @@ class DesktopTasksController(
val exitResult = desktopImmersiveController.exitImmersiveIfApplicable(
wct, taskInfo.displayId)
val transition = dragToDesktopTransitionHandler.finishDragToDesktopTransition(wct)
+ desktopModeEnterExitTransitionListener?.onEnterDesktopModeTransitionStarted(
+ DRAG_TO_DESKTOP_FINISH_ANIM_DURATION_MS.toInt()
+ )
transition?.let {
taskIdToMinimize?.let { taskId -> addPendingMinimizeTransition(it, taskId) }
exitResult.asExit()?.runOnTransitionStart?.invoke(transition)
@@ -500,9 +497,7 @@ class DesktopTasksController(
): ((IBinder) -> Unit)? {
val taskId = taskInfo.taskId
desktopTilingDecorViewModel.removeTaskIfTiled(displayId, taskId)
- if (taskRepository.isOnlyVisibleNonClosingTask(taskId)) {
- removeWallpaperActivity(wct)
- }
+ performDesktopExitCleanupIfNeeded(taskId, wct)
taskRepository.addClosingTask(displayId, taskId)
taskbarDesktopTaskListener?.onTaskbarCornerRoundingUpdate(
doesAnyTaskRequireTaskbarRounding(
@@ -518,11 +513,7 @@ class DesktopTasksController(
val taskId = taskInfo.taskId
val displayId = taskInfo.displayId
val wct = WindowContainerTransaction()
- if (taskRepository.isOnlyVisibleNonClosingTask(taskId)) {
- // Perform clean up of the desktop wallpaper activity if the minimized window task is
- // the last active task.
- removeWallpaperActivity(wct)
- }
+ performDesktopExitCleanupIfNeeded(taskId, wct)
// Notify immersive handler as it might need to exit immersive state.
val exitResult = desktopImmersiveController.exitImmersiveIfApplicable(wct, taskInfo)
@@ -591,6 +582,11 @@ class DesktopTasksController(
position,
mOnAnimationFinishedCallback
)
+
+ // handles case where we are moving to full screen without closing all DW tasks.
+ if (!taskRepository.isOnlyVisibleNonClosingTask(task.taskId)) {
+ desktopModeEnterExitTransitionListener?.onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
+ }
}
/**
@@ -793,6 +789,10 @@ class DesktopTasksController(
resizeTrigger: ResizeTrigger,
motionEvent: MotionEvent?,
) {
+ desktopModeEventLogger.logTaskResizingStarted(
+ resizeTrigger, motionEvent, taskInfo, displayController
+ )
+
val displayLayout = displayController.getDisplayLayout(taskInfo.displayId) ?: return
val stableBounds = Rect().apply { displayLayout.getStableBounds(this) }
@@ -871,9 +871,6 @@ class DesktopTasksController(
return
}
- desktopModeEventLogger.logTaskResizingStarted(
- ResizeTrigger.DRAG_TO_TOP_RESIZE_TRIGGER, motionEvent, taskInfo, displayController
- )
toggleDesktopTaskSize(taskInfo, ResizeTrigger.DRAG_TO_TOP_RESIZE_TRIGGER, motionEvent)
}
@@ -961,13 +958,17 @@ class DesktopTasksController(
*/
fun snapToHalfScreen(
taskInfo: RunningTaskInfo,
- taskSurface: SurfaceControl,
+ taskSurface: SurfaceControl?,
currentDragBounds: Rect,
position: SnapPosition,
resizeTrigger: ResizeTrigger,
motionEvent: MotionEvent?,
desktopWindowDecoration: DesktopModeWindowDecoration,
) {
+ desktopModeEventLogger.logTaskResizingStarted(
+ resizeTrigger, motionEvent, taskInfo, displayController
+ )
+
if (DesktopModeFlags.ENABLE_TILE_RESIZING.isTrue()) {
val isTiled = desktopTilingDecorViewModel.snapToHalfScreen(
taskInfo,
@@ -993,7 +994,7 @@ class DesktopTasksController(
// Handle the case where we attempt to snap resize when already snap resized: the task
// position won't need to change but we want to animate the surface going back to the
// snapped position from the "dragged-to-the-edge" position.
- if (destinationBounds != currentDragBounds) {
+ if (destinationBounds != currentDragBounds && taskSurface != null) {
returnToDragStartAnimator.start(
taskInfo.taskId,
taskSurface,
@@ -1010,8 +1011,40 @@ class DesktopTasksController(
toggleResizeDesktopTaskTransitionHandler.startTransition(wct, currentDragBounds)
}
+ /**
+ * Handles snap resizing a [taskInfo] to [position] instantaneously, for example when the
+ * [resizeTrigger] is the snap resize menu using any [motionEvent] or a keyboard shortcut.
+ */
+ fun handleInstantSnapResizingTask(
+ taskInfo: RunningTaskInfo,
+ position: SnapPosition,
+ resizeTrigger: ResizeTrigger,
+ motionEvent: MotionEvent? = null,
+ desktopModeWindowDecoration: DesktopModeWindowDecoration,
+ ) {
+ if (!isSnapResizingAllowed(taskInfo)) {
+ Toast.makeText(
+ getContext(),
+ R.string.desktop_mode_non_resizable_snap_text,
+ Toast.LENGTH_SHORT
+ ).show()
+ return
+ }
+
+ snapToHalfScreen(
+ taskInfo,
+ null,
+ taskInfo.configuration.windowConfiguration.bounds,
+ position,
+ resizeTrigger,
+ motionEvent,
+ desktopModeWindowDecoration
+ )
+ }
+
+
@VisibleForTesting
- fun handleSnapResizingTask(
+ fun handleSnapResizingTaskOnDrag(
taskInfo: RunningTaskInfo,
position: SnapPosition,
taskSurface: SurfaceControl,
@@ -1021,7 +1054,7 @@ class DesktopTasksController(
desktopModeWindowDecoration: DesktopModeWindowDecoration,
) {
releaseVisualIndicator()
- if (!taskInfo.isResizeable && DISABLE_NON_RESIZABLE_APP_SNAP_RESIZE.isTrue()) {
+ if (!isSnapResizingAllowed(taskInfo)) {
interactionJankMonitor.begin(
taskSurface, context, handler, CUJ_DESKTOP_MODE_SNAP_RESIZE, "drag_non_resizable"
)
@@ -1046,9 +1079,6 @@ class DesktopTasksController(
} else {
ResizeTrigger.DRAG_RIGHT
}
- desktopModeEventLogger.logTaskResizingStarted(
- resizeTrigger, motionEvent, taskInfo, displayController
- )
interactionJankMonitor.begin(
taskSurface, context, handler, CUJ_DESKTOP_MODE_SNAP_RESIZE, "drag_resizable"
)
@@ -1064,6 +1094,9 @@ class DesktopTasksController(
}
}
+ private fun isSnapResizingAllowed(taskInfo: RunningTaskInfo) =
+ taskInfo.isResizeable || !DISABLE_NON_RESIZABLE_APP_SNAP_RESIZE.isTrue()
+
private fun getSnapBounds(taskInfo: RunningTaskInfo, position: SnapPosition): Rect {
val displayLayout = displayController.getDisplayLayout(taskInfo.displayId) ?: return Rect()
@@ -1204,6 +1237,21 @@ class DesktopTasksController(
}
}
+ /**
+ * Remove wallpaper activity if task provided is last task and wallpaper activity token is not
+ * null
+ */
+ private fun performDesktopExitCleanupIfNeeded(taskId: Int, wct: WindowContainerTransaction) {
+ if (!taskRepository.isOnlyVisibleNonClosingTask(taskId)) {
+ return
+ }
+ desktopModeEnterExitTransitionListener?.onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
+ if (taskRepository.wallpaperActivityToken != null) {
+ removeWallpaperActivity(wct)
+ }
+ }
+
+
fun releaseVisualIndicator() {
val t = SurfaceControl.Transaction()
visualIndicator?.releaseVisualIndicator(t)
@@ -1640,12 +1688,7 @@ class DesktopTasksController(
return null
val wct = WindowContainerTransaction()
- if (taskRepository.isOnlyVisibleNonClosingTask(task.taskId)
- && taskRepository.wallpaperActivityToken != null
- ) {
- // Remove wallpaper activity when the last active task is removed
- removeWallpaperActivity(wct)
- }
+ performDesktopExitCleanupIfNeeded(task.taskId, wct)
if (!DesktopModeFlags.ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION.isTrue()) {
taskRepository.addClosingTask(task.displayId, task.taskId)
@@ -1736,10 +1779,8 @@ class DesktopTasksController(
if (useDesktopOverrideDensity()) {
wct.setDensityDpi(taskInfo.token, getDefaultDensityDpi())
}
- if (taskRepository.isOnlyVisibleNonClosingTask(taskInfo.taskId)) {
- // Remove wallpaper activity when leaving desktop mode
- removeWallpaperActivity(wct)
- }
+
+ performDesktopExitCleanupIfNeeded(taskInfo.taskId, wct)
}
private fun cascadeWindow(bounds: Rect, displayLayout: DisplayLayout, displayId: Int) {
@@ -1768,10 +1809,8 @@ class DesktopTasksController(
// The task's density may have been overridden in freeform; revert it here as we don't
// want it overridden in multi-window.
wct.setDensityDpi(taskInfo.token, getDefaultDensityDpi())
- if (taskRepository.isOnlyVisibleNonClosingTask(taskInfo.taskId)) {
- // Remove wallpaper activity when leaving desktop mode
- removeWallpaperActivity(wct)
- }
+
+ performDesktopExitCleanupIfNeeded(taskInfo.taskId, wct)
}
/** Returns the ID of the Task that will be minimized, or null if no task will be minimized. */
@@ -1835,26 +1874,12 @@ class DesktopTasksController(
getFocusedFreeformTask(displayId)?.let { requestSplit(it, leftOrTop) }
}
- /** Move the focused desktop task in given `displayId` to next display. */
- fun moveFocusedTaskToNextDisplay(displayId: Int) {
- getFocusedFreeformTask(displayId)?.let { moveToNextDisplay(it.taskId) }
- }
-
private fun getFocusedFreeformTask(displayId: Int): RunningTaskInfo? {
return shellTaskOrganizer.getRunningTasks(displayId).find { taskInfo ->
taskInfo.isFocused && taskInfo.windowingMode == WINDOWING_MODE_FREEFORM
}
}
- // TODO(b/364154795): wait for the completion of moveToNextDisplay transition, otherwise it will
- // pick a wrong task when a user quickly perform other actions with keyboard shortcuts after
- // moveToNextDisplay.
- private fun getGloballyFocusedFreeformTask(): RunningTaskInfo? =
- shellTaskOrganizer.getRunningTasks().find { taskInfo ->
- taskInfo.windowingMode == WINDOWING_MODE_FREEFORM &&
- focusTransitionObserver.hasGlobalFocus(taskInfo)
- }
-
/**
* Requests a task be transitioned from desktop to split select. Applies needed windowing
* changes if this transition is enabled.
@@ -1996,7 +2021,7 @@ class DesktopTasksController(
}
}
IndicatorType.TO_SPLIT_LEFT_INDICATOR -> {
- handleSnapResizingTask(
+ handleSnapResizingTaskOnDrag(
taskInfo,
SnapPosition.LEFT,
taskSurface,
@@ -2007,7 +2032,7 @@ class DesktopTasksController(
)
}
IndicatorType.TO_SPLIT_RIGHT_INDICATOR -> {
- handleSnapResizingTask(
+ handleSnapResizingTaskOnDrag(
taskInfo,
SnapPosition.RIGHT,
taskSurface,
@@ -2256,31 +2281,6 @@ class DesktopTasksController(
taskRepository.dump(pw, innerPrefix)
}
- override fun handleKeyGestureEvent(
- event: KeyGestureEvent,
- focusedToken: IBinder?
- ): Boolean {
- if (!isKeyGestureSupported(event.keyGestureType)) return false
- when (event.keyGestureType) {
- KeyGestureEvent.KEY_GESTURE_TYPE_MOVE_TO_NEXT_DISPLAY -> {
- if (event.keycodes.contains(KeyEvent.KEYCODE_D) &&
- event.hasModifiers(KeyEvent.META_CTRL_ON or KeyEvent.META_META_ON)) {
- logV("Key gesture MOVE_TO_NEXT_DISPLAY is handled")
- getGloballyFocusedFreeformTask()?.let { moveToNextDisplay(it.taskId) }
- return true
- }
- return false
- }
- else -> return false
- }
- }
-
- override fun isKeyGestureSupported(gestureType: Int): Boolean = when (gestureType) {
- KeyGestureEvent.KEY_GESTURE_TYPE_MOVE_TO_NEXT_DISPLAY
- -> enableMoveToNextDisplayShortcut()
- else -> false
- }
-
/** The interface for calls from outside the shell, within the host process. */
@ExternalThread
private inner class DesktopModeImpl : DesktopMode {
@@ -2348,7 +2348,7 @@ class DesktopTasksController(
}
}
- private val mTaskbarDesktopTaskListener: TaskbarDesktopTaskListener =
+ private val taskbarDesktopTaskListener: TaskbarDesktopTaskListener =
object : TaskbarDesktopTaskListener {
override fun onTaskbarCornerRoundingUpdate(
hasTasksRequiringTaskbarRounding: Boolean) {
@@ -2365,6 +2365,27 @@ class DesktopTasksController(
}
}
+ private val desktopModeEntryExitTransitionListener: DesktopModeEntryExitTransitionListener =
+ object : DesktopModeEntryExitTransitionListener {
+ override fun onEnterDesktopModeTransitionStarted(transitionDuration: Int) {
+ ProtoLog.v(
+ WM_SHELL_DESKTOP_MODE,
+ "IDesktopModeImpl: onEnterDesktopModeTransitionStarted transitionTime=%s",
+ transitionDuration
+ )
+ remoteListener.call { l -> l.onEnterDesktopModeTransitionStarted(transitionDuration) }
+ }
+
+ override fun onExitDesktopModeTransitionStarted(transitionDuration: Int) {
+ ProtoLog.v(
+ WM_SHELL_DESKTOP_MODE,
+ "IDesktopModeImpl: onExitDesktopModeTransitionStarted transitionTime=%s",
+ transitionDuration
+ )
+ remoteListener.call { l -> l.onExitDesktopModeTransitionStarted(transitionDuration) }
+ }
+ }
+
init {
remoteListener =
SingleInstanceRemoteListener<DesktopTasksController, IDesktopTaskListener>(
@@ -2372,13 +2393,16 @@ class DesktopTasksController(
{ c ->
run {
c.taskRepository.addVisibleTasksListener(listener, c.mainExecutor)
- c.taskbarDesktopTaskListener = mTaskbarDesktopTaskListener
+ c.taskbarDesktopTaskListener = taskbarDesktopTaskListener
+ c.desktopModeEnterExitTransitionListener =
+ desktopModeEntryExitTransitionListener
}
},
{ c ->
run {
c.taskRepository.removeVisibleTasksListener(listener)
c.taskbarDesktopTaskListener = null
+ c.desktopModeEnterExitTransitionListener = null
}
}
)
@@ -2485,6 +2509,15 @@ class DesktopTasksController(
fun onTaskbarCornerRoundingUpdate(hasTasksRequiringTaskbarRounding: Boolean)
}
+ /** Defines interface for entering and exiting desktop windowing mode. */
+ interface DesktopModeEntryExitTransitionListener {
+ /** [transitionDuration] time it takes to run enter desktop mode transition */
+ fun onEnterDesktopModeTransitionStarted(transitionDuration: Int)
+
+ /** [transitionDuration] time it takes to run exit desktop mode transition */
+ fun onExitDesktopModeTransitionStarted(transitionDuration: Int)
+ }
+
/** The positions on a screen that a task can snap to. */
enum class SnapPosition {
RIGHT,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/ExitDesktopTaskTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/ExitDesktopTaskTransitionHandler.java
index d537da802efd..b902bb4394b5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/ExitDesktopTaskTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/ExitDesktopTaskTransitionHandler.java
@@ -60,8 +60,7 @@ import java.util.function.Supplier;
* entering and exiting freeform.
*/
public class ExitDesktopTaskTransitionHandler implements Transitions.TransitionHandler {
- @VisibleForTesting
- static final int FULLSCREEN_ANIMATION_DURATION = 336;
+ public static final int FULLSCREEN_ANIMATION_DURATION = 336;
private final Context mContext;
private final Transitions mTransitions;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/IDesktopTaskListener.aidl b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/IDesktopTaskListener.aidl
index c2acb87222d1..6002a4dfe0d9 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/IDesktopTaskListener.aidl
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/IDesktopTaskListener.aidl
@@ -33,4 +33,10 @@ interface IDesktopTaskListener {
* [hasTasksRequiringTaskbarRounding] is true.
*/
oneway void onTaskbarCornerRoundingUpdate(boolean hasTasksRequiringTaskbarRounding);
+
+ /** Entering desktop mode transition is started, send the signal with transition duration. */
+ oneway void onEnterDesktopModeTransitionStarted(int transitionDuration);
+
+ /** Exiting desktop mode transition is started, send the signal with transition duration. */
+ oneway void onExitDesktopModeTransitionStarted(int transitionDuration);
} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
index 417a6558ffcc..1c58dbbf71fd 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java
@@ -1308,6 +1308,9 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler,
// otherwise a new transition will notify the relevant observers
if (returningToApp && allAppsAreTranslucent(mPausingTasks)) {
mHomeTransitionObserver.notifyHomeVisibilityChanged(true);
+ } else if (!toHome && mState == STATE_NEW_TASK
+ && allAppsAreTranslucent(mOpeningTasks)) {
+ // We are opening a translucent app. Launcher is still visible so we do nothing.
} else if (!toHome) {
// For some transitions, we may have notified home activity that it became
// visible. We need to notify the observer that we are no longer going home.
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java
index 7d1ffb80735e..e692c61cd493 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java
@@ -55,7 +55,6 @@ import static com.android.wm.shell.splitscreen.SplitScreen.STAGE_TYPE_MAIN;
import static com.android.wm.shell.splitscreen.SplitScreen.STAGE_TYPE_SIDE;
import static com.android.wm.shell.splitscreen.SplitScreen.STAGE_TYPE_UNDEFINED;
import static com.android.wm.shell.splitscreen.SplitScreenController.ENTER_REASON_LAUNCHER;
-import static com.android.wm.shell.splitscreen.SplitScreenController.ENTER_REASON_MULTI_INSTANCE;
import static com.android.wm.shell.splitscreen.SplitScreenController.EXIT_REASON_APP_DOES_NOT_SUPPORT_MULTIWINDOW;
import static com.android.wm.shell.splitscreen.SplitScreenController.EXIT_REASON_APP_FINISHED;
import static com.android.wm.shell.splitscreen.SplitScreenController.EXIT_REASON_CHILD_TASK_ENTER_PIP;
@@ -1099,16 +1098,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
void setSideStagePosition(@SplitPosition int sideStagePosition,
@Nullable WindowContainerTransaction wct) {
- setSideStagePosition(sideStagePosition, true /* updateBounds */, wct);
- }
-
- private void setSideStagePosition(@SplitPosition int sideStagePosition, boolean updateBounds,
- @Nullable WindowContainerTransaction wct) {
if (mSideStagePosition == sideStagePosition) return;
mSideStagePosition = sideStagePosition;
sendOnStagePositionChanged();
- if (mSideStage.mVisible && updateBounds) {
+ if (mSideStage.mVisible) {
if (wct == null) {
// onLayoutChanged builds/applies a wct with the contents of updateWindowBounds.
onLayoutSizeChanged(mSplitLayout);
@@ -1275,6 +1269,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
final WindowContainerTransaction wct = new WindowContainerTransaction();
prepareExitSplitScreen(stage, wct);
mSplitTransitions.startDismissTransition(wct, this, stage, exitReason);
+ // reset stages to their default sides.
+ setSideStagePosition(SPLIT_POSITION_BOTTOM_OR_RIGHT, null);
logExit(exitReason);
}
@@ -1602,6 +1598,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
}
if (present) {
updateRecentTasksSplitPair();
+ } else if (mMainStage.getChildCount() == 0 && mSideStage.getChildCount() == 0) {
+ mRecentTasks.ifPresent(recentTasks -> {
+ // remove the split pair mapping from recentTasks, and disable further updates
+ // to splits in the recents until we enter split again.
+ recentTasks.removeSplitPair(taskId);
+ });
+ dismissSplitScreen(-1, EXIT_REASON_ROOT_TASK_VANISHED);
}
for (int i = mListeners.size() - 1; i >= 0; --i) {
@@ -3188,9 +3191,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
for (int i = mPausingTasks.size() - 1; i >= 0; --i) {
final int taskId = mPausingTasks.get(i);
if (mMainStage.containsTask(taskId)) {
- mMainStage.evictChildren(finishWct, taskId);
+ mMainStage.evictChild(finishWct, taskId, "recentsPairToPair");
} else if (mSideStage.containsTask(taskId)) {
- mSideStage.evictChildren(finishWct, taskId);
+ mSideStage.evictChild(finishWct, taskId, "recentsPairToPair");
}
}
// If pending enter hasn't consumed, the mix handler will invoke start pending
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskListener.java
index 4407e5b3106f..08cdfdb3b5a9 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskListener.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageTaskListener.java
@@ -30,6 +30,7 @@ import static com.android.wm.shell.shared.split.SplitScreenConstants.CONTROLLED_
import android.annotation.CallSuper;
import android.annotation.Nullable;
import android.app.ActivityManager;
+import android.app.TaskInfo;
import android.content.Context;
import android.graphics.Rect;
import android.os.IBinder;
@@ -138,6 +139,8 @@ public class StageTaskListener implements ShellTaskOrganizer.TaskListener {
* Returns the top visible child task's id.
*/
int getTopVisibleChildTaskId() {
+ // TODO(b/378601156): This doesn't get the top task (translucent tasks are also
+ // visible-requested)
final ActivityManager.RunningTaskInfo taskInfo = getChildTaskInfo(t -> t.isVisible
&& t.isVisibleRequested);
return taskInfo != null ? taskInfo.taskId : INVALID_TASK_ID;
@@ -147,6 +150,7 @@ public class StageTaskListener implements ShellTaskOrganizer.TaskListener {
* Returns the top activity uid for the top child task.
*/
int getTopChildTaskUid() {
+ // TODO(b/378601156): This doesn't get the top task
final ActivityManager.RunningTaskInfo taskInfo =
getChildTaskInfo(t -> t.topActivityInfo != null);
return taskInfo != null ? taskInfo.topActivityInfo.applicationInfo.uid : 0;
@@ -379,10 +383,9 @@ public class StageTaskListener implements ShellTaskOrganizer.TaskListener {
/** Collects all the current child tasks and prepares transaction to evict them to display. */
void evictAllChildren(WindowContainerTransaction wct) {
- ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Evicting all children");
for (int i = mChildrenTaskInfo.size() - 1; i >= 0; i--) {
final ActivityManager.RunningTaskInfo taskInfo = mChildrenTaskInfo.valueAt(i);
- wct.reparent(taskInfo.token, null /* parent */, false /* onTop */);
+ evictChild(wct, taskInfo, "all");
}
}
@@ -390,13 +393,11 @@ public class StageTaskListener implements ShellTaskOrganizer.TaskListener {
for (int i = mChildrenTaskInfo.size() - 1; i >= 0; i--) {
final ActivityManager.RunningTaskInfo taskInfo = mChildrenTaskInfo.valueAt(i);
if (taskId == taskInfo.taskId) continue;
- ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Evict other child: task=%d", taskId);
- wct.reparent(taskInfo.token, null /* parent */, false /* onTop */);
+ evictChild(wct, taskInfo, "other");
}
}
void evictNonOpeningChildren(RemoteAnimationTarget[] apps, WindowContainerTransaction wct) {
- ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "evictNonOpeningChildren");
final SparseArray<ActivityManager.RunningTaskInfo> toBeEvict = mChildrenTaskInfo.clone();
for (int i = 0; i < apps.length; i++) {
if (apps[i].mode == MODE_OPENING) {
@@ -405,8 +406,7 @@ public class StageTaskListener implements ShellTaskOrganizer.TaskListener {
}
for (int i = toBeEvict.size() - 1; i >= 0; i--) {
final ActivityManager.RunningTaskInfo taskInfo = toBeEvict.valueAt(i);
- ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Evict non-opening child: task=%d", taskInfo.taskId);
- wct.reparent(taskInfo.token, null /* parent */, false /* onTop */);
+ evictChild(wct, taskInfo, "non-opening");
}
}
@@ -414,21 +414,30 @@ public class StageTaskListener implements ShellTaskOrganizer.TaskListener {
for (int i = mChildrenTaskInfo.size() - 1; i >= 0; i--) {
final ActivityManager.RunningTaskInfo taskInfo = mChildrenTaskInfo.valueAt(i);
if (!taskInfo.isVisible) {
- ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Evict invisible child: task=%d",
- taskInfo.taskId);
- wct.reparent(taskInfo.token, null /* parent */, false /* onTop */);
+ evictChild(wct, taskInfo, "invisible");
}
}
}
- void evictChildren(WindowContainerTransaction wct, int taskId) {
- ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Evict child: task=%d", taskId);
+ void evictChild(WindowContainerTransaction wct, int taskId, String reason) {
final ActivityManager.RunningTaskInfo taskInfo = mChildrenTaskInfo.get(taskId);
if (taskInfo != null) {
- wct.reparent(taskInfo.token, null /* parent */, false /* onTop */);
+ evictChild(wct, taskInfo, reason);
}
}
+ private void evictChild(@NonNull WindowContainerTransaction wct, @NonNull TaskInfo taskInfo,
+ @NonNull String reason) {
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Evict child: task=%d reason=%s", taskInfo.taskId,
+ reason);
+ // We are reparenting the task, but not removing the task from mChildrenTaskInfo, so to
+ // prevent this task from being considered as a top task for the roots, we need to override
+ // the visibility of the soon-to-be-hidden task
+ taskInfo.isVisible = false;
+ taskInfo.isVisibleRequested = false;
+ wct.reparent(taskInfo.token, null /* parent */, false /* onTop */);
+ }
+
void reparentTopTask(WindowContainerTransaction wct) {
wct.reparentTasks(null /* currentParent */, mRootTaskInfo.token,
CONTROLLED_WINDOWING_MODES, CONTROLLED_ACTIVITY_TYPES,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/unfold/animation/SplitTaskUnfoldAnimator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/unfold/animation/SplitTaskUnfoldAnimator.java
index d28287da83b6..32f3cd820421 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/unfold/animation/SplitTaskUnfoldAnimator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/unfold/animation/SplitTaskUnfoldAnimator.java
@@ -334,8 +334,8 @@ public class SplitTaskUnfoldAnimator implements UnfoldTaskAnimator,
// Sides adjacent to split bar or task bar are not be animated.
Insets margins;
- final boolean isLandscape = mRootStageBounds.width() > mRootStageBounds.height();
- if (isLandscape) { // Left and right splits.
+ final boolean isLeftRightSplit = mSplitScreenController.get().get().isLeftRightSplit();
+ if (isLeftRightSplit) {
margins = getLandscapeMargins(margin, taskbarExpanded);
} else { // Top and bottom splits.
margins = getPortraitMargins(margin, taskbarExpanded);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
index d71e61a4c4de..f89b0d108bad 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
@@ -78,7 +78,6 @@ import android.view.SurfaceControl;
import android.view.SurfaceControl.Transaction;
import android.view.View;
import android.view.ViewConfiguration;
-import android.widget.Toast;
import android.window.DesktopModeFlags;
import android.window.TaskSnapshot;
import android.window.WindowContainerToken;
@@ -572,9 +571,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
if (decoration == null) {
return;
}
- mDesktopModeEventLogger.logTaskResizingStarted(resizeTrigger, motionEvent,
- decoration.mTaskInfo,
- mDisplayController, /* displayLayoutSize= */ null);
mInteractionJankMonitor.begin(
decoration.mTaskSurface, mContext, mMainHandler,
Cuj.CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW, source);
@@ -593,33 +589,20 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
decoration.closeMaximizeMenu();
}
- private void onSnapResize(int taskId, boolean left, MotionEvent motionEvent) {
+ public void onSnapResize(int taskId, boolean left, @Nullable MotionEvent motionEvent) {
final DesktopModeWindowDecoration decoration = mWindowDecorByTaskId.get(taskId);
if (decoration == null) {
return;
}
- if (!decoration.mTaskInfo.isResizeable
- && DesktopModeFlags.DISABLE_NON_RESIZABLE_APP_SNAP_RESIZE.isTrue()) {
- Toast.makeText(mContext,
- R.string.desktop_mode_non_resizable_snap_text, Toast.LENGTH_SHORT).show();
- } else {
- ResizeTrigger resizeTrigger =
- left ? ResizeTrigger.SNAP_LEFT_MENU : ResizeTrigger.SNAP_RIGHT_MENU;
- mDesktopModeEventLogger.logTaskResizingStarted(resizeTrigger, motionEvent,
- decoration.mTaskInfo,
- mDisplayController, /* displayLayoutSize= */ null);
- mInteractionJankMonitor.begin(decoration.mTaskSurface, mContext, mMainHandler,
- Cuj.CUJ_DESKTOP_MODE_SNAP_RESIZE, "maximize_menu_resizable");
- mDesktopTasksController.snapToHalfScreen(
- decoration.mTaskInfo,
- decoration.mTaskSurface,
- decoration.mTaskInfo.configuration.windowConfiguration.getBounds(),
- left ? SnapPosition.LEFT : SnapPosition.RIGHT,
- resizeTrigger,
- motionEvent,
- mWindowDecorByTaskId.get(taskId));
- }
+ mInteractionJankMonitor.begin(decoration.mTaskSurface, mContext, mMainHandler,
+ Cuj.CUJ_DESKTOP_MODE_SNAP_RESIZE, "maximize_menu_resizable");
+ mDesktopTasksController.handleInstantSnapResizingTask(
+ decoration.mTaskInfo,
+ left ? SnapPosition.LEFT : SnapPosition.RIGHT,
+ left ? ResizeTrigger.SNAP_LEFT_MENU : ResizeTrigger.SNAP_RIGHT_MENU,
+ motionEvent,
+ decoration);
decoration.closeHandleMenu();
decoration.closeMaximizeMenu();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
index 9cb9d2594878..723bbd318803 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
@@ -206,7 +206,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
private final WindowDecorCaptionHandleRepository mWindowDecorCaptionHandleRepository;
private final DesktopRepository mDesktopRepository;
- DesktopModeWindowDecoration(
+ public DesktopModeWindowDecoration(
Context context,
@NonNull Context userContext,
DisplayController displayController,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
index 54c247bff984..62be2c78d59b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
@@ -238,8 +238,12 @@ class HandleMenu(
val taskBounds = taskInfo.getConfiguration().windowConfiguration.bounds
updateGlobalMenuPosition(taskBounds, captionX, captionY)
if (layoutResId == R.layout.desktop_mode_app_header) {
- // Align the handle menu to the left side of the caption.
- menuX = marginMenuStart
+ // Align the handle menu to the start of the header.
+ menuX = if (context.isRtl()) {
+ taskBounds.width() - menuWidth - marginMenuStart
+ } else {
+ marginMenuStart
+ }
menuY = captionY + marginMenuTop
} else {
if (DesktopModeFlags.ENABLE_HANDLE_INPUT_FIX.isTrue()) {
@@ -261,10 +265,17 @@ class HandleMenu(
val nonFreeformX = captionX + (captionWidth / 2) - (menuWidth / 2)
when {
taskInfo.isFreeform -> {
- globalMenuPosition.set(
- /* x = */ taskBounds.left + marginMenuStart,
- /* y = */ taskBounds.top + captionY + marginMenuTop
- )
+ if (context.isRtl()) {
+ globalMenuPosition.set(
+ /* x= */ taskBounds.right - menuWidth - marginMenuStart,
+ /* y= */ taskBounds.top + captionY + marginMenuTop
+ )
+ } else {
+ globalMenuPosition.set(
+ /* x= */ taskBounds.left + marginMenuStart,
+ /* y= */ taskBounds.top + captionY + marginMenuTop
+ )
+ }
}
taskInfo.isFullscreen -> {
globalMenuPosition.set(
@@ -430,6 +441,9 @@ class HandleMenu(
return context.resources.getDimensionPixelSize(resourceId)
}
+ private fun Context.isRtl() =
+ resources.configuration.layoutDirection == View.LAYOUT_DIRECTION_RTL
+
fun close() {
handleMenuView?.animateCloseMenu {
handleMenuViewContainer?.releaseView()
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/MinimizeAutoPipAppWindowTest.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/MinimizeAutoPipAppWindowTest.kt
new file mode 100644
index 000000000000..48befc06b9c5
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/MinimizeAutoPipAppWindowTest.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2024 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.wm.shell.functional
+
+import android.platform.test.annotations.Postsubmit
+import com.android.wm.shell.scenarios.MinimizeAutoPipAppWindow
+import org.junit.runner.RunWith
+import org.junit.runners.BlockJUnit4ClassRunner
+
+/* Functional test for [MinimizeAutoPipAppWindow]. */
+@RunWith(BlockJUnit4ClassRunner::class)
+@Postsubmit
+class MinimizeAutoPipAppWindowTest : MinimizeAutoPipAppWindow()
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/OpenUnlimitedAppsTest.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/OpenUnlimitedAppsTest.kt
new file mode 100644
index 000000000000..9462f15335de
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/functional/OpenUnlimitedAppsTest.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2024 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.wm.shell.functional
+
+import android.platform.test.annotations.Postsubmit
+import com.android.wm.shell.scenarios.OpenUnlimitedApps
+import org.junit.runner.RunWith
+import org.junit.runners.BlockJUnit4ClassRunner
+
+/* Functional test for [OpenUnlimitedApps]. */
+@RunWith(BlockJUnit4ClassRunner::class)
+@Postsubmit
+class OpenUnlimitedAppsTest : OpenUnlimitedApps()
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeAutoPipAppWindow.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeAutoPipAppWindow.kt
new file mode 100644
index 000000000000..d6c3266e915c
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeAutoPipAppWindow.kt
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2024 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.wm.shell.scenarios
+
+import android.app.Instrumentation
+import android.tools.NavBar
+import android.tools.Rotation
+import android.tools.traces.parsers.WindowManagerStateHelper
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.uiautomator.UiDevice
+import com.android.launcher3.tapl.LauncherInstrumentation
+import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
+import com.android.server.wm.flicker.helpers.PipAppHelper
+import com.android.server.wm.flicker.helpers.SimpleAppHelper
+import com.android.window.flags.Flags
+import com.android.wm.shell.Utils
+import org.junit.After
+import org.junit.Assume
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+
+/** Base scenario test for minimizing the app entering pip on leave automatically */
+@Ignore("Test Base Class")
+abstract class MinimizeAutoPipAppWindow {
+ private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
+ private val tapl = LauncherInstrumentation()
+ private val wmHelper = WindowManagerStateHelper(instrumentation)
+ private val device = UiDevice.getInstance(instrumentation)
+ private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
+ private val pipApp = PipAppHelper(instrumentation)
+ private val pipAppDesktopMode = DesktopModeAppHelper(pipApp)
+
+ @Rule
+ @JvmField
+ val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, Rotation.ROTATION_0)
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ Assume.assumeTrue(Flags.enableMinimizeButton())
+ testApp.enterDesktopMode(wmHelper, device)
+ pipApp.launchViaIntent(wmHelper)
+ pipApp.enableAutoEnterForPipActivity()
+ }
+
+ @Test
+ open fun minimizePipAppWindow() {
+ pipAppDesktopMode.minimizeDesktopApp(wmHelper, device, isPip = true)
+ }
+
+ @After
+ fun teardown() {
+ pipApp.exit(wmHelper)
+ testApp.exit(wmHelper)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeWindowOnAppOpen.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeWindowOnAppOpen.kt
index 7987f7ec59fa..a246326f1137 100644
--- a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeWindowOnAppOpen.kt
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/MinimizeWindowOnAppOpen.kt
@@ -23,12 +23,10 @@ import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
-import com.android.server.wm.flicker.helpers.ImeAppHelper
-import com.android.server.wm.flicker.helpers.LetterboxAppHelper
import com.android.server.wm.flicker.helpers.MailAppHelper
-import com.android.server.wm.flicker.helpers.NewTasksAppHelper
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.window.flags.Flags
+import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
import org.junit.After
import org.junit.Assume
import org.junit.Before
@@ -51,32 +49,30 @@ open class MinimizeWindowOnAppOpen()
private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
private val mailApp = DesktopModeAppHelper(MailAppHelper(instrumentation))
- private val newTasksApp = DesktopModeAppHelper(NewTasksAppHelper(instrumentation))
- private val imeApp = DesktopModeAppHelper(ImeAppHelper(instrumentation))
- private val letterboxAppHelper = DesktopModeAppHelper(LetterboxAppHelper(instrumentation))
+
+ private val maxNum = DesktopModeStatus.getMaxTaskLimit(instrumentation.context)
@Before
fun setup() {
Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ Assume.assumeTrue(maxNum > 0)
testApp.enterDesktopMode(wmHelper, device)
- mailApp.launchViaIntent(wmHelper)
- newTasksApp.launchViaIntent(wmHelper)
- imeApp.launchViaIntent(wmHelper)
+ // Launch new [maxNum-1] tasks, which ends up opening [maxNum] tasks in total.
+ for (i in 1..maxNum - 1) {
+ mailApp.launchViaIntent(wmHelper)
+ }
}
@Test
open fun openAppToMinimizeWindow() {
- // Launch a new app while 4 apps are already open on desktop. This should result in the
- // first app we opened to be minimized.
- letterboxAppHelper.launchViaIntent(wmHelper)
+ // Launch a new tasks, which ends up opening [maxNum]+1 tasks in total. This should
+ // result in the first app we opened to be minimized.
+ mailApp.launchViaIntent(wmHelper)
}
@After
fun teardown() {
testApp.exit(wmHelper)
mailApp.exit(wmHelper)
- newTasksApp.exit(wmHelper)
- imeApp.exit(wmHelper)
- letterboxAppHelper.exit(wmHelper)
}
}
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/OpenUnlimitedApps.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/OpenUnlimitedApps.kt
new file mode 100644
index 000000000000..367c4a437018
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/OpenUnlimitedApps.kt
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2024 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.wm.shell.scenarios
+
+import android.app.Instrumentation
+import android.tools.traces.parsers.WindowManagerStateHelper
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.uiautomator.UiDevice
+import com.android.launcher3.tapl.LauncherInstrumentation
+import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
+import com.android.server.wm.flicker.helpers.MailAppHelper
+import com.android.server.wm.flicker.helpers.SimpleAppHelper
+import com.android.window.flags.Flags
+import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
+import org.junit.After
+import org.junit.Assume
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+/**
+ * Base scenario test for opening many apps on the device without the window limit.
+ */
+@Ignore("Test Base Class")
+abstract class OpenUnlimitedApps()
+{
+ private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
+ private val tapl = LauncherInstrumentation()
+ private val wmHelper = WindowManagerStateHelper(instrumentation)
+ private val device = UiDevice.getInstance(instrumentation)
+
+ private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
+ private val mailApp = DesktopModeAppHelper(MailAppHelper(instrumentation))
+
+ private val maxNum = DesktopModeStatus.getMaxTaskLimit(instrumentation.context)
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ Assume.assumeTrue(maxNum == 0)
+ testApp.enterDesktopMode(wmHelper, device)
+ }
+
+ @Test
+ open fun openUnlimitedApps() {
+ // The maximum number of active tasks is infinite. We here use 12 as a large enough number.
+ val openTaskNum = 12
+
+ // Launch new [openTaskNum] tasks.
+ for (i in 1..openTaskNum) {
+ mailApp.launchViaIntent(wmHelper)
+ }
+ }
+
+ @After
+ fun teardown() {
+ testApp.exit(wmHelper)
+ mailApp.exit(wmHelper)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt
index a248303b1c33..fd4328dee0a1 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipOnGoToHomeTest.kt
@@ -16,16 +16,18 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.subject.exceptions.ExceptionMessageBuilder
import android.tools.flicker.subject.exceptions.IncorrectRegionException
import android.tools.flicker.subject.layers.LayerSubject
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.Assume
import org.junit.FixMethodOrder
@@ -35,6 +37,7 @@ import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized
import kotlin.math.abs
+
/**
* Test entering pip from an app via auto-enter property when navigating to home.
*
@@ -60,6 +63,7 @@ import kotlin.math.abs
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class AutoEnterPipOnGoToHomeTest(flicker: LegacyFlickerTest) : EnterPipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = { transitions { tapl.goHome() } }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt
index df952c925720..d4ad4ef8a401 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/AutoEnterPipWithSourceRectHintTest.kt
@@ -17,10 +17,12 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.traces.component.ComponentNameMatcher
+import com.android.wm.shell.Flags
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
@@ -52,6 +54,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class AutoEnterPipWithSourceRectHintTest(flicker: LegacyFlickerTest) :
AutoEnterPipOnGoToHomeTest(flicker) {
override val defaultEnterPip: FlickerBuilder.() -> Unit = {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
index 302b8c414979..cc6e4b5a90d5 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipBySwipingDownTest.kt
@@ -17,6 +17,7 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
@@ -53,6 +54,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ClosePipBySwipingDownTest(flicker: LegacyFlickerTest) : ClosePipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
index 77a1edb7039a..53725fa046c6 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ClosePipWithDismissButtonTest.kt
@@ -17,9 +17,11 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.ClosePipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -52,6 +54,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ClosePipWithDismissButtonTest(flicker: LegacyFlickerTest) : ClosePipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.closePipWindow(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
index 6e32d6412b50..a1551b7924fe 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipOnUserLeaveHintTest.kt
@@ -17,9 +17,11 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.Assume
import org.junit.FixMethodOrder
@@ -43,6 +45,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class EnterPipOnUserLeaveHintTest(flicker: LegacyFlickerTest) : EnterPipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = { transitions { tapl.goHome() } }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
index 9a6cb61cfc66..ea5b3e5b08df 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.pip
import android.app.Activity
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -32,6 +33,7 @@ import com.android.server.wm.flicker.entireScreenCovered
import com.android.server.wm.flicker.helpers.FixedOrientationAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions.Pip.ACTION_ENTER_PIP
import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT
@@ -68,6 +70,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class EnterPipToOtherOrientation(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val testApp = FixedOrientationAppHelper(instrumentation)
private val startingBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_90)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
index 6b4751cee3bb..a109c4bba2b3 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipViaAppUiButtonTest.kt
@@ -16,9 +16,11 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
@@ -49,6 +51,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class EnterPipViaAppUiButtonTest(flicker: LegacyFlickerTest) : EnterPipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.clickEnterPipButton(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
index 8d0bc0f5a155..14ec303206ee 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaExpandButtonTest.kt
@@ -16,9 +16,11 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
@@ -51,6 +53,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExitPipToAppViaExpandButtonTest(flicker: LegacyFlickerTest) :
ExitPipToAppTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
index 939f3280d2e6..8a34b5e27fdb 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExitPipToAppViaIntentTest.kt
@@ -16,9 +16,11 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.ExitPipToAppTransition
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
@@ -50,6 +52,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExitPipToAppViaIntentTest(flicker: LegacyFlickerTest) : ExitPipToAppTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
setup {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
index 258663b5556d..4f189fc6190d 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt
@@ -17,12 +17,14 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.traces.component.ComponentNameMatcher
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -54,6 +56,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExpandPipOnDoubleClickTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.doubleClickPipWindow(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
index 1964e3cebc89..4d72b03d0345 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ExpandPipOnPinchOpenTest.kt
@@ -17,11 +17,13 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -33,6 +35,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ExpandPipOnPinchOpenTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.pinchOpenPipWindow(wmHelper, 0.25f, 30) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt
index 5f8ac2af241b..1c40d89aec80 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenAutoEnterPipOnGoToHomeTest.kt
@@ -16,7 +16,10 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
@@ -24,10 +27,9 @@ import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.helpers.WindowUtils
import android.tools.traces.parsers.toFlickerComponent
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.utils.SplitScreenUtils
import org.junit.Assume
import org.junit.FixMethodOrder
@@ -62,6 +64,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class FromSplitScreenAutoEnterPipOnGoToHomeTest(flicker: LegacyFlickerTest) :
AutoEnterPipOnGoToHomeTest(flicker) {
private val portraitDisplayBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_0)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt
index 48c85a84e556..12e23285ea68 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/FromSplitScreenEnterPipOnUserLeaveHintTest.kt
@@ -16,7 +16,10 @@
package com.android.wm.shell.flicker.pip
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
@@ -24,10 +27,9 @@ import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.helpers.WindowUtils
import android.tools.traces.parsers.toFlickerComponent
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import com.android.wm.shell.flicker.utils.SplitScreenUtils
import org.junit.Assume
@@ -63,6 +65,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class FromSplitScreenEnterPipOnUserLeaveHintTest(flicker: LegacyFlickerTest) :
EnterPipTransition(flicker) {
private val portraitDisplayBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_0)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
index ee62cf59b2f9..d979b428d8b2 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipDownOnShelfHeightChange.kt
@@ -17,10 +17,12 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
import com.android.wm.shell.flicker.utils.Direction
import org.junit.FixMethodOrder
@@ -56,6 +58,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class MovePipDownOnShelfHeightChange(flicker: LegacyFlickerTest) :
MovePipShelfHeightTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
index 04fedf4f2550..88d78edae94a 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipOnImeVisibilityChangeTest.kt
@@ -17,6 +17,7 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -27,6 +28,7 @@ import android.tools.helpers.WindowUtils
import android.tools.traces.component.ComponentNameMatcher
import com.android.server.wm.flicker.helpers.ImeAppHelper
import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -41,6 +43,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class MovePipOnImeVisibilityChangeTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val imeApp = ImeAppHelper(instrumentation)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
index 4d643f7b4408..c533800b37c5 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/MovePipUpOnShelfHeightChangeTest.kt
@@ -17,10 +17,12 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.MovePipShelfHeightTransition
import com.android.wm.shell.flicker.utils.Direction
import org.junit.FixMethodOrder
@@ -56,6 +58,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class MovePipUpOnShelfHeightChangeTest(flicker: LegacyFlickerTest) :
MovePipShelfHeightTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
@@ -65,7 +68,8 @@ open class MovePipUpOnShelfHeightChangeTest(flicker: LegacyFlickerTest) :
}
/** Checks that the visible region of [pipApp] window always moves up during the animation. */
- @Presubmit @Test fun pipWindowMovesUp() = pipWindowMoves(Direction.UP)
+ @Presubmit
+ @Test fun pipWindowMovesUp() = pipWindowMoves(Direction.UP)
/** Checks that the visible region of [pipApp] layer always moves up during the animation. */
@Presubmit @Test fun pipLayerMovesUp() = pipLayerMoves(Direction.UP)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt
index 429774f890a5..04016a93e53d 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipAspectRatioChangeTest.kt
@@ -17,11 +17,13 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -33,6 +35,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipAspectRatioChangeTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.changeAspectRatio(wmHelper) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
index a4df69fc6539..6bcaabc3b680 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragTest.kt
@@ -18,11 +18,13 @@ package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -35,6 +37,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipDragTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private var isDraggedLeft: Boolean = true
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
index cbd4a528474a..d82bfdd6dc2f 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipDragThenSnapTest.kt
@@ -17,16 +17,18 @@
package com.android.wm.shell.flicker.pip
import android.graphics.Rect
+import android.platform.test.annotations.FlakyTest
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.flicker.rules.RemoveAllTasksButHomeRule
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.testapp.ActivityOptions
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -40,6 +42,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipDragThenSnapTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
// represents the direction in which the pip window should be snapping
private var willSnapRight: Boolean = true
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
index 16d08e5e9055..dbc97d072f9b 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/PipPinchInTest.kt
@@ -17,13 +17,15 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.flicker.subject.exceptions.IncorrectRegionException
-import androidx.test.filters.RequiresDevice
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -36,6 +38,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class PipPinchInTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
override val thisTransition: FlickerBuilder.() -> Unit = {
transitions { pipApp.pinchInPipWindow(wmHelper, 0.4f, 30) }
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
index 578a9b536289..9d46ac1d6e00 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinned.kt
@@ -17,8 +17,11 @@
package com.android.wm.shell.flicker.pip
import android.app.Activity
+import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresDevice
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.Rotation
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -26,10 +29,9 @@ import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.helpers.WindowUtils
-import androidx.test.filters.FlakyTest
-import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.testapp.ActivityOptions
import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import com.android.wm.shell.flicker.pip.common.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
import org.junit.Assume
@@ -48,6 +50,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
open class SetRequestedOrientationWhilePinned(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val startingBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_0)
private val endingBounds = WindowUtils.getDisplayBounds(Rotation.ROTATION_90)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
index c6cf3411835c..e72251fb7a31 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/ShowPipAndRotateDisplay.kt
@@ -17,6 +17,7 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
+import android.platform.test.annotations.RequiresFlagsDisabled
import android.tools.flicker.assertions.FlickerTest
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.legacy.FlickerBuilder
@@ -25,6 +26,7 @@ import android.tools.flicker.legacy.LegacyFlickerTestFactory
import android.tools.helpers.WindowUtils
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.helpers.setRotation
+import com.android.wm.shell.Flags
import com.android.wm.shell.flicker.pip.common.PipTransition
import org.junit.FixMethodOrder
import org.junit.Test
@@ -58,6 +60,7 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+@RequiresFlagsDisabled(Flags.FLAG_ENABLE_PIP2)
class ShowPipAndRotateDisplay(flicker: LegacyFlickerTest) : PipTransition(flicker) {
private val testApp = SimpleAppHelper(instrumentation)
private val screenBoundsStart = WindowUtils.getDisplayBounds(flicker.scenario.startRotation)
diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
index bc2bfdbe1df1..c37bf3579e93 100644
--- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
+++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/common/PipTransition.kt
@@ -20,6 +20,7 @@ import android.app.Instrumentation
import android.content.Intent
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
+import android.platform.test.flag.junit.DeviceFlagsValueProvider
import android.tools.Rotation
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
@@ -31,9 +32,14 @@ import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.testapp.ActivityOptions
import com.android.wm.shell.flicker.BaseTest
import com.google.common.truth.Truth
+import org.junit.Rule
import org.junit.Test
abstract class PipTransition(flicker: LegacyFlickerTest) : BaseTest(flicker) {
+ @JvmField
+ @Rule
+ val checkFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule()
+
protected val pipApp = PipAppHelper(instrumentation)
protected val displayBounds = WindowUtils.getDisplayBounds(flicker.scenario.startRotation)
protected val broadcastActionTrigger = BroadcastActionTrigger(instrumentation)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxConfigurationTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxConfigurationTest.kt
new file mode 100644
index 000000000000..75025d9064d3
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxConfigurationTest.kt
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2024 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.wm.shell.compatui.letterbox
+
+import android.annotation.ColorRes
+import android.content.Context
+import android.content.res.Resources
+import android.graphics.Color
+import android.testing.AndroidTestingRunner
+import androidx.test.filters.SmallTest
+import com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn
+import com.android.internal.R
+import com.android.wm.shell.ShellTestCase
+import java.util.function.Consumer
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.doReturn
+
+/**
+ * Tests for [LetterboxConfiguration].
+ *
+ * Build/Install/Run:
+ * atest WMShellUnitTests:LetterboxConfigurationTest
+ */
+@RunWith(AndroidTestingRunner::class)
+@SmallTest
+class LetterboxConfigurationTest : ShellTestCase() {
+
+ companion object {
+ @JvmStatic
+ val COLOR_WHITE = Color.valueOf(Color.WHITE)
+ @JvmStatic
+ val COLOR_RED = Color.valueOf(Color.RED)
+ @JvmStatic
+ val COLOR_BLACK = Color.valueOf(Color.BLACK)
+ @JvmStatic
+ val COLOR_WHITE_RESOURCE_ID = android.R.color.white
+ @JvmStatic
+ val COLOR_BLACK_RESOURCE_ID = android.R.color.black
+ }
+
+ @Test
+ fun `default background color is used if override is not set`() {
+ runTestScenario { r ->
+ r.setDefaultBackgroundColorId(COLOR_WHITE_RESOURCE_ID)
+ r.loadConfiguration()
+ r.checkBackgroundColor(COLOR_WHITE)
+ }
+ }
+
+ @Test
+ fun `overridden background color is used if set`() {
+ runTestScenario { r ->
+ r.setDefaultBackgroundColorId(COLOR_WHITE_RESOURCE_ID)
+ r.loadConfiguration()
+ r.overrideBackgroundColor(COLOR_RED)
+ r.checkBackgroundColor(COLOR_RED)
+ }
+ }
+
+ @Test
+ fun `overridden background color resource is used if set without override`() {
+ runTestScenario { r ->
+ r.setDefaultBackgroundColorId(COLOR_WHITE_RESOURCE_ID)
+ r.loadConfiguration()
+ r.overrideBackgroundColorId(COLOR_BLACK_RESOURCE_ID)
+ r.checkBackgroundColor(COLOR_BLACK)
+ }
+ }
+
+ @Test
+ fun `overridden background color has precedence over color id`() {
+ runTestScenario { r ->
+ r.setDefaultBackgroundColorId(COLOR_WHITE_RESOURCE_ID)
+ r.loadConfiguration()
+ r.overrideBackgroundColor(COLOR_RED)
+ r.overrideBackgroundColorId(COLOR_BLACK_RESOURCE_ID)
+ r.checkBackgroundColor(COLOR_RED)
+ }
+ }
+
+ @Test
+ fun `reset background color`() {
+ runTestScenario { r ->
+ r.setDefaultBackgroundColorId(COLOR_WHITE_RESOURCE_ID)
+ r.loadConfiguration()
+ r.overrideBackgroundColor(COLOR_RED)
+ r.checkBackgroundColor(COLOR_RED)
+
+ r.resetBackgroundColor()
+ r.checkBackgroundColor(COLOR_WHITE)
+
+ r.overrideBackgroundColorId(COLOR_BLACK_RESOURCE_ID)
+ r.checkBackgroundColor(COLOR_BLACK)
+
+ r.resetBackgroundColor()
+ r.checkBackgroundColor(COLOR_WHITE)
+ }
+ }
+
+ /**
+ * Runs a test scenario providing a Robot.
+ */
+ fun runTestScenario(consumer: Consumer<LetterboxConfigurationRobotTest>) {
+ val robot = LetterboxConfigurationRobotTest(mContext)
+ consumer.accept(robot)
+ }
+
+ class LetterboxConfigurationRobotTest(private val ctx: Context) {
+
+ private val resources: Resources
+ private lateinit var letterboxConfig: LetterboxConfiguration
+
+ init {
+ resources = ctx.resources
+ spyOn(resources)
+ }
+
+ fun setDefaultBackgroundColorId(@ColorRes colorId: Int) {
+ doReturn(colorId).`when`(resources)
+ .getColor(R.color.config_letterboxBackgroundColor, null)
+ }
+
+ fun loadConfiguration() {
+ letterboxConfig = LetterboxConfiguration(ctx)
+ }
+
+ fun overrideBackgroundColor(color: Color) {
+ letterboxConfig.setLetterboxBackgroundColor(color)
+ }
+
+ fun resetBackgroundColor() {
+ letterboxConfig.resetLetterboxBackgroundColor()
+ }
+
+ fun overrideBackgroundColorId(@ColorRes colorId: Int) {
+ letterboxConfig.setLetterboxBackgroundColorResourceId(colorId)
+ }
+
+ fun checkBackgroundColor(expected: Color) {
+ val colorComponents = letterboxConfig.getBackgroundColorRgbArray()
+ val expectedComponents = expected.components
+ assert(expectedComponents.contentEquals(colorComponents))
+ }
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxTransitionObserverTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxTransitionObserverTest.kt
new file mode 100644
index 000000000000..1ae1c3fc4563
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/letterbox/LetterboxTransitionObserverTest.kt
@@ -0,0 +1,294 @@
+/*
+ * Copyright 2024 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.wm.shell.compatui.letterbox
+
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
+import android.platform.test.flag.junit.SetFlagsRule
+import android.testing.AndroidTestingRunner
+import android.view.WindowManager.TRANSIT_CLOSE
+import androidx.test.filters.SmallTest
+import com.android.window.flags.Flags
+import com.android.wm.shell.ShellTestCase
+import com.android.wm.shell.common.ShellExecutor
+import com.android.wm.shell.sysui.ShellInit
+import com.android.wm.shell.transition.Transitions
+import com.android.wm.shell.util.TransitionObserverInputBuilder
+import com.android.wm.shell.util.executeTransitionObserverTest
+import java.util.function.Consumer
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mockito
+import org.mockito.kotlin.any
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.never
+import org.mockito.kotlin.times
+import org.mockito.kotlin.anyOrNull
+import org.mockito.verification.VerificationMode
+
+/**
+ * Tests for [LetterboxTransitionObserver].
+ *
+ * Build/Install/Run:
+ * atest WMShellUnitTests:LetterboxTransitionObserverTest
+ */
+@RunWith(AndroidTestingRunner::class)
+@SmallTest
+class LetterboxTransitionObserverTest : ShellTestCase() {
+
+ @get:Rule
+ val setFlagsRule: SetFlagsRule = SetFlagsRule()
+
+ @Test
+ @DisableFlags(Flags.FLAG_APP_COMPAT_REFACTORING)
+ fun `when initialized and flag disabled the observer is not registered`() {
+ runTestScenario { r ->
+ executeTransitionObserverTest(observerFactory = r.observerFactory) {
+ r.invokeShellInit()
+ r.checkObservableIsRegistered(expected = false)
+ }
+ }
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_APP_COMPAT_REFACTORING)
+ fun `when initialized and flag enabled the observer is registered`() {
+ runTestScenario { r ->
+ executeTransitionObserverTest(observerFactory = r.observerFactory) {
+ r.invokeShellInit()
+ r.checkObservableIsRegistered(expected = true)
+ }
+ }
+ }
+
+ @Test
+ fun `LetterboxController not used without TaskInfos in Change`() {
+ runTestScenario { r ->
+ executeTransitionObserverTest(observerFactory = r.observerFactory) {
+ r.invokeShellInit()
+
+ inputBuilder {
+ buildTransitionInfo()
+ addChange(createChange())
+ addChange(createChange())
+ addChange(createChange())
+ }
+
+ validateOutput {
+ r.creationEventDetected(expected = false)
+ r.visibilityEventDetected(expected = false)
+ r.destroyEventDetected(expected = false)
+ r.boundsEventDetected(expected = false)
+ }
+ }
+ }
+ }
+
+ @Test
+ fun `When a topActivity is letterboxed surfaces creation is requested`() {
+ runTestScenario { r ->
+ executeTransitionObserverTest(observerFactory = r.observerFactory) {
+ r.invokeShellInit()
+
+ inputBuilder {
+ buildTransitionInfo()
+ r.createTopActivityChange(inputBuilder = this, isLetterboxed = true)
+ }
+
+ validateOutput {
+ r.creationEventDetected(expected = true)
+ r.visibilityEventDetected(expected = true, visible = true)
+ r.destroyEventDetected(expected = false)
+ r.boundsEventDetected(expected = true)
+ }
+ }
+ }
+ }
+
+ @Test
+ fun `When a topActivity is not letterboxed visibility is updated`() {
+ runTestScenario { r ->
+ executeTransitionObserverTest(observerFactory = r.observerFactory) {
+ r.invokeShellInit()
+
+ inputBuilder {
+ buildTransitionInfo()
+ r.createTopActivityChange(inputBuilder = this, isLetterboxed = false)
+ }
+
+ validateOutput {
+ r.creationEventDetected(expected = false)
+ r.visibilityEventDetected(expected = true, visible = false)
+ r.destroyEventDetected(expected = false)
+ r.boundsEventDetected(expected = false)
+ }
+ }
+ }
+ }
+
+ @Test
+ fun `When closing change letterbox surface destroy is triggered`() {
+ runTestScenario { r ->
+ executeTransitionObserverTest(observerFactory = r.observerFactory) {
+ r.invokeShellInit()
+
+ inputBuilder {
+ buildTransitionInfo()
+ r.createClosingChange(inputBuilder = this)
+ }
+
+ validateOutput {
+ r.destroyEventDetected(expected = true)
+ r.creationEventDetected(expected = false)
+ r.visibilityEventDetected(expected = false, visible = false)
+ r.boundsEventDetected(expected = false)
+ }
+ }
+ }
+ }
+
+ /**
+ * Runs a test scenario providing a Robot.
+ */
+ fun runTestScenario(consumer: Consumer<LetterboxTransitionObserverRobotTest>) {
+ val robot = LetterboxTransitionObserverRobotTest()
+ consumer.accept(robot)
+ }
+
+ class LetterboxTransitionObserverRobotTest {
+
+ companion object {
+ @JvmStatic
+ private val DISPLAY_ID = 1
+
+ @JvmStatic
+ private val TASK_ID = 20
+ }
+
+ private val executor: ShellExecutor
+ private val shellInit: ShellInit
+ private val transitions: Transitions
+ private val letterboxController: LetterboxController
+ private val letterboxObserver: LetterboxTransitionObserver
+
+ val observerFactory: () -> LetterboxTransitionObserver
+
+ init {
+ executor = Mockito.mock(ShellExecutor::class.java)
+ shellInit = ShellInit(executor)
+ transitions = Mockito.mock(Transitions::class.java)
+ letterboxController = Mockito.mock(LetterboxController::class.java)
+ letterboxObserver =
+ LetterboxTransitionObserver(shellInit, transitions, letterboxController)
+ observerFactory = { letterboxObserver }
+ }
+
+ fun invokeShellInit() = shellInit.init()
+
+ fun observer() = letterboxObserver
+
+ fun checkObservableIsRegistered(expected: Boolean) {
+ Mockito.verify(transitions, expected.asMode()).registerObserver(observer())
+ }
+
+ fun creationEventDetected(
+ expected: Boolean,
+ displayId: Int = DISPLAY_ID,
+ taskId: Int = TASK_ID
+ ) {
+ Mockito.verify(letterboxController, expected.asMode()).createLetterboxSurface(
+ toLetterboxKeyMatcher(displayId, taskId),
+ anyOrNull(),
+ anyOrNull()
+ )
+ }
+
+ fun visibilityEventDetected(
+ expected: Boolean,
+ displayId: Int = DISPLAY_ID,
+ taskId: Int = TASK_ID,
+ visible: Boolean? = null
+ ) {
+ Mockito.verify(letterboxController, expected.asMode()).updateLetterboxSurfaceVisibility(
+ toLetterboxKeyMatcher(displayId, taskId),
+ anyOrNull(),
+ visible.asMatcher()
+ )
+ }
+
+ fun destroyEventDetected(
+ expected: Boolean,
+ displayId: Int = DISPLAY_ID,
+ taskId: Int = TASK_ID
+ ) {
+ Mockito.verify(letterboxController, expected.asMode()).destroyLetterboxSurface(
+ toLetterboxKeyMatcher(displayId, taskId),
+ anyOrNull()
+ )
+ }
+
+ fun boundsEventDetected(
+ expected: Boolean,
+ displayId: Int = DISPLAY_ID,
+ taskId: Int = TASK_ID
+ ) {
+ Mockito.verify(letterboxController, expected.asMode()).updateLetterboxSurfaceBounds(
+ toLetterboxKeyMatcher(displayId, taskId),
+ anyOrNull(),
+ anyOrNull()
+ )
+ }
+
+ fun createTopActivityChange(
+ inputBuilder: TransitionObserverInputBuilder,
+ isLetterboxed: Boolean = true,
+ displayId: Int = DISPLAY_ID,
+ taskId: Int = TASK_ID
+ ) {
+ inputBuilder.addChange(changeTaskInfo = inputBuilder.createTaskInfo().apply {
+ appCompatTaskInfo.isTopActivityLetterboxed = isLetterboxed
+ this.taskId = taskId
+ this.displayId = displayId
+ })
+ }
+
+ fun createClosingChange(
+ inputBuilder: TransitionObserverInputBuilder,
+ displayId: Int = DISPLAY_ID,
+ taskId: Int = TASK_ID
+ ) {
+ inputBuilder.addChange(changeTaskInfo = inputBuilder.createTaskInfo().apply {
+ this.taskId = taskId
+ this.displayId = displayId
+ }, changeMode = TRANSIT_CLOSE)
+ }
+
+ private fun Boolean.asMode(): VerificationMode = if (this) times(1) else never()
+
+ private fun Boolean?.asMatcher(): Boolean =
+ if (this != null) eq(this) else any()
+
+ private fun toLetterboxKeyMatcher(displayId: Int, taskId: Int): LetterboxKey {
+ if (displayId < 0 || taskId < 0) {
+ return any()
+ } else {
+ return eq(LetterboxKey(displayId, taskId))
+ }
+ }
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandlerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandlerTest.kt
new file mode 100644
index 000000000000..9e63a6d922b8
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeKeyGestureHandlerTest.kt
@@ -0,0 +1,312 @@
+/*
+ * Copyright (C) 2024 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.wm.shell.desktopmode
+
+import android.app.ActivityManager.RunningTaskInfo
+import android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN
+import android.content.pm.ActivityInfo
+import android.graphics.Rect
+import android.hardware.input.InputManager
+import android.hardware.input.InputManager.KeyGestureEventHandler
+import android.hardware.input.KeyGestureEvent
+import android.platform.test.annotations.EnableFlags
+import android.platform.test.flag.junit.SetFlagsRule
+import android.testing.AndroidTestingRunner
+import android.view.Display.DEFAULT_DISPLAY
+import android.view.KeyEvent
+import android.window.DisplayAreaInfo
+import androidx.test.filters.SmallTest
+import com.android.hardware.input.Flags.FLAG_USE_KEY_GESTURE_EVENT_HANDLER
+import com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE
+import com.android.window.flags.Flags.FLAG_ENABLE_DISPLAY_FOCUS_IN_SHELL_TRANSITIONS
+import com.android.window.flags.Flags.FLAG_ENABLE_MOVE_TO_NEXT_DISPLAY_SHORTCUT
+import com.android.wm.shell.MockToken
+import com.android.wm.shell.RootTaskDisplayAreaOrganizer
+import com.android.wm.shell.ShellTaskOrganizer
+import com.android.wm.shell.ShellTestCase
+import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createFreeformTask
+import com.android.wm.shell.transition.FocusTransitionObserver
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.whenever
+import com.android.dx.mockito.inline.extended.ExtendedMockito.doAnswer
+import com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn
+import com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession
+import com.android.dx.mockito.inline.extended.StaticMockitoSession
+import com.android.window.flags.Flags.FLAG_ENABLE_TASK_RESIZING_KEYBOARD_SHORTCUTS
+import com.android.wm.shell.common.DisplayController
+import com.android.wm.shell.common.DisplayLayout
+import com.android.wm.shell.common.ShellExecutor
+import com.android.wm.shell.desktopmode.DesktopModeEventLogger.Companion.ResizeTrigger
+import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
+import com.android.wm.shell.sysui.ShellInit
+import com.android.wm.shell.windowdecor.DesktopModeWindowDecorViewModel
+import java.util.Optional
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.SupervisorJob
+import kotlinx.coroutines.cancel
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.setMain
+import org.junit.After
+import org.mockito.Mockito.anyInt
+import org.mockito.Mockito.spy
+import org.mockito.Mockito.verify
+import org.mockito.kotlin.any
+import org.mockito.kotlin.mock
+import org.mockito.quality.Strictness
+
+/**
+ * Test class for [DesktopModeKeyGestureHandler]
+ *
+ * Usage: atest WMShellUnitTests:DesktopModeKeyGestureHandlerTest
+ */
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+@ExperimentalCoroutinesApi
+@EnableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+class DesktopModeKeyGestureHandlerTest : ShellTestCase() {
+
+ @JvmField @Rule val setFlagsRule = SetFlagsRule()
+
+ private val rootTaskDisplayAreaOrganizer = mock<RootTaskDisplayAreaOrganizer>()
+ private val shellTaskOrganizer = mock<ShellTaskOrganizer>()
+ private val focusTransitionObserver = mock<FocusTransitionObserver>()
+ private val testExecutor = mock<ShellExecutor>()
+ private val inputManager = mock<InputManager>()
+ private val displayController = mock<DisplayController>()
+ private val displayLayout = mock<DisplayLayout>()
+ private val desktopModeWindowDecorViewModel = mock<DesktopModeWindowDecorViewModel>()
+ private val desktopTasksController = mock<DesktopTasksController>()
+
+ private lateinit var desktopModeKeyGestureHandler: DesktopModeKeyGestureHandler
+ private lateinit var keyGestureEventHandler: KeyGestureEventHandler
+ private lateinit var mockitoSession: StaticMockitoSession
+ private lateinit var testScope: CoroutineScope
+ private lateinit var shellInit: ShellInit
+
+ // Mock running tasks are registered here so we can get the list from mock shell task organizer
+ private val runningTasks = mutableListOf<RunningTaskInfo>()
+
+ @Before
+ fun setUp() {
+ Dispatchers.setMain(StandardTestDispatcher())
+ mockitoSession =
+ mockitoSession()
+ .strictness(Strictness.LENIENT)
+ .spyStatic(DesktopModeStatus::class.java)
+ .startMocking()
+ doReturn(true).`when` { DesktopModeStatus.isDesktopModeSupported(any()) }
+
+ testScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob())
+ shellInit = spy(ShellInit(testExecutor))
+
+ whenever(shellTaskOrganizer.getRunningTasks(anyInt())).thenAnswer { runningTasks }
+ whenever(displayController.getDisplayLayout(anyInt())).thenReturn(displayLayout)
+ whenever(displayLayout.getStableBounds(any())).thenAnswer { i ->
+ (i.arguments.first() as Rect).set(STABLE_BOUNDS)
+ }
+ val tda = DisplayAreaInfo(MockToken().token(), DEFAULT_DISPLAY, 0)
+ tda.configuration.windowConfiguration.windowingMode = WINDOWING_MODE_FULLSCREEN
+ whenever(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(DEFAULT_DISPLAY)).thenReturn(tda)
+
+ doAnswer {
+ keyGestureEventHandler = (it.arguments[0] as KeyGestureEventHandler)
+ null
+ }.whenever(inputManager).registerKeyGestureEventHandler(any())
+ shellInit.init()
+ }
+
+ @After
+ fun tearDown() {
+ mockitoSession.finishMocking()
+
+ runningTasks.clear()
+ testScope.cancel()
+ }
+
+ @Test
+ @EnableFlags(
+ FLAG_ENABLE_DISPLAY_FOCUS_IN_SHELL_TRANSITIONS,
+ FLAG_ENABLE_MOVE_TO_NEXT_DISPLAY_SHORTCUT,
+ FLAG_USE_KEY_GESTURE_EVENT_HANDLER
+ )
+ fun keyGestureMoveToNextDisplay_shouldMoveToNextDisplay() {
+ desktopModeKeyGestureHandler = DesktopModeKeyGestureHandler(
+ context,
+ Optional.of(desktopModeWindowDecorViewModel), Optional.of(desktopTasksController),
+ inputManager, shellTaskOrganizer, focusTransitionObserver
+ )
+ // Set up two display ids
+ whenever(rootTaskDisplayAreaOrganizer.displayIds)
+ .thenReturn(intArrayOf(DEFAULT_DISPLAY, SECOND_DISPLAY))
+ // Create a mock for the target display area: default display
+ val defaultDisplayArea = DisplayAreaInfo(MockToken().token(), DEFAULT_DISPLAY, 0)
+ whenever(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(DEFAULT_DISPLAY))
+ .thenReturn(defaultDisplayArea)
+ // Setup a focused task on secondary display, which is expected to move to default display
+ val task = setUpFreeformTask(displayId = SECOND_DISPLAY)
+ task.isFocused = true
+ whenever(shellTaskOrganizer.getRunningTasks()).thenReturn(arrayListOf(task))
+ whenever(focusTransitionObserver.hasGlobalFocus(eq(task))).thenReturn(true)
+
+ val event = KeyGestureEvent.Builder()
+ .setKeyGestureType(KeyGestureEvent.KEY_GESTURE_TYPE_MOVE_TO_NEXT_DISPLAY)
+ .setDisplayId(SECOND_DISPLAY)
+ .setKeycodes(intArrayOf(KeyEvent.KEYCODE_D))
+ .setModifierState(KeyEvent.META_META_ON or KeyEvent.META_CTRL_ON)
+ .build()
+ val result = keyGestureEventHandler.handleKeyGestureEvent(event, null)
+
+ assertThat(result).isTrue()
+ verify(desktopTasksController).moveToNextDisplay(task.taskId)
+ }
+
+ @Test
+ @EnableFlags(
+ FLAG_USE_KEY_GESTURE_EVENT_HANDLER,
+ FLAG_ENABLE_TASK_RESIZING_KEYBOARD_SHORTCUTS
+ )
+ fun keyGestureSnapLeft_shouldSnapResizeTaskToLeft() {
+ desktopModeKeyGestureHandler = DesktopModeKeyGestureHandler(
+ context,
+ Optional.of(desktopModeWindowDecorViewModel), Optional.of(desktopTasksController),
+ inputManager, shellTaskOrganizer, focusTransitionObserver
+ )
+ val task = setUpFreeformTask()
+ task.isFocused = true
+ whenever(shellTaskOrganizer.getRunningTasks()).thenReturn(arrayListOf(task))
+ whenever(focusTransitionObserver.hasGlobalFocus(eq(task))).thenReturn(true)
+
+ val event = KeyGestureEvent.Builder()
+ .setKeyGestureType(KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW)
+ .setKeycodes(intArrayOf(KeyEvent.KEYCODE_LEFT_BRACKET))
+ .setModifierState(KeyEvent.META_META_ON)
+ .build()
+ val result = keyGestureEventHandler.handleKeyGestureEvent(event, null)
+
+ assertThat(result).isTrue()
+ verify(desktopModeWindowDecorViewModel).onSnapResize(task.taskId, true, null)
+ }
+
+ @Test
+ @EnableFlags(
+ FLAG_USE_KEY_GESTURE_EVENT_HANDLER,
+ FLAG_ENABLE_TASK_RESIZING_KEYBOARD_SHORTCUTS
+ )
+ fun keyGestureSnapRight_shouldSnapResizeTaskToRight() {
+ desktopModeKeyGestureHandler = DesktopModeKeyGestureHandler(
+ context,
+ Optional.of(desktopModeWindowDecorViewModel), Optional.of(desktopTasksController),
+ inputManager, shellTaskOrganizer, focusTransitionObserver
+ )
+ val task = setUpFreeformTask()
+ task.isFocused = true
+ whenever(shellTaskOrganizer.getRunningTasks()).thenReturn(arrayListOf(task))
+ whenever(focusTransitionObserver.hasGlobalFocus(eq(task))).thenReturn(true)
+
+ val event = KeyGestureEvent.Builder()
+ .setKeyGestureType(KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW)
+ .setKeycodes(intArrayOf(KeyEvent.KEYCODE_RIGHT_BRACKET))
+ .setModifierState(KeyEvent.META_META_ON)
+ .build()
+ val result = keyGestureEventHandler.handleKeyGestureEvent(event, null)
+
+ assertThat(result).isTrue()
+ verify(desktopModeWindowDecorViewModel).onSnapResize(task.taskId, false, null)
+ }
+
+ @Test
+ @EnableFlags(
+ FLAG_USE_KEY_GESTURE_EVENT_HANDLER,
+ FLAG_ENABLE_TASK_RESIZING_KEYBOARD_SHORTCUTS
+ )
+ fun keyGestureToggleFreeformWindowSize_shouldToggleTaskSize() {
+ desktopModeKeyGestureHandler = DesktopModeKeyGestureHandler(
+ context,
+ Optional.of(desktopModeWindowDecorViewModel), Optional.of(desktopTasksController),
+ inputManager, shellTaskOrganizer, focusTransitionObserver
+ )
+ val task = setUpFreeformTask()
+ task.isFocused = true
+ whenever(shellTaskOrganizer.getRunningTasks()).thenReturn(arrayListOf(task))
+ whenever(focusTransitionObserver.hasGlobalFocus(eq(task))).thenReturn(true)
+
+ val event = KeyGestureEvent.Builder()
+ .setKeyGestureType(KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW)
+ .setKeycodes(intArrayOf(KeyEvent.KEYCODE_EQUALS))
+ .setModifierState(KeyEvent.META_META_ON)
+ .build()
+ val result = keyGestureEventHandler.handleKeyGestureEvent(event, null)
+
+ assertThat(result).isTrue()
+ verify(desktopTasksController).toggleDesktopTaskSize(
+ task,
+ ResizeTrigger.MAXIMIZE_MENU,
+ null
+ )
+ }
+
+ @Test
+ @EnableFlags(
+ FLAG_USE_KEY_GESTURE_EVENT_HANDLER,
+ FLAG_ENABLE_TASK_RESIZING_KEYBOARD_SHORTCUTS
+ )
+ fun keyGestureMinimizeFreeformWindow_shouldMinimizeTask() {
+ desktopModeKeyGestureHandler = DesktopModeKeyGestureHandler(
+ context,
+ Optional.of(desktopModeWindowDecorViewModel), Optional.of(desktopTasksController),
+ inputManager, shellTaskOrganizer, focusTransitionObserver
+ )
+ val task = setUpFreeformTask()
+ task.isFocused = true
+ whenever(shellTaskOrganizer.getRunningTasks()).thenReturn(arrayListOf(task))
+ whenever(focusTransitionObserver.hasGlobalFocus(eq(task))).thenReturn(true)
+
+ val event = KeyGestureEvent.Builder()
+ .setKeyGestureType(KeyGestureEvent.KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW)
+ .setKeycodes(intArrayOf(KeyEvent.KEYCODE_MINUS))
+ .setModifierState(KeyEvent.META_META_ON)
+ .build()
+ val result = keyGestureEventHandler.handleKeyGestureEvent(event, null)
+
+ assertThat(result).isTrue()
+ verify(desktopTasksController).minimizeTask(task)
+ }
+
+ private fun setUpFreeformTask(
+ displayId: Int = DEFAULT_DISPLAY,
+ bounds: Rect? = null,
+ ): RunningTaskInfo {
+ val task = createFreeformTask(displayId, bounds)
+ val activityInfo = ActivityInfo()
+ task.topActivityInfo = activityInfo
+ whenever(shellTaskOrganizer.getRunningTaskInfo(task.taskId)).thenReturn(task)
+ runningTasks.add(task)
+ return task
+ }
+
+ private companion object {
+ const val SECOND_DISPLAY = 2
+ val STABLE_BOUNDS = Rect(0, 0, 1000, 1000)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt
index 2319716617bf..936835c34c04 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt
@@ -36,12 +36,10 @@ import android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
import android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
import android.content.res.Configuration.ORIENTATION_LANDSCAPE
import android.content.res.Configuration.ORIENTATION_PORTRAIT
+import android.content.res.Resources
import android.graphics.Point
import android.graphics.PointF
import android.graphics.Rect
-import android.hardware.input.InputManager
-import android.hardware.input.InputManager.KeyGestureEventHandler
-import android.hardware.input.KeyGestureEvent
import android.os.Binder
import android.os.Bundle
import android.os.Handler
@@ -53,7 +51,6 @@ import android.testing.AndroidTestingRunner
import android.view.Display.DEFAULT_DISPLAY
import android.view.DragEvent
import android.view.Gravity
-import android.view.KeyEvent
import android.view.MotionEvent
import android.view.SurfaceControl
import android.view.WindowInsets
@@ -63,6 +60,7 @@ import android.view.WindowManager.TRANSIT_CLOSE
import android.view.WindowManager.TRANSIT_OPEN
import android.view.WindowManager.TRANSIT_TO_BACK
import android.view.WindowManager.TRANSIT_TO_FRONT
+import android.widget.Toast
import android.window.DisplayAreaInfo
import android.window.IWindowContainerToken
import android.window.RemoteTransition
@@ -75,18 +73,14 @@ import android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_R
import android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_REORDER
import android.window.WindowContainerTransaction.HierarchyOp.LAUNCH_KEY_TASK_ID
import androidx.test.filters.SmallTest
-import com.android.dx.mockito.inline.extended.ExtendedMockito.doAnswer
import com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn
import com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession
import com.android.dx.mockito.inline.extended.ExtendedMockito.never
import com.android.dx.mockito.inline.extended.StaticMockitoSession
-import com.android.hardware.input.Flags.FLAG_USE_KEY_GESTURE_EVENT_HANDLER
import com.android.internal.jank.InteractionJankMonitor
import com.android.window.flags.Flags
import com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE
-import com.android.window.flags.Flags.FLAG_ENABLE_DISPLAY_FOCUS_IN_SHELL_TRANSITIONS
import com.android.window.flags.Flags.FLAG_ENABLE_FULLY_IMMERSIVE_IN_DESKTOP
-import com.android.window.flags.Flags.FLAG_ENABLE_MOVE_TO_NEXT_DISPLAY_SHORTCUT
import com.android.wm.shell.MockToken
import com.android.wm.shell.R
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
@@ -96,18 +90,20 @@ import com.android.wm.shell.TestRunningTaskInfoBuilder
import com.android.wm.shell.TestShellExecutor
import com.android.wm.shell.common.DisplayController
import com.android.wm.shell.common.DisplayLayout
-import com.android.wm.shell.common.LaunchAdjacentController
import com.android.wm.shell.common.MultiInstanceHelper
import com.android.wm.shell.common.ShellExecutor
import com.android.wm.shell.common.SyncTransactionQueue
import com.android.wm.shell.desktopmode.DesktopImmersiveController.ExitResult
import com.android.wm.shell.desktopmode.DesktopModeEventLogger.Companion.ResizeTrigger
+import com.android.wm.shell.desktopmode.DesktopTasksController.DesktopModeEntryExitTransitionListener
import com.android.wm.shell.desktopmode.DesktopTasksController.SnapPosition
import com.android.wm.shell.desktopmode.DesktopTasksController.TaskbarDesktopTaskListener
import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createFreeformTask
import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createFullscreenTask
import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createHomeTask
import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createSplitScreenTask
+import com.android.wm.shell.desktopmode.EnterDesktopTaskTransitionHandler.FREEFORM_ANIMATION_DURATION
+import com.android.wm.shell.desktopmode.ExitDesktopTaskTransitionHandler.FULLSCREEN_ANIMATION_DURATION
import com.android.wm.shell.desktopmode.minimize.DesktopWindowLimitRemoteHandler
import com.android.wm.shell.desktopmode.persistence.Desktop
import com.android.wm.shell.desktopmode.persistence.DesktopPersistentRepository
@@ -124,7 +120,6 @@ import com.android.wm.shell.splitscreen.SplitScreenController
import com.android.wm.shell.sysui.ShellCommandHandler
import com.android.wm.shell.sysui.ShellController
import com.android.wm.shell.sysui.ShellInit
-import com.android.wm.shell.transition.FocusTransitionObserver
import com.android.wm.shell.transition.OneShotRemoteHandler
import com.android.wm.shell.transition.TestRemoteTransition
import com.android.wm.shell.transition.Transitions
@@ -208,12 +203,10 @@ class DesktopTasksControllerTest : ShellTestCase() {
@Mock lateinit var dragToDesktopTransitionHandler: DragToDesktopTransitionHandler
@Mock
lateinit var mMockDesktopImmersiveController: DesktopImmersiveController
- @Mock lateinit var launchAdjacentController: LaunchAdjacentController
@Mock lateinit var splitScreenController: SplitScreenController
@Mock lateinit var recentsTransitionHandler: RecentsTransitionHandler
@Mock lateinit var dragAndDropController: DragAndDropController
@Mock lateinit var multiInstanceHelper: MultiInstanceHelper
- @Mock lateinit var desktopModeLoggerTransitionObserver: DesktopModeLoggerTransitionObserver
@Mock lateinit var desktopModeVisualIndicator: DesktopModeVisualIndicator
@Mock lateinit var recentTasksController: RecentTasksController
@Mock
@@ -224,23 +217,23 @@ class DesktopTasksControllerTest : ShellTestCase() {
@Mock private lateinit var mockHandler: Handler
@Mock private lateinit var desktopModeEventLogger: DesktopModeEventLogger
@Mock lateinit var persistentRepository: DesktopPersistentRepository
- @Mock private lateinit var mockInputManager: InputManager
- @Mock private lateinit var mockFocusTransitionObserver: FocusTransitionObserver
@Mock lateinit var motionEvent: MotionEvent
@Mock lateinit var repositoryInitializer: DesktopRepositoryInitializer
-
+ @Mock private lateinit var mockToast: Toast
private lateinit var mockitoSession: StaticMockitoSession
@Mock
private lateinit var desktopTilingDecorViewModel: DesktopTilingDecorViewModel
@Mock
private lateinit var desktopWindowDecoration: DesktopModeWindowDecoration
+ @Mock private lateinit var resources: Resources
+ @Mock
+ lateinit var desktopModeEnterExitTransitionListener: DesktopModeEntryExitTransitionListener
private lateinit var controller: DesktopTasksController
private lateinit var shellInit: ShellInit
private lateinit var taskRepository: DesktopRepository
private lateinit var desktopTasksLimiter: DesktopTasksLimiter
private lateinit var recentsTransitionStateListener: RecentsTransitionStateListener
private lateinit var testScope: CoroutineScope
- private lateinit var keyGestureEventHandler: KeyGestureEventHandler
private val shellExecutor = TestShellExecutor()
@@ -263,6 +256,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
mockitoSession()
.strictness(Strictness.LENIENT)
.spyStatic(DesktopModeStatus::class.java)
+ .spyStatic(Toast::class.java)
.startMocking()
doReturn(true).`when` { DesktopModeStatus.isDesktopModeSupported(any()) }
@@ -290,6 +284,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
whenever(runBlocking { persistentRepository.readDesktop(any(), any()) }).thenReturn(
Desktop.getDefaultInstance()
)
+ doReturn(mockToast).`when` { Toast.makeText(any(), anyInt(), anyInt()) }
val tda = DisplayAreaInfo(MockToken().token(), DEFAULT_DISPLAY, 0)
tda.configuration.windowConfiguration.windowingMode = WINDOWING_MODE_FULLSCREEN
@@ -304,11 +299,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller = createController()
controller.setSplitScreenController(splitScreenController)
controller.freeformTaskTransitionStarter = freeformTaskTransitionStarter
-
- doAnswer {
- keyGestureEventHandler = (it.arguments[0] as KeyGestureEventHandler)
- null
- }.whenever(mockInputManager).registerKeyGestureEventHandler(any())
+ controller.desktopModeEnterExitTransitionListener = desktopModeEnterExitTransitionListener
shellInit.init()
@@ -343,8 +334,6 @@ class DesktopTasksControllerTest : ShellTestCase() {
dragToDesktopTransitionHandler,
mMockDesktopImmersiveController,
taskRepository,
- desktopModeLoggerTransitionObserver,
- launchAdjacentController,
recentsTransitionHandler,
multiInstanceHelper,
shellExecutor,
@@ -352,8 +341,6 @@ class DesktopTasksControllerTest : ShellTestCase() {
recentTasksController,
mockInteractionJankMonitor,
mockHandler,
- mockInputManager,
- mockFocusTransitionObserver,
desktopModeEventLogger,
desktopTilingDecorViewModel,
)
@@ -1073,6 +1060,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.moveRunningTaskToDesktop(task, transitionSource = UNKNOWN)
val wct = getLatestEnterDesktopWct()
assertThat(wct.changes[task.token.asBinder()]?.windowingMode).isEqualTo(WINDOWING_MODE_FREEFORM)
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
}
@Test
@@ -1084,12 +1072,14 @@ class DesktopTasksControllerTest : ShellTestCase() {
val wct = getLatestEnterDesktopWct()
assertThat(wct.changes[task.token.asBinder()]?.windowingMode)
.isEqualTo(WINDOWING_MODE_UNDEFINED)
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
}
@Test
fun moveTaskToDesktop_nonExistentTask_doesNothing() {
controller.moveTaskToDesktop(999, transitionSource = UNKNOWN)
verifyEnterDesktopWCTNotExecuted()
+ verify(desktopModeEnterExitTransitionListener, times(0)).onEnterDesktopModeTransitionStarted(anyInt())
}
@Test
@@ -1134,9 +1124,9 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
controller.moveRunningTaskToDesktop(task, transitionSource = UNKNOWN)
-
val wct = getLatestEnterDesktopWct()
assertThat(wct.changes[task.token.asBinder()]?.windowingMode).isEqualTo(WINDOWING_MODE_FREEFORM)
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
}
@Test
@@ -1151,6 +1141,9 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.moveRunningTaskToDesktop(task, transitionSource = UNKNOWN)
verifyEnterDesktopWCTNotExecuted()
+ verify(desktopModeEnterExitTransitionListener, times(0)).onEnterDesktopModeTransitionStarted(
+ FREEFORM_ANIMATION_DURATION
+ )
}
@Test
@@ -1197,6 +1190,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val wct = getLatestEnterDesktopWct()
assertThat(wct.changes[task.token.asBinder()]?.windowingMode).isEqualTo(WINDOWING_MODE_FREEFORM)
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
}
@Test
@@ -1216,6 +1210,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
assertThat(changes[fullscreenTask.token.asBinder()]?.windowingMode)
.isEqualTo(WINDOWING_MODE_FREEFORM)
}
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
}
@Test
@@ -1236,6 +1231,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
assertThat(changes[fullscreenTask.token.asBinder()]?.windowingMode)
.isEqualTo(WINDOWING_MODE_FREEFORM)
}
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
}
@Test
@@ -1257,6 +1253,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
assertThat(hierarchyOps.map { it.container })
.doesNotContain(freeformTaskSecond.token.asBinder())
}
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
}
@Test
@@ -1265,6 +1262,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.moveRunningTaskToDesktop(task, transitionSource = UNKNOWN)
val wct = getLatestEnterDesktopWct()
assertThat(wct.changes[task.token.asBinder()]?.windowingMode).isEqualTo(WINDOWING_MODE_FREEFORM)
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
verify(splitScreenController)
.prepareExitSplitScreen(any(), anyInt(), eq(SplitScreenController.EXIT_REASON_DESKTOP_MODE))
}
@@ -1275,6 +1273,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.moveRunningTaskToDesktop(task, transitionSource = UNKNOWN)
val wct = getLatestEnterDesktopWct()
assertThat(wct.changes[task.token.asBinder()]?.windowingMode).isEqualTo(WINDOWING_MODE_FREEFORM)
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
verify(splitScreenController, never())
.prepareExitSplitScreen(any(), anyInt(), eq(SplitScreenController.EXIT_REASON_DESKTOP_MODE))
}
@@ -1289,6 +1288,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.moveRunningTaskToDesktop(newTask, transitionSource = UNKNOWN)
val wct = getLatestEnterDesktopWct()
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
assertThat(wct.hierarchyOps.size).isEqualTo(MAX_TASK_LIMIT + 1) // visible tasks + home
wct.assertReorderAt(0, homeTask)
wct.assertReorderSequenceInRange(
@@ -1307,6 +1307,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.moveRunningTaskToDesktop(newTask, transitionSource = UNKNOWN)
val wct = getLatestEnterDesktopWct()
+ verify(desktopModeEnterExitTransitionListener).onEnterDesktopModeTransitionStarted(FREEFORM_ANIMATION_DURATION)
assertThat(wct.hierarchyOps.size).isEqualTo(MAX_TASK_LIMIT + 2) // tasks + home + wallpaper
// Move home to front
wct.assertReorderAt(0, homeTask)
@@ -1326,6 +1327,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
tda.configuration.windowConfiguration.windowingMode = WINDOWING_MODE_FULLSCREEN
controller.moveToFullscreen(task.taskId, transitionSource = UNKNOWN)
val wct = getLatestExitDesktopWct()
+ verify(desktopModeEnterExitTransitionListener, times(1)).onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
assertThat(wct.changes[task.token.asBinder()]?.windowingMode)
.isEqualTo(WINDOWING_MODE_UNDEFINED)
}
@@ -1343,6 +1345,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val wct = getLatestExitDesktopWct()
val taskChange = assertNotNull(wct.changes[task.token.asBinder()])
+ verify(desktopModeEnterExitTransitionListener).onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
assertThat(taskChange.windowingMode).isEqualTo(WINDOWING_MODE_UNDEFINED)
// Removes wallpaper activity when leaving desktop
wct.assertRemoveAt(index = 0, wallpaperToken)
@@ -1357,6 +1360,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val wct = getLatestExitDesktopWct()
assertThat(wct.changes[task.token.asBinder()]?.windowingMode)
.isEqualTo(WINDOWING_MODE_FULLSCREEN)
+ verify(desktopModeEnterExitTransitionListener).onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
}
@Test
@@ -1373,6 +1377,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val wct = getLatestExitDesktopWct()
val taskChange = assertNotNull(wct.changes[task.token.asBinder()])
assertThat(taskChange.windowingMode).isEqualTo(WINDOWING_MODE_FULLSCREEN)
+ verify(desktopModeEnterExitTransitionListener).onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
// Removes wallpaper activity when leaving desktop
wct.assertRemoveAt(index = 0, wallpaperToken)
}
@@ -1393,6 +1398,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val wct = getLatestExitDesktopWct()
val task1Change = assertNotNull(wct.changes[task1.token.asBinder()])
assertThat(task1Change.windowingMode).isEqualTo(WINDOWING_MODE_UNDEFINED)
+ verify(desktopModeEnterExitTransitionListener).onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
// Does not remove wallpaper activity, as desktop still has a visible desktop task
assertThat(wct.hierarchyOps).isEmpty()
}
@@ -1407,13 +1413,13 @@ class DesktopTasksControllerTest : ShellTestCase() {
fun moveToFullscreen_secondDisplayTaskHasFreeform_secondDisplayNotAffected() {
val taskDefaultDisplay = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val taskSecondDisplay = setUpFreeformTask(displayId = SECOND_DISPLAY)
-
controller.moveToFullscreen(taskDefaultDisplay.taskId, transitionSource = UNKNOWN)
with(getLatestExitDesktopWct()) {
assertThat(changes.keys).contains(taskDefaultDisplay.token.asBinder())
assertThat(changes.keys).doesNotContain(taskSecondDisplay.token.asBinder())
}
+ verify(desktopModeEnterExitTransitionListener).onExitDesktopModeTransitionStarted(FULLSCREEN_ANIMATION_DURATION)
}
@Test
@@ -1558,44 +1564,6 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
- @EnableFlags(
- FLAG_ENABLE_DISPLAY_FOCUS_IN_SHELL_TRANSITIONS,
- FLAG_ENABLE_MOVE_TO_NEXT_DISPLAY_SHORTCUT,
- FLAG_USE_KEY_GESTURE_EVENT_HANDLER
- )
- fun moveToNextDisplay_withKeyGesture() {
- // Set up two display ids
- whenever(rootTaskDisplayAreaOrganizer.displayIds)
- .thenReturn(intArrayOf(DEFAULT_DISPLAY, SECOND_DISPLAY))
- // Create a mock for the target display area: default display
- val defaultDisplayArea = DisplayAreaInfo(MockToken().token(), DEFAULT_DISPLAY, 0)
- whenever(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(DEFAULT_DISPLAY))
- .thenReturn(defaultDisplayArea)
- // Setup a focused task on secondary display, which is expected to move to default display
- val task = setUpFreeformTask(displayId = SECOND_DISPLAY)
- task.isFocused = true
- whenever(shellTaskOrganizer.getRunningTasks()).thenReturn(arrayListOf(task))
- whenever(mockFocusTransitionObserver.hasGlobalFocus(eq(task))).thenReturn(true)
-
- val event = KeyGestureEvent.Builder()
- .setKeyGestureType(KeyGestureEvent.KEY_GESTURE_TYPE_MOVE_TO_NEXT_DISPLAY)
- .setDisplayId(SECOND_DISPLAY)
- .setKeycodes(intArrayOf(KeyEvent.KEYCODE_D))
- .setModifierState(KeyEvent.META_META_ON or KeyEvent.META_CTRL_ON)
- .build()
- val result = keyGestureEventHandler.handleKeyGestureEvent(event, null)
-
- assertThat(result).isTrue()
- with(getLatestWct(type = TRANSIT_CHANGE)) {
- assertThat(hierarchyOps).hasSize(1)
- assertThat(hierarchyOps[0].container).isEqualTo(task.token.asBinder())
- assertThat(hierarchyOps[0].isReparent).isTrue()
- assertThat(hierarchyOps[0].newParent).isEqualTo(defaultDisplayArea.token.asBinder())
- assertThat(hierarchyOps[0].toTop).isTrue()
- }
- }
-
- @Test
fun getTaskWindowingMode() {
val fullscreenTask = setUpFullscreenTask()
val freeformTask = setUpFreeformTask()
@@ -3465,7 +3433,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
@Test
@DisableFlags(Flags.FLAG_DISABLE_NON_RESIZABLE_APP_SNAP_RESIZING, Flags.FLAG_ENABLE_TILE_RESIZING)
- fun handleSnapResizingTask_nonResizable_snapsToHalfScreen() {
+ fun handleSnapResizingTaskOnDrag_nonResizable_snapsToHalfScreen() {
val task = setUpFreeformTask(DEFAULT_DISPLAY, Rect(0, 0, 200, 100)).apply {
isResizeable = false
}
@@ -3474,7 +3442,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val expectedBounds =
Rect(STABLE_BOUNDS.left, STABLE_BOUNDS.top, STABLE_BOUNDS.right / 2, STABLE_BOUNDS.bottom)
- controller.handleSnapResizingTask(
+ controller.handleSnapResizingTaskOnDrag(
task, SnapPosition.LEFT, mockSurface, currentDragBounds, preDragBounds, motionEvent,
desktopWindowDecoration
@@ -3493,14 +3461,14 @@ class DesktopTasksControllerTest : ShellTestCase() {
@Test
@EnableFlags(Flags.FLAG_DISABLE_NON_RESIZABLE_APP_SNAP_RESIZING)
- fun handleSnapResizingTask_nonResizable_startsRepositionAnimation() {
+ fun handleSnapResizingTaskOnDrag_nonResizable_startsRepositionAnimation() {
val task = setUpFreeformTask(DEFAULT_DISPLAY, Rect(0, 0, 200, 100)).apply {
isResizeable = false
}
val preDragBounds = Rect(100, 100, 400, 500)
val currentDragBounds = Rect(0, 100, 300, 500)
- controller.handleSnapResizingTask(
+ controller.handleSnapResizingTaskOnDrag(
task, SnapPosition.LEFT, mockSurface, currentDragBounds, preDragBounds, motionEvent,
desktopWindowDecoration)
verify(mReturnToDragStartAnimator).start(
@@ -3520,6 +3488,59 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_DISABLE_NON_RESIZABLE_APP_SNAP_RESIZING
+ )
+ fun handleInstantSnapResizingTask_nonResizable_animatorNotStartedAndShowsToast() {
+ val taskBounds = Rect(0, 0, 200, 100)
+ val task = setUpFreeformTask(DEFAULT_DISPLAY, taskBounds).apply {
+ isResizeable = false
+ }
+
+ controller.handleInstantSnapResizingTask(
+ task, SnapPosition.LEFT, ResizeTrigger.SNAP_LEFT_MENU, motionEvent, desktopWindowDecoration)
+
+ // Assert that task is NOT updated via WCT
+ verify(toggleResizeDesktopTaskTransitionHandler, never()).startTransition(any(), any())
+ verify(mockToast).show()
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_DISABLE_NON_RESIZABLE_APP_SNAP_RESIZING)
+ @DisableFlags(Flags.FLAG_ENABLE_TILE_RESIZING)
+ fun handleInstantSnapResizingTask_resizable_snapsToHalfScreenAndNotShowToast() {
+ val taskBounds = Rect(0, 0, 200, 100)
+ val task = setUpFreeformTask(DEFAULT_DISPLAY, taskBounds).apply {
+ isResizeable = true
+ }
+ val expectedBounds = Rect(
+ STABLE_BOUNDS.left, STABLE_BOUNDS.top, STABLE_BOUNDS.right / 2, STABLE_BOUNDS.bottom
+ )
+
+ controller.handleInstantSnapResizingTask(
+ task, SnapPosition.LEFT, ResizeTrigger.SNAP_LEFT_MENU, motionEvent, desktopWindowDecoration)
+
+ // Assert bounds set to half of the stable bounds
+ val wct = getLatestToggleResizeDesktopTaskWct(taskBounds)
+ assertThat(findBoundsChange(wct, task)).isEqualTo(expectedBounds)
+ verify(mockToast, never()).show()
+ verify(desktopModeEventLogger, times(1)).logTaskResizingStarted(
+ ResizeTrigger.SNAP_LEFT_MENU,
+ motionEvent,
+ task,
+ displayController
+ )
+ verify(desktopModeEventLogger, times(1)).logTaskResizingEnded(
+ ResizeTrigger.SNAP_LEFT_MENU,
+ motionEvent,
+ task,
+ expectedBounds.height(),
+ expectedBounds.width(),
+ displayController
+ )
+ }
+
+ @Test
fun toggleBounds_togglesToCalculatedBoundsForNonResizable() {
val bounds = Rect(0, 0, 200, 100)
val task = setUpFreeformTask(DEFAULT_DISPLAY, bounds).apply {
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/util/TransitionObserverTestUtils.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/util/TransitionObserverTestUtils.kt
new file mode 100644
index 000000000000..3e26ee0deed0
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/util/TransitionObserverTestUtils.kt
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2024 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.wm.shell.util
+
+import android.app.ActivityManager.RunningTaskInfo
+import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
+import android.content.ComponentName
+import android.content.Intent
+import android.os.IBinder
+import android.view.Display.DEFAULT_DISPLAY
+import android.view.SurfaceControl
+import android.view.SurfaceControl.Transaction
+import android.view.WindowManager.TRANSIT_NONE
+import android.view.WindowManager.TransitionFlags
+import android.view.WindowManager.TransitionType
+import android.window.IWindowContainerToken
+import android.window.TransitionInfo
+import android.window.TransitionInfo.Change
+import android.window.TransitionInfo.ChangeFlags
+import android.window.TransitionInfo.FLAG_NONE
+import android.window.TransitionInfo.TransitionMode
+import android.window.WindowContainerToken
+import com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn
+import com.android.wm.shell.transition.Transitions.TransitionObserver
+import org.mockito.Mockito
+import org.mockito.kotlin.mock
+
+@DslMarker
+annotation class TransitionObserverTagMarker
+
+/**
+ * Abstraction for all the phases of the [TransitionObserver] test.
+ */
+interface TransitionObserverTestStep
+
+/**
+ * Encapsulates the values for the [TransitionObserver#onTransitionReady] input parameters.
+ */
+class TransitionObserverTransitionReadyInput(
+ val transition: IBinder,
+ val info: TransitionInfo,
+ val startTransaction: Transaction,
+ val finishTransaction: Transaction
+)
+
+@TransitionObserverTagMarker
+class TransitionObserverTestContext : TransitionObserverTestStep {
+
+ lateinit var transitionObserver: TransitionObserver
+ lateinit var transitionReadyInput: TransitionObserverTransitionReadyInput
+
+ fun inputBuilder(builderInput: TransitionObserverInputBuilder.() -> Unit) {
+ val inputFactoryObj = TransitionObserverInputBuilder()
+ inputFactoryObj.builderInput()
+ transitionReadyInput = inputFactoryObj.build()
+ }
+
+ fun validateOutput(
+ validate:
+ TransitionObserverResultValidation.() -> Unit
+ ) {
+ val validateObj = TransitionObserverResultValidation()
+ invokeObservable()
+ validateObj.validate()
+ }
+
+ fun invokeObservable() {
+ transitionObserver.onTransitionReady(
+ transitionReadyInput.transition,
+ transitionReadyInput.info,
+ transitionReadyInput.startTransaction,
+ transitionReadyInput.finishTransaction
+ )
+ }
+}
+
+/**
+ * Phase responsible for the input parameters for [TransitionObserver].
+ */
+class TransitionObserverInputBuilder : TransitionObserverTestStep {
+
+ private val transition = Mockito.mock(IBinder::class.java)
+ private var transitionInfo: TransitionInfo? = null
+ private val startTransaction = Mockito.mock(Transaction::class.java)
+ private val finishTransaction = Mockito.mock(Transaction::class.java)
+
+ fun buildTransitionInfo(
+ @TransitionType type: Int = TRANSIT_NONE,
+ @TransitionFlags flags: Int = 0
+ ) {
+ transitionInfo = TransitionInfo(type, flags)
+ spyOn(transitionInfo)
+ }
+
+ fun addChange(
+ token: WindowContainerToken? = mock(),
+ leash: SurfaceControl = mock(),
+ @TransitionMode changeMode: Int = TRANSIT_NONE,
+ parentToken: WindowContainerToken? = null,
+ changeTaskInfo: RunningTaskInfo? = null,
+ @ChangeFlags changeFlags: Int = FLAG_NONE
+ ) = addChange(Change(token, leash).apply {
+ mode = changeMode
+ parent = parentToken
+ taskInfo = changeTaskInfo
+ flags = changeFlags
+ })
+
+ fun createChange(
+ token: WindowContainerToken? = mock(),
+ leash: SurfaceControl = mock(),
+ @TransitionMode changeMode: Int = TRANSIT_NONE,
+ parentToken: WindowContainerToken? = null,
+ changeTaskInfo: RunningTaskInfo? = null,
+ @ChangeFlags changeFlags: Int = FLAG_NONE
+ ) = Change(token, leash).apply {
+ mode = changeMode
+ parent = parentToken
+ taskInfo = changeTaskInfo
+ flags = changeFlags
+ }
+
+ fun addChange(change: Change) {
+ transitionInfo!!.addChange(change)
+ }
+
+ fun createTaskInfo(id: Int = 0, windowingMode: Int = WINDOWING_MODE_FREEFORM) =
+ RunningTaskInfo().apply {
+ taskId = id
+ displayId = DEFAULT_DISPLAY
+ configuration.windowConfiguration.windowingMode = windowingMode
+ token = WindowContainerToken(Mockito.mock(IWindowContainerToken::class.java))
+ baseIntent = Intent().apply {
+ component = ComponentName("package", "component.name")
+ }
+ }
+
+ fun build(): TransitionObserverTransitionReadyInput = TransitionObserverTransitionReadyInput(
+ transition = transition,
+ info = transitionInfo!!,
+ startTransaction = startTransaction,
+ finishTransaction = finishTransaction
+ )
+}
+
+/**
+ * Phase responsible for the execution of validation methods.
+ */
+class TransitionObserverResultValidation : TransitionObserverTestStep
+
+/**
+ * Allows to run a test about a specific [TransitionObserver] passing the specific
+ * implementation and input value as parameters for the [TransitionObserver#onTransitionReady]
+ * method.
+ * @param observerFactory The Factory for the TransitionObserver
+ * @param inputFactory The Builder for the onTransitionReady input parameters
+ * @param init The test code itself.
+ */
+fun executeTransitionObserverTest(
+ observerFactory: () -> TransitionObserver,
+ init: TransitionObserverTestContext.() -> Unit
+): TransitionObserverTestContext {
+ val testContext = TransitionObserverTestContext().apply {
+ transitionObserver = observerFactory()
+ }
+ testContext.init()
+ return testContext
+}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
index be664f86e9f5..ef9b30c1c4ca 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt
@@ -63,7 +63,6 @@ import android.view.SurfaceView
import android.view.View
import android.view.ViewRootImpl
import android.view.WindowInsets.Type.statusBars
-import android.widget.Toast
import android.window.WindowContainerTransaction
import android.window.WindowContainerTransaction.HierarchyOp
import androidx.test.filters.SmallTest
@@ -186,7 +185,6 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
@Mock private lateinit var mockGenericLinksParser: AppToWebGenericLinksParser
@Mock private lateinit var mockUserHandle: UserHandle
@Mock private lateinit var mockAssistContentRequester: AssistContentRequester
- @Mock private lateinit var mockToast: Toast
private val bgExecutor = TestShellExecutor()
@Mock private lateinit var mockMultiInstanceHelper: MultiInstanceHelper
@Mock private lateinit var mockTasksLimiter: DesktopTasksLimiter
@@ -226,7 +224,6 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
.strictness(Strictness.LENIENT)
.spyStatic(DesktopModeStatus::class.java)
.spyStatic(DragPositioningCallbackUtility::class.java)
- .spyStatic(Toast::class.java)
.startMocking()
doReturn(true).`when` { DesktopModeStatus.isDesktopModeSupported(Mockito.any()) }
@@ -290,8 +287,6 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
)
.thenReturn(mockTaskPositioner)
- doReturn(mockToast).`when` { Toast.makeText(any(), anyInt(), anyInt()) }
-
// InputChannel cannot be mocked because it passes to InputEventReceiver.
val inputChannels = InputChannel.openInputChannelPair(TAG)
inputChannels.first().dispose()
@@ -640,7 +635,6 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
@Test
fun testOnDecorSnappedLeft_snapResizes() {
- val taskSurfaceCaptor = argumentCaptor<SurfaceControl>()
val onLeftSnapClickListenerCaptor = forClass(Function0::class.java)
as ArgumentCaptor<Function0<Unit>>
val decor = createOpenTaskDecoration(
@@ -648,19 +642,15 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onLeftSnapClickListenerCaptor = onLeftSnapClickListenerCaptor
)
- val currentBounds = decor.mTaskInfo.configuration.windowConfiguration.bounds
onLeftSnapClickListenerCaptor.value.invoke()
- verify(mockDesktopTasksController).snapToHalfScreen(
+ verify(mockDesktopTasksController).handleInstantSnapResizingTask(
eq(decor.mTaskInfo),
- taskSurfaceCaptor.capture(),
- eq(currentBounds),
eq(SnapPosition.LEFT),
eq(ResizeTrigger.SNAP_LEFT_MENU),
eq(null),
eq(decor)
)
- assertEquals(taskSurfaceCaptor.firstValue, decor.mTaskSurface)
}
@Test
@@ -681,7 +671,6 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
@Test
@DisableFlags(Flags.FLAG_DISABLE_NON_RESIZABLE_APP_SNAP_RESIZING)
fun testOnSnapResizeLeft_nonResizable_decorSnappedLeft() {
- val taskSurfaceCaptor = argumentCaptor<SurfaceControl>()
val onLeftSnapClickListenerCaptor = forClass(Function0::class.java)
as ArgumentCaptor<Function0<Unit>>
val decor = createOpenTaskDecoration(
@@ -689,19 +678,15 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onLeftSnapClickListenerCaptor = onLeftSnapClickListenerCaptor
).also { it.mTaskInfo.isResizeable = false }
- val currentBounds = decor.mTaskInfo.configuration.windowConfiguration.bounds
onLeftSnapClickListenerCaptor.value.invoke()
- verify(mockDesktopTasksController).snapToHalfScreen(
+ verify(mockDesktopTasksController).handleInstantSnapResizingTask(
eq(decor.mTaskInfo),
- taskSurfaceCaptor.capture(),
- eq(currentBounds),
eq(SnapPosition.LEFT),
eq(ResizeTrigger.SNAP_LEFT_MENU),
eq(null),
eq(decor),
)
- assertEquals(decor.mTaskSurface, taskSurfaceCaptor.firstValue)
}
@Test
@@ -723,12 +708,10 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
eq(null),
eq(decor),
)
- verify(mockToast).show()
}
@Test
fun testOnDecorSnappedRight_snapResizes() {
- val taskSurfaceCaptor = argumentCaptor<SurfaceControl>()
val onRightSnapClickListenerCaptor = forClass(Function0::class.java)
as ArgumentCaptor<Function0<Unit>>
val decor = createOpenTaskDecoration(
@@ -736,19 +719,15 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onRightSnapClickListenerCaptor = onRightSnapClickListenerCaptor
)
- val currentBounds = decor.mTaskInfo.configuration.windowConfiguration.bounds
onRightSnapClickListenerCaptor.value.invoke()
- verify(mockDesktopTasksController).snapToHalfScreen(
+ verify(mockDesktopTasksController).handleInstantSnapResizingTask(
eq(decor.mTaskInfo),
- taskSurfaceCaptor.capture(),
- eq(currentBounds),
eq(SnapPosition.RIGHT),
eq(ResizeTrigger.SNAP_RIGHT_MENU),
eq(null),
eq(decor),
)
- assertEquals(decor.mTaskSurface, taskSurfaceCaptor.firstValue)
}
@Test
@@ -769,7 +748,6 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
@Test
@DisableFlags(Flags.FLAG_DISABLE_NON_RESIZABLE_APP_SNAP_RESIZING)
fun testOnSnapResizeRight_nonResizable_decorSnappedRight() {
- val taskSurfaceCaptor = argumentCaptor<SurfaceControl>()
val onRightSnapClickListenerCaptor = forClass(Function0::class.java)
as ArgumentCaptor<Function0<Unit>>
val decor = createOpenTaskDecoration(
@@ -777,19 +755,15 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onRightSnapClickListenerCaptor = onRightSnapClickListenerCaptor
).also { it.mTaskInfo.isResizeable = false }
- val currentBounds = decor.mTaskInfo.configuration.windowConfiguration.bounds
onRightSnapClickListenerCaptor.value.invoke()
- verify(mockDesktopTasksController).snapToHalfScreen(
+ verify(mockDesktopTasksController).handleInstantSnapResizingTask(
eq(decor.mTaskInfo),
- taskSurfaceCaptor.capture(),
- eq(currentBounds),
eq(SnapPosition.RIGHT),
eq(ResizeTrigger.SNAP_RIGHT_MENU),
eq(null),
eq(decor),
)
- assertEquals(decor.mTaskSurface, taskSurfaceCaptor.firstValue)
}
@Test
@@ -811,7 +785,6 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
eq(null),
eq(decor),
)
- verify(mockToast).show()
}
@Test
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp
index 7c150862a422..7f5ca44f7ceb 100644
--- a/libs/hwui/SkiaCanvas.cpp
+++ b/libs/hwui/SkiaCanvas.cpp
@@ -622,18 +622,13 @@ bool SkiaCanvas::useGainmapShader(Bitmap& bitmap) {
auto colorSpace = info.colorSpace();
// If we don't have a colorspace, we can't apply a gainmap
if (!colorSpace) return false;
- skcms_TransferFunction tfn;
- colorSpace->transferFn(&tfn);
-
- auto transferType = skcms_TransferFunction_getType(&tfn);
- switch (transferType) {
- case skcms_TFType_HLGish:
- case skcms_TFType_HLGinvish:
- case skcms_TFType_PQish:
- return true;
- case skcms_TFType_Invalid:
- case skcms_TFType_sRGBish:
- return false;
+
+ const float targetRatio = uirenderer::getTargetHdrSdrRatio(colorSpace);
+
+ if (bitmap.gainmap()->info.fBaseImageType == SkGainmapInfo::BaseImageType::kHDR) {
+ return targetRatio < bitmap.gainmap()->info.fDisplayRatioHdr;
+ } else {
+ return targetRatio > bitmap.gainmap()->info.fDisplayRatioSdr;
}
}
diff --git a/libs/hwui/effects/GainmapRenderer.cpp b/libs/hwui/effects/GainmapRenderer.cpp
index eac03609d72f..18b77bc51aca 100644
--- a/libs/hwui/effects/GainmapRenderer.cpp
+++ b/libs/hwui/effects/GainmapRenderer.cpp
@@ -73,7 +73,9 @@ void DrawGainmapBitmap(SkCanvas* c, const sk_sp<const SkImage>& image, const SkR
#ifdef __ANDROID__
auto destColorspace = c->imageInfo().refColorSpace();
float targetSdrHdrRatio = getTargetHdrSdrRatio(destColorspace.get());
- if (targetSdrHdrRatio > 1.f && gainmapImage) {
+ const bool baseImageHdr = gainmapInfo.fBaseImageType == SkGainmapInfo::BaseImageType::kHDR;
+ if (gainmapImage && ((baseImageHdr && targetSdrHdrRatio < gainmapInfo.fDisplayRatioHdr) ||
+ (!baseImageHdr && targetSdrHdrRatio > gainmapInfo.fDisplayRatioSdr))) {
SkPaint gainmapPaint = *paint;
float sX = gainmapImage->width() / (float)image->width();
float sY = gainmapImage->height() / (float)image->height();
@@ -183,7 +185,10 @@ private:
baseImage->colorSpace() ? baseImage->refColorSpace() : SkColorSpace::MakeSRGB();
// Determine the color space in which the gainmap math is to be applied.
- sk_sp<SkColorSpace> gainmapMathColorSpace = baseColorSpace->makeLinearGamma();
+ sk_sp<SkColorSpace> gainmapMathColorSpace =
+ mGainmapInfo.fGainmapMathColorSpace
+ ? mGainmapInfo.fGainmapMathColorSpace->makeLinearGamma()
+ : baseColorSpace->makeLinearGamma();
// Create a color filter to transform from the base image's color space to the color space
// in which the gainmap is to be applied.
@@ -266,6 +271,10 @@ private:
W = 1.f;
}
}
+
+ if (mGainmapInfo.fBaseImageType == SkGainmapInfo::BaseImageType::kHDR) {
+ W -= 1.f;
+ }
mBuilder.uniform("W") = W;
uniforms = mBuilder.uniforms();
}
@@ -317,4 +326,4 @@ sk_sp<SkShader> MakeGainmapShader(const sk_sp<const SkImage>& image,
#endif // __ANDROID__
-} // namespace android::uirenderer \ No newline at end of file
+} // namespace android::uirenderer
diff --git a/libs/input/MouseCursorController.cpp b/libs/input/MouseCursorController.cpp
index d993b8715260..4330f0addaa9 100644
--- a/libs/input/MouseCursorController.cpp
+++ b/libs/input/MouseCursorController.cpp
@@ -28,12 +28,14 @@
#define INDENT " "
#define INDENT2 " "
+namespace android {
+
namespace {
+
// Time to spend fading out the pointer completely.
const nsecs_t POINTER_FADE_DURATION = 500 * 1000000LL; // 500 ms
-} // namespace
-namespace android {
+} // namespace
// --- MouseCursorController ---
@@ -64,17 +66,21 @@ MouseCursorController::~MouseCursorController() {
mLocked.pointerSprite.clear();
}
-void MouseCursorController::move(float deltaX, float deltaY) {
+vec2 MouseCursorController::move(float deltaX, float deltaY) {
#if DEBUG_MOUSE_CURSOR_UPDATES
ALOGD("Move pointer by deltaX=%0.3f, deltaY=%0.3f", deltaX, deltaY);
#endif
if (deltaX == 0.0f && deltaY == 0.0f) {
- return;
+ return {};
}
+ // When transition occurs, the MouseCursorController object may or may not be deleted, depending
+ // if there's another display on the other side of the transition. At this point we still need
+ // to move the cursor to the boundary.
std::scoped_lock lock(mLock);
-
- setPositionLocked(mLocked.pointerX + deltaX, mLocked.pointerY + deltaY);
+ const vec2 pos{mLocked.pointerX + deltaX, mLocked.pointerY + deltaY};
+ setPositionLocked(pos.x, pos.y);
+ return vec2{pos.x - mLocked.pointerX, pos.y - mLocked.pointerY};
}
void MouseCursorController::setPosition(float x, float y) {
@@ -82,22 +88,26 @@ void MouseCursorController::setPosition(float x, float y) {
ALOGD("Set pointer position to x=%0.3f, y=%0.3f", x, y);
#endif
std::scoped_lock lock(mLock);
+
setPositionLocked(x, y);
}
-void MouseCursorController::setPositionLocked(float x, float y) REQUIRES(mLock) {
- const auto& v = mLocked.viewport;
- if (!v.isValid()) return;
-
+FloatRect MouseCursorController::getBoundsLocked() REQUIRES(mLock) {
// The valid bounds for a mouse cursor. Since the right and bottom edges are considered outside
// the display, clip the bounds by one pixel instead of letting the cursor get arbitrarily
// close to the outside edge.
- const FloatRect bounds{
+ return FloatRect{
static_cast<float>(mLocked.viewport.logicalLeft),
static_cast<float>(mLocked.viewport.logicalTop),
static_cast<float>(mLocked.viewport.logicalRight - 1),
static_cast<float>(mLocked.viewport.logicalBottom - 1),
};
+}
+void MouseCursorController::setPositionLocked(float x, float y) REQUIRES(mLock) {
+ const auto& v = mLocked.viewport;
+ if (!v.isValid()) return;
+
+ const FloatRect bounds = getBoundsLocked();
mLocked.pointerX = std::max(bounds.left, std::min(bounds.right, x));
mLocked.pointerY = std::max(bounds.top, std::min(bounds.bottom, y));
diff --git a/libs/input/MouseCursorController.h b/libs/input/MouseCursorController.h
index 12b31a8c531a..10f0d7645105 100644
--- a/libs/input/MouseCursorController.h
+++ b/libs/input/MouseCursorController.h
@@ -20,9 +20,6 @@
#include <gui/DisplayEventReceiver.h>
#include <input/DisplayViewport.h>
#include <input/Input.h>
-#include <utils/BitSet.h>
-#include <utils/Looper.h>
-#include <utils/RefBase.h>
#include <functional>
#include <map>
@@ -43,7 +40,8 @@ public:
MouseCursorController(PointerControllerContext& context);
~MouseCursorController();
- void move(float deltaX, float deltaY);
+ // Move the pointer and return unconsumed delta
+ vec2 move(float deltaX, float deltaY);
void setPosition(float x, float y);
FloatPoint getPosition() const;
ui::LogicalDisplayId getDisplayId() const;
@@ -113,6 +111,7 @@ private:
bool doFadingAnimationLocked(nsecs_t timestamp);
void startAnimationLocked();
+ FloatRect getBoundsLocked();
};
} // namespace android
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp
index 78d7d3a7051b..59397dab592f 100644
--- a/libs/input/PointerController.cpp
+++ b/libs/input/PointerController.cpp
@@ -138,15 +138,18 @@ std::mutex& PointerController::getLock() const {
return mDisplayInfoListener->mLock;
}
-void PointerController::move(float deltaX, float deltaY) {
+vec2 PointerController::move(float deltaX, float deltaY) {
const ui::LogicalDisplayId displayId = mCursorController.getDisplayId();
- vec2 transformed;
+ ui::Transform transform;
{
std::scoped_lock lock(getLock());
- const auto& transform = getTransformForDisplayLocked(displayId);
- transformed = transformWithoutTranslation(transform, {deltaX, deltaY});
+ transform = getTransformForDisplayLocked(displayId);
}
- mCursorController.move(transformed.x, transformed.y);
+
+ vec2 transformed = transformWithoutTranslation(transform, {deltaX, deltaY});
+
+ vec2 unconsumedDelta = mCursorController.move(transformed.x, transformed.y);
+ return transformWithoutTranslation(transform.inverse(), unconsumedDelta);
}
void PointerController::setPosition(float x, float y) {
diff --git a/libs/input/PointerController.h b/libs/input/PointerController.h
index ee8d1211341f..69bef546b788 100644
--- a/libs/input/PointerController.h
+++ b/libs/input/PointerController.h
@@ -51,7 +51,7 @@ public:
~PointerController() override;
- void move(float deltaX, float deltaY) override;
+ vec2 move(float deltaX, float deltaY) override;
void setPosition(float x, float y) override;
FloatPoint getPosition() const override;
ui::LogicalDisplayId getDisplayId() const override;
@@ -165,7 +165,7 @@ public:
~TouchPointerController() override;
- void move(float, float) override {
+ vec2 move(float, float) override {
LOG_ALWAYS_FATAL("Should not be called");
}
void setPosition(float, float) override {
diff --git a/libs/input/tests/PointerController_test.cpp b/libs/input/tests/PointerController_test.cpp
index 5b00fca4d857..80c934a9bd95 100644
--- a/libs/input/tests/PointerController_test.cpp
+++ b/libs/input/tests/PointerController_test.cpp
@@ -40,6 +40,8 @@ enum TestCursorType {
CURSOR_TYPE_CUSTOM = -1,
};
+static constexpr float EPSILON = MotionEvent::ROUNDING_PRECISION;
+
using ::testing::AllOf;
using ::testing::Field;
using ::testing::NiceMock;
@@ -399,6 +401,135 @@ INSTANTIATE_TEST_SUITE_P(PointerControllerSkipScreenshotFlagTest,
testing::Values(PointerControllerInterface::ControllerType::MOUSE,
PointerControllerInterface::ControllerType::STYLUS));
+class MousePointerControllerTest : public PointerControllerTest {
+protected:
+ MousePointerControllerTest() {
+ sp<MockSprite> testPointerSprite(new NiceMock<MockSprite>);
+ EXPECT_CALL(*mSpriteController, createSprite).WillOnce(Return(testPointerSprite));
+
+ // create a mouse pointer controller
+ mPointerController =
+ PointerController::create(mPolicy, mLooper, *mSpriteController,
+ PointerControllerInterface::ControllerType::MOUSE);
+
+ // set display viewport
+ DisplayViewport viewport;
+ viewport.displayId = ui::LogicalDisplayId::DEFAULT;
+ viewport.logicalRight = 5;
+ viewport.logicalBottom = 5;
+ viewport.physicalRight = 5;
+ viewport.physicalBottom = 5;
+ viewport.deviceWidth = 5;
+ viewport.deviceHeight = 5;
+ mPointerController->setDisplayViewport(viewport);
+ }
+};
+
+struct MousePointerControllerTestParam {
+ vec2 startPosition;
+ vec2 delta;
+ vec2 endPosition;
+ vec2 unconsumedDelta;
+};
+
+class PointerControllerViewportTransitionTest
+ : public MousePointerControllerTest,
+ public testing::WithParamInterface<MousePointerControllerTestParam> {};
+
+TEST_P(PointerControllerViewportTransitionTest, testPointerViewportTransition) {
+ const auto& params = GetParam();
+
+ mPointerController->setPosition(params.startPosition.x, params.startPosition.y);
+ auto unconsumedDelta = mPointerController->move(params.delta.x, params.delta.y);
+
+ auto position = mPointerController->getPosition();
+ EXPECT_NEAR(position.x, params.endPosition.x, EPSILON);
+ EXPECT_NEAR(position.y, params.endPosition.y, EPSILON);
+ EXPECT_NEAR(unconsumedDelta.x, params.unconsumedDelta.x, EPSILON);
+ EXPECT_NEAR(unconsumedDelta.y, params.unconsumedDelta.y, EPSILON);
+}
+
+INSTANTIATE_TEST_SUITE_P(PointerControllerViewportTransitionTest,
+ PointerControllerViewportTransitionTest,
+ testing::Values(
+ // no transition
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {2.0f, 2.0f},
+ {4.0f, 4.0f},
+ {0.0f, 0.0f}},
+ // right boundary
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {3.0f, 0.0f},
+ {4.0f, 2.0f},
+ {1.0f, 0.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {3.0f, -1.0f},
+ {4.0f, 1.0f},
+ {1.0f, 0.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {3.0f, 1.0f},
+ {4.0f, 3.0f},
+ {1.0f, 0.0f}},
+ // left boundary
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {-3.0f, 0.0f},
+ {0.0f, 2.0f},
+ {-1.0f, 0.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {-3.0f, -1.0f},
+ {0.0f, 1.0f},
+ {-1.0f, 0.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {-3.0f, 1.0f},
+ {0.0f, 3.0f},
+ {-1.0f, 0.0f}},
+ // bottom boundary
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {0.0f, 3.0f},
+ {2.0f, 4.0f},
+ {0.0f, 1.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {-1.0f, 3.0f},
+ {1.0f, 4.0f},
+ {0.0f, 1.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {1.0f, 3.0f},
+ {3.0f, 4.0f},
+ {0.0f, 1.0f}},
+ // top boundary
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {0.0f, -3.0f},
+ {2.0f, 0.0f},
+ {0.0f, -1.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {-1.0f, -3.0f},
+ {1.0f, 0.0f},
+ {0.0f, -1.0f}},
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {1.0f, -3.0f},
+ {3.0f, 0.0f},
+ {0.0f, -1.0f}},
+ // top-left corner
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {-3.0f, -3.0f},
+ {0.0f, 0.0f},
+ {-1.0f, -1.0f}},
+ // top-right corner
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {3.0f, -3.0f},
+ {4.0f, 0.0f},
+ {1.0f, -1.0f}},
+ // bottom-right corner
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {3.0f, 3.0f},
+ {4.0f, 4.0f},
+ {1.0f, 1.0f}},
+ // bottom-left corner
+ MousePointerControllerTestParam{{2.0f, 2.0f},
+ {-3.0f, 3.0f},
+ {0.0f, 4.0f},
+ {-1.0f, 1.0f}}));
+
class PointerControllerWindowInfoListenerTest : public Test {};
TEST_F(PointerControllerWindowInfoListenerTest,
diff --git a/media/java/android/media/AudioDeviceInfo.java b/media/java/android/media/AudioDeviceInfo.java
index 2da8eecedc4d..b41f40f412d2 100644
--- a/media/java/android/media/AudioDeviceInfo.java
+++ b/media/java/android/media/AudioDeviceInfo.java
@@ -17,6 +17,7 @@
package android.media;
import static android.media.audio.Flags.FLAG_ENABLE_MULTICHANNEL_GROUP_DEVICE;
+import static android.media.audio.Flags.FLAG_SPEAKER_LAYOUT_API;
import android.Manifest;
import android.annotation.FlaggedApi;
@@ -548,6 +549,19 @@ public final class AudioDeviceInfo {
}
/**
+ * @return A ChannelMask representing the physical output speaker layout of the device.
+ *
+ * The layout channel mask only indicates which speaker channels are present, the
+ * physical layout of the speakers should be informed by a standard for multi-channel
+ * sound playback systems, such as ITU-R BS.2051.
+ * @see AudioFormat
+ */
+ @FlaggedApi(FLAG_SPEAKER_LAYOUT_API)
+ public int getSpeakerLayoutChannelMask() {
+ return mPort.speakerLayoutChannelMask();
+ }
+
+ /**
* @return An array of audio encodings (e.g. {@link AudioFormat#ENCODING_PCM_16BIT},
* {@link AudioFormat#ENCODING_PCM_FLOAT}) supported by the audio device.
* <code>ENCODING_PCM_FLOAT</code> indicates the device supports more
diff --git a/media/java/android/media/AudioDevicePort.java b/media/java/android/media/AudioDevicePort.java
index ab5c54b5cd7e..f5913c763b82 100644
--- a/media/java/android/media/AudioDevicePort.java
+++ b/media/java/android/media/AudioDevicePort.java
@@ -60,8 +60,27 @@ public class AudioDevicePort extends AudioPort {
/* encapsulationMetadataTypes= */ null);
}
+ /** @hide */
+ // TODO: b/316864909 - Remove this method once there's a way to fake audio device ports further
+ // down the stack.
+ @VisibleForTesting
+ public static AudioDevicePort createForTesting(int speakerLayoutChannelMask) {
+ return new AudioDevicePort(
+ new AudioHandle(/* id= */ 0),
+ /* name= */ "testAudioDevicePort",
+ /* profiles= */ null,
+ /* gains= */ null,
+ /* type= */ AudioManager.DEVICE_OUT_SPEAKER,
+ /* address= */ "testAddress",
+ /* speakerLayoutChannelMask= */ speakerLayoutChannelMask,
+ /* encapsulationModes= */ null,
+ /* encapsulationMetadataTypes= */ null,
+ /* descriptors= */ null);
+ }
+
private final int mType;
private final String mAddress;
+ private final int mSpeakerLayoutChannelMask;
private final int[] mEncapsulationModes;
private final int[] mEncapsulationMetadataTypes;
@@ -76,12 +95,20 @@ public class AudioDevicePort extends AudioPort {
deviceName, samplingRates, channelMasks, channelIndexMasks, formats, gains);
mType = type;
mAddress = address;
+ mSpeakerLayoutChannelMask = AudioFormat.CHANNEL_INVALID;
mEncapsulationModes = encapsulationModes;
mEncapsulationMetadataTypes = encapsulationMetadataTypes;
}
- AudioDevicePort(AudioHandle handle, String deviceName, List<AudioProfile> profiles,
- AudioGain[] gains, int type, String address, int[] encapsulationModes,
+ AudioDevicePort(
+ AudioHandle handle,
+ String deviceName,
+ List<AudioProfile> profiles,
+ AudioGain[] gains,
+ int type,
+ String address,
+ int speakerLayoutChannelMask,
+ int[] encapsulationModes,
@AudioTrack.EncapsulationMetadataType int[] encapsulationMetadataTypes,
List<AudioDescriptor> descriptors) {
super(handle,
@@ -89,6 +116,7 @@ public class AudioDevicePort extends AudioPort {
deviceName, profiles, gains, descriptors);
mType = type;
mAddress = address;
+ mSpeakerLayoutChannelMask = speakerLayoutChannelMask;
mEncapsulationModes = encapsulationModes;
mEncapsulationMetadataTypes = encapsulationMetadataTypes;
}
@@ -119,6 +147,16 @@ public class AudioDevicePort extends AudioPort {
return mAddress;
}
+ /** Get the channel mask representing the physical output speaker layout of the device.
+ *
+ * The layout channel mask only indicates which speaker channels are present, the
+ * physical layout of the speakers should be informed by a standard for multi-channel
+ * sound playback systems, such as ITU-R BS.2051.
+ */
+ public int speakerLayoutChannelMask() {
+ return mSpeakerLayoutChannelMask;
+ }
+
/**
* Get supported encapsulation modes.
*/
diff --git a/media/java/android/media/AudioPlaybackConfiguration.java b/media/java/android/media/AudioPlaybackConfiguration.java
index da50f2cd86c4..c085b8985783 100644
--- a/media/java/android/media/AudioPlaybackConfiguration.java
+++ b/media/java/android/media/AudioPlaybackConfiguration.java
@@ -41,6 +41,7 @@ import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@@ -59,6 +60,8 @@ public final class AudioPlaybackConfiguration implements Parcelable {
public static final int PLAYER_UPID_INVALID = -1;
/** @hide */
public static final int PLAYER_DEVICEID_INVALID = 0;
+ /** @hide */
+ public static final int[] PLAYER_DEVICEIDS_INVALID = new int[0];
// information about the implementation
/**
@@ -335,7 +338,7 @@ public final class AudioPlaybackConfiguration implements Parcelable {
private final Object mUpdateablePropLock = new Object();
@GuardedBy("mUpdateablePropLock")
- private int mDeviceId;
+ private @NonNull int[] mDeviceIds = AudioPlaybackConfiguration.PLAYER_DEVICEIDS_INVALID;
@GuardedBy("mUpdateablePropLock")
private int mSessionId;
@GuardedBy("mUpdateablePropLock")
@@ -364,7 +367,7 @@ public final class AudioPlaybackConfiguration implements Parcelable {
mClientUid = uid;
mClientPid = pid;
mMutedState = 0;
- mDeviceId = PLAYER_DEVICEID_INVALID;
+ mDeviceIds = AudioPlaybackConfiguration.PLAYER_DEVICEIDS_INVALID;
mPlayerState = PLAYER_STATE_IDLE;
mPlayerAttr = pic.mAttributes;
if ((sPlayerDeathMonitor != null) && (pic.mIPlayer != null)) {
@@ -388,10 +391,11 @@ public final class AudioPlaybackConfiguration implements Parcelable {
}
// sets the fields that are updateable and require synchronization
- private void setUpdateableFields(int deviceId, int sessionId, int mutedState, FormatInfo format)
+ private void setUpdateableFields(int[] deviceIds, int sessionId, int mutedState,
+ FormatInfo format)
{
synchronized (mUpdateablePropLock) {
- mDeviceId = deviceId;
+ mDeviceIds = deviceIds;
mSessionId = sessionId;
mMutedState = mutedState;
mFormatInfo = format;
@@ -427,7 +431,7 @@ public final class AudioPlaybackConfiguration implements Parcelable {
anonymCopy.mClientPid = PLAYER_UPID_INVALID;
anonymCopy.mIPlayerShell = null;
anonymCopy.setUpdateableFields(
- /*deviceId*/ PLAYER_DEVICEID_INVALID,
+ /*deviceIds*/ new int[0],
/*sessionId*/ AudioSystem.AUDIO_SESSION_ALLOCATE,
/*mutedState*/ 0,
FormatInfo.DEFAULT);
@@ -471,14 +475,14 @@ public final class AudioPlaybackConfiguration implements Parcelable {
@Deprecated
@FlaggedApi(FLAG_ROUTED_DEVICE_IDS)
public @Nullable AudioDeviceInfo getAudioDeviceInfo() {
- final int deviceId;
+ final int[] deviceIds;
synchronized (mUpdateablePropLock) {
- deviceId = mDeviceId;
+ deviceIds = mDeviceIds;
}
- if (deviceId == PLAYER_DEVICEID_INVALID) {
+ if (deviceIds.length == 0) {
return null;
}
- return AudioManager.getDeviceForPortId(deviceId, AudioManager.GET_DEVICES_OUTPUTS);
+ return AudioManager.getDeviceForPortId(deviceIds[0], AudioManager.GET_DEVICES_OUTPUTS);
}
/**
@@ -491,9 +495,17 @@ public final class AudioPlaybackConfiguration implements Parcelable {
@RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
public @NonNull List<AudioDeviceInfo> getAudioDeviceInfos() {
List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
- AudioDeviceInfo audioDeviceInfo = getAudioDeviceInfo();
- if (audioDeviceInfo != null) {
- audioDeviceInfos.add(audioDeviceInfo);
+ final int[] deviceIds;
+ synchronized (mUpdateablePropLock) {
+ deviceIds = mDeviceIds;
+ }
+
+ for (int i = 0; i < deviceIds.length; i++) {
+ AudioDeviceInfo audioDeviceInfo = AudioManager.getDeviceForPortId(deviceIds[i],
+ AudioManager.GET_DEVICES_OUTPUTS);
+ if (audioDeviceInfo != null) {
+ audioDeviceInfos.add(audioDeviceInfo);
+ }
}
return audioDeviceInfos;
}
@@ -701,15 +713,15 @@ public final class AudioPlaybackConfiguration implements Parcelable {
* @hide
* Handle a player state change
* @param event
- * @param deviceId active device id or {@Code PLAYER_DEVICEID_INVALID}
- * <br>Note device id is valid for {@code PLAYER_UPDATE_DEVICE_ID} or
- * <br>{@code PLAYER_STATE_STARTED} events, as the device id will be reset to none when
- * <br>pausing or stopping playback. It will be set to active device when playback starts or
+ * @param deviceIds an array of device ids. This can be empty.
+ * <br>Note device ids are non-empty for {@code PLAYER_UPDATE_DEVICE_ID} or
+ * <br>{@code PLAYER_STATE_STARTED} events, as the device ids will be emptied when pausing
+ * <br>or stopping playback. It will be set to active devices when playback starts or
* <br>it will be changed when PLAYER_UPDATE_DEVICE_ID is sent. The latter can happen if the
- * <br>device changes in the middle of playback.
+ * <br>devices change in the middle of playback.
* @return true if the state changed, false otherwise
*/
- public boolean handleStateEvent(int event, int deviceId) {
+ public boolean handleStateEvent(int event, int[] deviceIds) {
boolean changed = false;
synchronized (mUpdateablePropLock) {
@@ -720,8 +732,8 @@ public final class AudioPlaybackConfiguration implements Parcelable {
}
if (event == PLAYER_STATE_STARTED || event == PLAYER_UPDATE_DEVICE_ID) {
- changed = changed || (mDeviceId != deviceId);
- mDeviceId = deviceId;
+ changed = changed || !Arrays.equals(mDeviceIds, deviceIds);
+ mDeviceIds = deviceIds;
}
if (changed && (event == PLAYER_STATE_RELEASED) && (mIPlayerShell != null)) {
@@ -801,8 +813,8 @@ public final class AudioPlaybackConfiguration implements Parcelable {
@Override
public int hashCode() {
synchronized (mUpdateablePropLock) {
- return Objects.hash(mPlayerIId, mDeviceId, mMutedState, mPlayerType, mClientUid,
- mClientPid, mSessionId);
+ return Objects.hash(mPlayerIId, Arrays.toString(mDeviceIds), mMutedState, mPlayerType,
+ mClientUid, mClientPid, mSessionId);
}
}
@@ -815,7 +827,7 @@ public final class AudioPlaybackConfiguration implements Parcelable {
public void writeToParcel(Parcel dest, int flags) {
synchronized (mUpdateablePropLock) {
dest.writeInt(mPlayerIId);
- dest.writeInt(mDeviceId);
+ dest.writeIntArray(mDeviceIds);
dest.writeInt(mMutedState);
dest.writeInt(mPlayerType);
dest.writeInt(mClientUid);
@@ -834,7 +846,10 @@ public final class AudioPlaybackConfiguration implements Parcelable {
private AudioPlaybackConfiguration(Parcel in) {
mPlayerIId = in.readInt();
- mDeviceId = in.readInt();
+ mDeviceIds = new int[in.readInt()];
+ for (int i = 0; i < mDeviceIds.length; i++) {
+ mDeviceIds[i] = in.readInt();
+ }
mMutedState = in.readInt();
mPlayerType = in.readInt();
mClientUid = in.readInt();
@@ -855,7 +870,7 @@ public final class AudioPlaybackConfiguration implements Parcelable {
AudioPlaybackConfiguration that = (AudioPlaybackConfiguration) o;
return ((mPlayerIId == that.mPlayerIId)
- && (mDeviceId == that.mDeviceId)
+ && Arrays.equals(mDeviceIds, that.mDeviceIds)
&& (mMutedState == that.mMutedState)
&& (mPlayerType == that.mPlayerType)
&& (mClientUid == that.mClientUid)
@@ -868,7 +883,7 @@ public final class AudioPlaybackConfiguration implements Parcelable {
StringBuilder apcToString = new StringBuilder();
synchronized (mUpdateablePropLock) {
apcToString.append("AudioPlaybackConfiguration piid:").append(mPlayerIId).append(
- " deviceId:").append(mDeviceId).append(" type:").append(
+ " deviceIds:").append(Arrays.toString(mDeviceIds)).append(" type:").append(
toLogFriendlyPlayerType(mPlayerType)).append(" u/pid:").append(
mClientUid).append(
"/").append(mClientPid).append(" state:").append(
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index 939494152116..cacd59f42ec4 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -1908,17 +1908,37 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
}
/**
+ * Internal API of getRoutedDevices(). We should not call flag APIs internally.
+ */
+ private @NonNull List<AudioDeviceInfo> getRoutedDevicesInternal() {
+ List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
+ final int[] deviceIds = native_getRoutedDeviceIds();
+ if (deviceIds == null || deviceIds.length == 0) {
+ return audioDeviceInfos;
+ }
+
+ for (int i = 0; i < deviceIds.length; i++) {
+ AudioDeviceInfo audioDeviceInfo = AudioManager.getDeviceForPortId(deviceIds[i],
+ AudioManager.GET_DEVICES_INPUTS);
+ if (audioDeviceInfo != null) {
+ audioDeviceInfos.add(audioDeviceInfo);
+ }
+ }
+ return audioDeviceInfos;
+ }
+
+ /**
* Returns an {@link AudioDeviceInfo} identifying the current routing of this AudioRecord.
* Note: The query is only valid if the AudioRecord is currently recording. If it is not,
* <code>getRoutedDevice()</code> will return null.
*/
@Override
public AudioDeviceInfo getRoutedDevice() {
- int deviceId = native_getRoutedDeviceId();
- if (deviceId == 0) {
+ final List<AudioDeviceInfo> audioDeviceInfos = getRoutedDevicesInternal();
+ if (audioDeviceInfos.isEmpty()) {
return null;
}
- return AudioManager.getDeviceForPortId(deviceId, AudioManager.GET_DEVICES_INPUTS);
+ return audioDeviceInfos.get(0);
}
/**
@@ -1930,12 +1950,7 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
@Override
@FlaggedApi(FLAG_ROUTED_DEVICE_IDS)
public @NonNull List<AudioDeviceInfo> getRoutedDevices() {
- List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
- AudioDeviceInfo audioDeviceInfo = getRoutedDevice();
- if (audioDeviceInfo != null) {
- audioDeviceInfos.add(audioDeviceInfo);
- }
- return audioDeviceInfos;
+ return getRoutedDevicesInternal();
}
/**
@@ -2513,7 +2528,7 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
int sampleRateInHz, int channelCount, int audioFormat);
private native final boolean native_setInputDevice(int deviceId);
- private native final int native_getRoutedDeviceId();
+ private native int[] native_getRoutedDeviceIds();
private native final void native_enableDeviceCallback();
private native final void native_disableDeviceCallback();
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 93a183188793..a5d9adb5cadc 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -3023,7 +3023,7 @@ public class AudioTrack extends PlayerBase
}
}
synchronized(mPlayStateLock) {
- baseStart(0); // unknown device at this point
+ baseStart(new int[0]); // unknown device at this point
native_start();
// FIXME see b/179218630
//baseStart(native_getRoutedDeviceId());
@@ -3784,6 +3784,26 @@ public class AudioTrack extends PlayerBase
}
/**
+ * Internal API of getRoutedDevices(). We should not call flag APIs internally.
+ */
+ private @NonNull List<AudioDeviceInfo> getRoutedDevicesInternal() {
+ List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
+ final int[] deviceIds = native_getRoutedDeviceIds();
+ if (deviceIds == null || deviceIds.length == 0) {
+ return audioDeviceInfos;
+ }
+
+ for (int i = 0; i < deviceIds.length; i++) {
+ AudioDeviceInfo audioDeviceInfo = AudioManager.getDeviceForPortId(deviceIds[i],
+ AudioManager.GET_DEVICES_OUTPUTS);
+ if (audioDeviceInfo != null) {
+ audioDeviceInfos.add(audioDeviceInfo);
+ }
+ }
+ return audioDeviceInfos;
+ }
+
+ /**
* Returns an {@link AudioDeviceInfo} identifying the current routing of this AudioTrack.
* Note: The query is only valid if the AudioTrack is currently playing. If it is not,
* <code>getRoutedDevice()</code> will return null.
@@ -3792,11 +3812,11 @@ public class AudioTrack extends PlayerBase
*/
@Override
public AudioDeviceInfo getRoutedDevice() {
- int deviceId = native_getRoutedDeviceId();
- if (deviceId == 0) {
+ final List<AudioDeviceInfo> audioDeviceInfos = getRoutedDevicesInternal();
+ if (audioDeviceInfos.isEmpty()) {
return null;
}
- return AudioManager.getDeviceForPortId(deviceId, AudioManager.GET_DEVICES_OUTPUTS);
+ return audioDeviceInfos.get(0);
}
/**
@@ -3808,12 +3828,7 @@ public class AudioTrack extends PlayerBase
@Override
@FlaggedApi(FLAG_ROUTED_DEVICE_IDS)
public @NonNull List<AudioDeviceInfo> getRoutedDevices() {
- List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
- AudioDeviceInfo audioDeviceInfo = getRoutedDevice();
- if (audioDeviceInfo != null) {
- audioDeviceInfos.add(audioDeviceInfo);
- }
- return audioDeviceInfos;
+ return getRoutedDevicesInternal();
}
private void tryToDisableNativeRoutingCallback() {
@@ -3973,7 +3988,7 @@ public class AudioTrack extends PlayerBase
*/
private void broadcastRoutingChange() {
AudioManager.resetAudioPortGeneration();
- baseUpdateDeviceId(getRoutedDevice());
+ baseUpdateDeviceIds(getRoutedDevicesInternal());
synchronized (mRoutingChangeListeners) {
for (NativeRoutingEventHandlerDelegate delegate : mRoutingChangeListeners.values()) {
delegate.notifyClient();
@@ -4530,7 +4545,7 @@ public class AudioTrack extends PlayerBase
private native final int native_setAuxEffectSendLevel(float level);
private native final boolean native_setOutputDevice(int deviceId);
- private native final int native_getRoutedDeviceId();
+ private native int[] native_getRoutedDeviceIds();
private native final void native_enableDeviceCallback();
private native final void native_disableDeviceCallback();
diff --git a/media/java/android/media/HwAudioSource.java b/media/java/android/media/HwAudioSource.java
index 167ab6535843..68a3aa7eb834 100644
--- a/media/java/android/media/HwAudioSource.java
+++ b/media/java/android/media/HwAudioSource.java
@@ -145,7 +145,14 @@ public class HwAudioSource extends PlayerBase {
mAudioAttributes);
if (isPlaying()) {
// FIXME: b/174876389 clean up device id reporting
- baseStart(getDeviceId());
+ // Set as deviceIds empty and create an array with element if device id is valid.
+ int[] deviceIds = AudioPlaybackConfiguration.PLAYER_DEVICEIDS_INVALID;
+ int deviceId = getDeviceId();
+ if (deviceId != 0) {
+ deviceIds = new int[1];
+ deviceIds[0] = deviceId;
+ }
+ baseStart(deviceIds);
}
}
diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl
index 9fd3f5beb25c..08b0dd3fb11c 100644
--- a/media/java/android/media/IAudioService.aidl
+++ b/media/java/android/media/IAudioService.aidl
@@ -87,7 +87,7 @@ interface IAudioService {
oneway void playerAttributes(in int piid, in AudioAttributes attr);
- oneway void playerEvent(in int piid, in int event, in int eventId);
+ oneway void playerEvent(in int piid, in int event, in int[] eventId);
oneway void releasePlayer(in int piid);
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 96edd63a9b12..782db358bf9f 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -1876,6 +1876,8 @@ public final class MediaCodecInfo {
* Codecs with this security model is not included in
* {@link MediaCodecList#REGULAR_CODECS}, but included in
* {@link MediaCodecList#ALL_CODECS}.
+ *
+ * @hide
*/
@FlaggedApi(FLAG_IN_PROCESS_SW_AUDIO_CODEC)
public static final int SECURITY_MODEL_TRUSTED_CONTENT_ONLY = 2;
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index bd65b2ecb76a..bc09aee9ac11 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -1748,6 +1748,7 @@ public final class MediaFormat {
(1 << MediaCodecInfo.SECURITY_MODEL_MEMORY_SAFE);
/**
* Flag for {@link MediaCodecInfo#SECURITY_MODEL_TRUSTED_CONTENT_ONLY}.
+ * @hide
*/
@FlaggedApi(FLAG_IN_PROCESS_SW_AUDIO_CODEC)
public static final int FLAG_SECURITY_MODEL_TRUSTED_CONTENT_ONLY =
@@ -1759,8 +1760,7 @@ public final class MediaFormat {
* The associated value is a flag of the following values:
* {@link FLAG_SECURITY_MODEL_SANDBOXED},
* {@link FLAG_SECURITY_MODEL_MEMORY_SAFE},
- * {@link FLAG_SECURITY_MODEL_TRUSTED_CONTENT_ONLY}. The default value is
- * {@link FLAG_SECURITY_MODEL_SANDBOXED}.
+ * The default value is {@link FLAG_SECURITY_MODEL_SANDBOXED}.
* <p>
* When passed to {@link MediaCodecList#findDecoderForFormat} or
* {@link MediaCodecList#findEncoderForFormat}, MediaCodecList filters
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 158bc7fcd482..f1c2a7aec903 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -1415,7 +1415,7 @@ public class MediaPlayer extends PlayerBase
}
private void startImpl() {
- baseStart(0); // unknown device at this point
+ baseStart(new int[0]); // unknown device at this point
stayAwake(true);
tryToEnableNativeRoutingCallback();
_start();
@@ -1541,6 +1541,26 @@ public class MediaPlayer extends PlayerBase
}
/**
+ * Internal API of getRoutedDevices(). We should not call flag APIs internally.
+ */
+ private @NonNull List<AudioDeviceInfo> getRoutedDevicesInternal() {
+ List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
+ final int[] deviceIds = native_getRoutedDeviceIds();
+ if (deviceIds == null || deviceIds.length == 0) {
+ return audioDeviceInfos;
+ }
+
+ for (int i = 0; i < deviceIds.length; i++) {
+ AudioDeviceInfo audioDeviceInfo = AudioManager.getDeviceForPortId(deviceIds[i],
+ AudioManager.GET_DEVICES_OUTPUTS);
+ if (audioDeviceInfo != null) {
+ audioDeviceInfos.add(audioDeviceInfo);
+ }
+ }
+ return audioDeviceInfos;
+ }
+
+ /**
* Returns an {@link AudioDeviceInfo} identifying the current routing of this MediaPlayer
* Note: The query is only valid if the MediaPlayer is currently playing.
* If the player is not playing, the returned device can be null or correspond to previously
@@ -1550,11 +1570,11 @@ public class MediaPlayer extends PlayerBase
*/
@Override
public AudioDeviceInfo getRoutedDevice() {
- int deviceId = native_getRoutedDeviceId();
- if (deviceId == 0) {
+ final List<AudioDeviceInfo> audioDeviceInfos = getRoutedDevicesInternal();
+ if (audioDeviceInfos.isEmpty()) {
return null;
}
- return AudioManager.getDeviceForPortId(deviceId, AudioManager.GET_DEVICES_OUTPUTS);
+ return audioDeviceInfos.get(0);
}
/**
@@ -1567,12 +1587,7 @@ public class MediaPlayer extends PlayerBase
@Override
@FlaggedApi(FLAG_ROUTED_DEVICE_IDS)
public @NonNull List<AudioDeviceInfo> getRoutedDevices() {
- List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
- AudioDeviceInfo audioDeviceInfo = getRoutedDevice();
- if (audioDeviceInfo != null) {
- audioDeviceInfos.add(audioDeviceInfo);
- }
- return audioDeviceInfos;
+ return getRoutedDevicesInternal();
}
/**
@@ -1584,7 +1599,7 @@ public class MediaPlayer extends PlayerBase
// Prevent the case where an event is triggered by registering a routing change
// listener via the media player.
if (mEnableSelfRoutingMonitor) {
- baseUpdateDeviceId(getRoutedDevice());
+ baseUpdateDeviceIds(getRoutedDevicesInternal());
}
for (NativeRoutingEventHandlerDelegate delegate
: mRoutingChangeListeners.values()) {
@@ -1694,7 +1709,7 @@ public class MediaPlayer extends PlayerBase
}
private native final boolean native_setOutputDevice(int deviceId);
- private native final int native_getRoutedDeviceId();
+ private native int[] native_getRoutedDeviceIds();
private native final void native_enableDeviceCallback(boolean enabled);
/**
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index f75bcf3c437d..7af78b81cda5 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -1684,6 +1684,26 @@ public class MediaRecorder implements AudioRouting,
}
/**
+ * Internal API of getRoutedDevices(). We should not call flag APIs internally.
+ */
+ private @NonNull List<AudioDeviceInfo> getRoutedDevicesInternal() {
+ List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
+ final int[] deviceIds = native_getRoutedDeviceIds();
+ if (deviceIds == null || deviceIds.length == 0) {
+ return audioDeviceInfos;
+ }
+
+ for (int i = 0; i < deviceIds.length; i++) {
+ AudioDeviceInfo audioDeviceInfo = AudioManager.getDeviceForPortId(deviceIds[i],
+ AudioManager.GET_DEVICES_INPUTS);
+ if (audioDeviceInfo != null) {
+ audioDeviceInfos.add(audioDeviceInfo);
+ }
+ }
+ return audioDeviceInfos;
+ }
+
+ /**
* Returns an {@link AudioDeviceInfo} identifying the current routing of this MediaRecorder
* Note: The query is only valid if the MediaRecorder is currently recording.
* If the recorder is not recording, the returned device can be null or correspond to previously
@@ -1691,11 +1711,11 @@ public class MediaRecorder implements AudioRouting,
*/
@Override
public AudioDeviceInfo getRoutedDevice() {
- int deviceId = native_getRoutedDeviceId();
- if (deviceId == 0) {
+ final List<AudioDeviceInfo> audioDeviceInfos = getRoutedDevicesInternal();
+ if (audioDeviceInfos.isEmpty()) {
return null;
}
- return AudioManager.getDeviceForPortId(deviceId, AudioManager.GET_DEVICES_INPUTS);
+ return audioDeviceInfos.get(0);
}
/**
@@ -1708,12 +1728,7 @@ public class MediaRecorder implements AudioRouting,
@Override
@FlaggedApi(FLAG_ROUTED_DEVICE_IDS)
public @NonNull List<AudioDeviceInfo> getRoutedDevices() {
- List<AudioDeviceInfo> audioDeviceInfos = new ArrayList<AudioDeviceInfo>();
- AudioDeviceInfo audioDeviceInfo = getRoutedDevice();
- if (audioDeviceInfo != null) {
- audioDeviceInfos.add(audioDeviceInfo);
- }
- return audioDeviceInfos;
+ return getRoutedDevicesInternal();
}
/*
@@ -1773,7 +1788,7 @@ public class MediaRecorder implements AudioRouting,
}
private native final boolean native_setInputDevice(int deviceId);
- private native final int native_getRoutedDeviceId();
+ private native int[] native_getRoutedDeviceIds();
private native final void native_enableDeviceCallback(boolean enabled);
//--------------------------------------------------------------------------
diff --git a/media/java/android/media/PlayerBase.java b/media/java/android/media/PlayerBase.java
index 3f44b09124e4..dbf8338ac99f 100644
--- a/media/java/android/media/PlayerBase.java
+++ b/media/java/android/media/PlayerBase.java
@@ -39,6 +39,8 @@ import com.android.internal.app.IAppOpsCallback;
import com.android.internal.app.IAppOpsService;
import java.lang.ref.WeakReference;
+import java.util.Arrays;
+import java.util.List;
import java.util.Objects;
/**
@@ -91,7 +93,7 @@ public abstract class PlayerBase {
@GuardedBy("mLock")
private float mVolMultiplier = 1.0f;
@GuardedBy("mLock")
- private int mDeviceId;
+ private @NonNull int[] mDeviceIds = AudioPlaybackConfiguration.PLAYER_DEVICEIDS_INVALID;
/**
* Constructor. Must be given audio attributes, as they are required for AppOps.
@@ -158,35 +160,36 @@ public abstract class PlayerBase {
}
}
- void baseUpdateDeviceId(@Nullable AudioDeviceInfo deviceInfo) {
- int deviceId = 0;
- if (deviceInfo != null) {
- deviceId = deviceInfo.getId();
+ void baseUpdateDeviceIds(@NonNull List<AudioDeviceInfo> deviceInfos) {
+ int[] deviceIds = new int[deviceInfos.size()];
+ for (int i = 0; i < deviceInfos.size(); i++) {
+ deviceIds[i] = deviceInfos.get(i).getId();
}
+
int piid;
synchronized (mLock) {
piid = mPlayerIId;
- mDeviceId = deviceId;
+ mDeviceIds = deviceIds;
}
try {
getService().playerEvent(piid,
- AudioPlaybackConfiguration.PLAYER_UPDATE_DEVICE_ID, deviceId);
+ AudioPlaybackConfiguration.PLAYER_UPDATE_DEVICE_ID, deviceIds);
} catch (RemoteException e) {
Log.e(TAG, "Error talking to audio service, "
- + deviceId
+ + Arrays.toString(deviceIds)
+ " device id will not be tracked for piid=" + piid, e);
}
}
- private void updateState(int state, int deviceId) {
+ private void updateState(int state, @NonNull int[] deviceIds) {
final int piid;
synchronized (mLock) {
mState = state;
piid = mPlayerIId;
- mDeviceId = deviceId;
+ mDeviceIds = deviceIds;
}
try {
- getService().playerEvent(piid, state, deviceId);
+ getService().playerEvent(piid, state, deviceIds);
} catch (RemoteException e) {
Log.e(TAG, "Error talking to audio service, "
+ AudioPlaybackConfiguration.toLogFriendlyPlayerState(state)
@@ -194,11 +197,12 @@ public abstract class PlayerBase {
}
}
- void baseStart(int deviceId) {
+ void baseStart(@NonNull int[] deviceIds) {
if (DEBUG) {
- Log.v(TAG, "baseStart() piid=" + mPlayerIId + " deviceId=" + deviceId);
+ Log.v(TAG, "baseStart() piid=" + mPlayerIId + " deviceId="
+ + Arrays.toString(deviceIds));
}
- updateState(AudioPlaybackConfiguration.PLAYER_STATE_STARTED, deviceId);
+ updateState(AudioPlaybackConfiguration.PLAYER_STATE_STARTED, deviceIds);
}
void baseSetStartDelayMs(int delayMs) {
@@ -215,12 +219,12 @@ public abstract class PlayerBase {
void basePause() {
if (DEBUG) { Log.v(TAG, "basePause() piid=" + mPlayerIId); }
- updateState(AudioPlaybackConfiguration.PLAYER_STATE_PAUSED, 0);
+ updateState(AudioPlaybackConfiguration.PLAYER_STATE_PAUSED, new int[0]);
}
void baseStop() {
if (DEBUG) { Log.v(TAG, "baseStop() piid=" + mPlayerIId); }
- updateState(AudioPlaybackConfiguration.PLAYER_STATE_STOPPED, 0);
+ updateState(AudioPlaybackConfiguration.PLAYER_STATE_STOPPED, new int[0]);
}
void baseSetPan(float pan) {
diff --git a/media/java/android/media/SoundPool.java b/media/java/android/media/SoundPool.java
index 7b9ff23596d9..f22cc9c08b4c 100644
--- a/media/java/android/media/SoundPool.java
+++ b/media/java/android/media/SoundPool.java
@@ -317,7 +317,7 @@ public class SoundPool extends PlayerBase {
// FIXME: b/174876164 implement device id for soundpool
try {
Trace.traceBegin(Trace.TRACE_TAG_AUDIO, "SoundPool.play");
- baseStart(0);
+ baseStart(new int[0]);
return _play(soundID, leftVolume, rightVolume, priority, loop, rate, getPlayerIId());
} finally {
Trace.traceEnd(Trace.TRACE_TAG_AUDIO);
diff --git a/media/java/android/media/quality/MediaQualityContract.java b/media/java/android/media/quality/MediaQualityContract.java
index f07ef873a0af..5fec86a81a53 100644
--- a/media/java/android/media/quality/MediaQualityContract.java
+++ b/media/java/android/media/quality/MediaQualityContract.java
@@ -23,7 +23,6 @@ import android.media.tv.flags.Flags;
/**
* The contract between the media quality service and applications. Contains definitions for the
* commonly used parameter names.
- * @hide
*/
@FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW)
public class MediaQualityContract {
@@ -42,9 +41,8 @@ public class MediaQualityContract {
/**
* Parameters picture quality.
- * @hide
*/
- public static final class PictureQuality implements BaseParameters {
+ public static final class PictureQuality {
/**
* The brightness.
*
diff --git a/media/java/android/media/quality/MediaQualityManager.java b/media/java/android/media/quality/MediaQualityManager.java
index dcf497122053..28fe9b6c8112 100644
--- a/media/java/android/media/quality/MediaQualityManager.java
+++ b/media/java/android/media/quality/MediaQualityManager.java
@@ -20,6 +20,7 @@ import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.content.Context;
import android.media.tv.flags.Flags;
@@ -37,7 +38,6 @@ import java.util.concurrent.Executor;
/**
* Central system API to the overall media quality, which arbitrates interaction between
* applications and media quality service.
- * @hide
*/
@FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW)
@SystemService(Context.MEDIA_QUALITY_SERVICE)
@@ -180,7 +180,6 @@ public final class MediaQualityManager {
/**
* Registers a {@link PictureProfileCallback}.
- * @hide
*/
public void registerPictureProfileCallback(
@NonNull @CallbackExecutor Executor executor,
@@ -194,7 +193,6 @@ public final class MediaQualityManager {
/**
* Unregisters the existing {@link PictureProfileCallback}.
- * @hide
*/
public void unregisterPictureProfileCallback(@NonNull final PictureProfileCallback callback) {
Preconditions.checkNotNull(callback);
@@ -216,7 +214,6 @@ public final class MediaQualityManager {
*
* @return the corresponding picture profile if available; {@code null} if the name doesn't
* exist.
- * @hide
*/
@Nullable
public PictureProfile getPictureProfile(
@@ -232,8 +229,9 @@ public final class MediaQualityManager {
/**
* Gets profiles that available to the given package.
*
- * @hide @SystemApi
+ * @hide
*/
+ @SystemApi
@NonNull
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
public List<PictureProfile> getPictureProfilesByPackage(@NonNull String packageName) {
@@ -260,8 +258,9 @@ public final class MediaQualityManager {
* Gets all package names whose picture profiles are available.
*
* @see #getPictureProfilesByPackage(String)
- * @hide @SystemApi
+ * @hide
*/
+ @SystemApi
@NonNull
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
public List<String> getPictureProfilePackageNames() {
@@ -276,14 +275,12 @@ public final class MediaQualityManager {
/**
* Creates a picture profile and store it in the system.
*
- * @return the stored profile with an assigned profile ID. {@code null} if it's not created
- * successfully.
- * @hide
+ * <p>If the profile is created successfully,
+ * {@link PictureProfileCallback#onPictureProfileAdded(String, PictureProfile)} is invoked.
*/
- @Nullable
- public PictureProfile createPictureProfile(@NonNull PictureProfile pp) {
+ public void createPictureProfile(@NonNull PictureProfile pp) {
try {
- return mService.createPictureProfile(pp);
+ mService.createPictureProfile(pp);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -292,7 +289,6 @@ public final class MediaQualityManager {
/**
* Updates an existing picture profile and store it in the system.
- * @hide
*/
public void updatePictureProfile(@NonNull String profileId, @NonNull PictureProfile pp) {
try {
@@ -305,7 +301,6 @@ public final class MediaQualityManager {
/**
* Removes a picture profile from the system.
- * @hide
*/
public void removePictureProfile(@NonNull String profileId) {
try {
@@ -453,7 +448,6 @@ public final class MediaQualityManager {
/**
* Gets capability information of the given parameters.
- * @hide
*/
@NonNull
public List<ParamCapability> getParamCapabilities(@NonNull List<String> names) {
@@ -471,6 +465,7 @@ public final class MediaQualityManager {
* @see #removePictureProfile(String)
* @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
@NonNull
public List<String> getPictureProfileAllowList() {
@@ -485,6 +480,7 @@ public final class MediaQualityManager {
* Sets the allowlist of packages that can create and removed picture profiles
* @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
public void setPictureProfileAllowList(@NonNull List<String> packageNames) {
try {
@@ -544,6 +540,7 @@ public final class MediaQualityManager {
* @param enabled {@code true} to enable, {@code false} to disable.
* @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
public void setAutoPictureQualityEnabled(boolean enabled) {
try {
@@ -555,7 +552,6 @@ public final class MediaQualityManager {
/**
* Returns {@code true} if auto picture quality is enabled; {@code false} otherwise.
- * @hide
*/
public boolean isAutoPictureQualityEnabled() {
try {
@@ -572,6 +568,7 @@ public final class MediaQualityManager {
* @param enabled {@code true} to enable, {@code false} to disable.
* @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
public void setSuperResolutionEnabled(boolean enabled) {
try {
@@ -583,7 +580,6 @@ public final class MediaQualityManager {
/**
* Returns {@code true} if super resolution is enabled; {@code false} otherwise.
- * @hide
*/
public boolean isSuperResolutionEnabled() {
try {
@@ -830,8 +826,7 @@ public final class MediaQualityManager {
}
/**
- * Callback used to monitor status of picture profiles.
- * @hide
+ * Callback used to monitor status of picture profiles
*/
public abstract static class PictureProfileCallback {
/**
@@ -839,7 +834,6 @@ public final class MediaQualityManager {
*
* @param profileId the ID of the profile.
* @param profile the newly added profile.
- * @hide
*/
public void onPictureProfileAdded(
@NonNull String profileId, @NonNull PictureProfile profile) {
@@ -850,7 +844,6 @@ public final class MediaQualityManager {
*
* @param profileId the ID of the profile.
* @param profile the profile with updated info.
- * @hide
*/
public void onPictureProfileUpdated(
@NonNull String profileId, @NonNull PictureProfile profile) {
@@ -861,7 +854,6 @@ public final class MediaQualityManager {
*
* @param profileId the ID of the profile.
* @param profile the removed profile.
- * @hide
*/
public void onPictureProfileRemoved(
@NonNull String profileId, @NonNull PictureProfile profile) {
@@ -871,7 +863,6 @@ public final class MediaQualityManager {
* This is invoked when an issue has occurred.
*
* @param errorCode the error code
- * @hide
*/
public void onError(@PictureProfile.ErrorCode int errorCode) {
}
@@ -883,7 +874,6 @@ public final class MediaQualityManager {
* @param profileId the ID of the profile used by the media content. {@code null} if there
* is no associated profile
* @param updatedCaps the updated capabilities.
- * @hide
*/
public void onParamCapabilitiesChanged(
@Nullable String profileId, @NonNull List<ParamCapability> updatedCaps) {
diff --git a/media/java/android/media/quality/ParamCapability.java b/media/java/android/media/quality/ParamCapability.java
index 0b698a9c1ad2..ed11abd28379 100644
--- a/media/java/android/media/quality/ParamCapability.java
+++ b/media/java/android/media/quality/ParamCapability.java
@@ -31,7 +31,6 @@ import java.lang.annotation.RetentionPolicy;
/**
* Capability info of media quality parameters
- * @hide
*/
@FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW)
public final class ParamCapability implements Parcelable {
diff --git a/media/java/android/media/quality/PictureProfile.java b/media/java/android/media/quality/PictureProfile.java
index 2be47dd87ef2..dcb4222c3eaf 100644
--- a/media/java/android/media/quality/PictureProfile.java
+++ b/media/java/android/media/quality/PictureProfile.java
@@ -18,11 +18,12 @@ package android.media.quality;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
+import android.annotation.SystemApi;
import android.media.tv.TvInputInfo;
import android.media.tv.flags.Flags;
-import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.PersistableBundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -33,7 +34,6 @@ import java.lang.annotation.RetentionPolicy;
/**
* Profile for picture quality.
- * @hide
*/
@FlaggedApi(Flags.FLAG_MEDIA_QUALITY_FW)
public final class PictureProfile implements Parcelable {
@@ -47,7 +47,7 @@ public final class PictureProfile implements Parcelable {
@NonNull
private final String mPackageName;
@NonNull
- private final Bundle mParams;
+ private final PersistableBundle mParams;
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@@ -59,14 +59,14 @@ public final class PictureProfile implements Parcelable {
/**
* System profile type.
*
- * <p>A profile of system type is managed by the system, and readable to the package define in
+ * <p>A profile of system type is managed by the system, and readable to the package returned by
* {@link #getPackageName()}.
*/
public static final int TYPE_SYSTEM = 1;
/**
* Application profile type.
*
- * <p>A profile of application type is managed by the package define in
+ * <p>A profile of application type is managed by the package returned by
* {@link #getPackageName()}.
*/
public static final int TYPE_APPLICATION = 2;
@@ -84,13 +84,11 @@ public final class PictureProfile implements Parcelable {
/**
* Error code for unknown errors.
- * @hide
*/
public static final int ERROR_UNKNOWN = 0;
/**
* Error code for missing necessary permission to handle the profiles.
- * @hide
*/
public static final int ERROR_NO_PERMISSION = 1;
@@ -99,13 +97,11 @@ public final class PictureProfile implements Parcelable {
*
* @see #getProfileType()
* @see #getName()
- * @hide
*/
public static final int ERROR_DUPLICATE = 2;
/**
* Error code for invalid argument.
- * @hide
*/
public static final int ERROR_INVALID_ARGUMENT = 3;
@@ -114,7 +110,6 @@ public final class PictureProfile implements Parcelable {
* list.
*
* @see MediaQualityManager#getPictureProfileAllowList()
- * @hide
*/
public static final int ERROR_NOT_ALLOWLISTED = 4;
@@ -125,7 +120,7 @@ public final class PictureProfile implements Parcelable {
mName = in.readString();
mInputId = in.readString();
mPackageName = in.readString();
- mParams = in.readBundle();
+ mParams = in.readPersistableBundle();
}
@Override
@@ -135,7 +130,7 @@ public final class PictureProfile implements Parcelable {
dest.writeString(mName);
dest.writeString(mInputId);
dest.writeString(mPackageName);
- dest.writeBundle(mParams);
+ dest.writePersistableBundle(mParams);
}
@Override
@@ -168,7 +163,7 @@ public final class PictureProfile implements Parcelable {
@NonNull String name,
@Nullable String inputId,
@NonNull String packageName,
- @NonNull Bundle params) {
+ @NonNull PersistableBundle params) {
this.mId = id;
this.mType = type;
this.mName = name;
@@ -251,13 +246,12 @@ public final class PictureProfile implements Parcelable {
* {@link MediaQualityContract.PictureQuality}.
*/
@NonNull
- public Bundle getParameters() {
- return new Bundle(mParams);
+ public PersistableBundle getParameters() {
+ return new PersistableBundle(mParams);
}
/**
* A builder for {@link PictureProfile}.
- * @hide
*/
public static final class Builder {
@Nullable
@@ -270,7 +264,7 @@ public final class PictureProfile implements Parcelable {
@NonNull
private String mPackageName;
@NonNull
- private Bundle mParams;
+ private PersistableBundle mParams;
/**
* Creates a new Builder.
@@ -291,8 +285,6 @@ public final class PictureProfile implements Parcelable {
mParams = p.getParameters();
}
- /* @hide using by MediaQualityService */
-
/**
* Only used by system to assign the ID.
* @hide
@@ -306,8 +298,9 @@ public final class PictureProfile implements Parcelable {
/**
* Sets profile type.
*
- * @hide @SystemApi
+ * @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
@NonNull
public Builder setProfileType(@ProfileType int value) {
@@ -320,8 +313,9 @@ public final class PictureProfile implements Parcelable {
*
* @see PictureProfile#getInputId()
*
- * @hide @SystemApi
+ * @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
@NonNull
public Builder setInputId(@NonNull String value) {
@@ -334,8 +328,9 @@ public final class PictureProfile implements Parcelable {
*
* @see PictureProfile#getPackageName()
*
- * @hide @SystemApi
+ * @hide
*/
+ @SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_GLOBAL_PICTURE_QUALITY_SERVICE)
@NonNull
public Builder setPackageName(@NonNull String value) {
@@ -349,8 +344,8 @@ public final class PictureProfile implements Parcelable {
* @see PictureProfile#getParameters()
*/
@NonNull
- public Builder setParameters(@NonNull Bundle params) {
- mParams = new Bundle(params);
+ public Builder setParameters(@NonNull PersistableBundle params) {
+ mParams = new PersistableBundle(params);
return this;
}
diff --git a/media/java/android/media/tv/TvInputServiceExtensionManager.java b/media/java/android/media/tv/TvInputServiceExtensionManager.java
index 9442726508c6..b876bcf8cd7e 100644
--- a/media/java/android/media/tv/TvInputServiceExtensionManager.java
+++ b/media/java/android/media/tv/TvInputServiceExtensionManager.java
@@ -194,96 +194,78 @@ public final class TvInputServiceExtensionManager {
public static final String ISCAN_INTERFACE = SCAN_PACKAGE + "IScanInterface";
/**
* Interface that handles scan session and get/store related information.
- * @hide
*/
public static final String ISCAN_SESSION = SCAN_PACKAGE + "IScanSession";
/**
- * Interface that notifies changes related to scan session.
- * @hide
+ * Interface that notifies changes related to a scan session.
*/
public static final String ISCAN_LISTENER = SCAN_PACKAGE + "IScanListener";
/**
* Interface for setting HDPlus information.
- * @hide
*/
public static final String IHDPLUS_INFO = SCAN_PACKAGE + "IHDPlusInfo";
/**
* Interface for handling operator detection for scanning.
- * @hide
*/
public static final String IOPERATOR_DETECTION = SCAN_PACKAGE + "IOperatorDetection";
/**
- * Interface for changes related to operator detection searches.
- * @hide
+ * Interface for notifying changes related to operator detection searches.
*/
public static final String IOPERATOR_DETECTION_LISTENER = SCAN_PACKAGE
+ "IOperatorDetectionListener";
/**
* Interface for handling region channel list for scanning.
- * @hide
*/
public static final String IREGION_CHANNEL_LIST = SCAN_PACKAGE + "IRegionChannelList";
/**
- * Interface for changes related to changes in region channel list search.
- * @hide
+ * Interface for notifying changes related to changes in region channel list search.
*/
public static final String IREGION_CHANNEL_LIST_LISTENER = SCAN_PACKAGE
+ "IRegionChannelListListener";
/**
* Interface for handling target region information.
- * @hide
*/
public static final String ITARGET_REGION = SCAN_PACKAGE + "ITargetRegion";
/**
- * Interface for changes related to target regions during scanning.
- * @hide
+ * Interface for detecting changes related to target regions.
*/
public static final String ITARGET_REGION_LISTENER = SCAN_PACKAGE + "ITargetRegionListener";
/**
- * Interface for handling LCN conflict groups.
- * @hide
+ * Interface for handling logical channel number conflict groups.
*/
public static final String ILCN_CONFLICT = SCAN_PACKAGE + "ILcnConflict";
/**
- * Interface for detecting LCN conflicts during scanning.
- * @hide
+ * Interface for notifying changes in handling logical channel number conflicts.
*/
public static final String ILCN_CONFLICT_LISTENER = SCAN_PACKAGE + "ILcnConflictListener";
/**
- * Interface for handling LCN V2 channel list information.
- * @hide
+ * Interface for handling the updated standard for assigning logical channel numbers.
*/
public static final String ILCNV2_CHANNEL_LIST = SCAN_PACKAGE + "ILcnV2ChannelList";
/**
- * Interface for detecting LCN V2 channel list during scanning.
- * @hide
+ * Interface for notifying changes in assigning logical channel numbers with updated standard.
*/
public static final String ILCNV2_CHANNEL_LIST_LISTENER = SCAN_PACKAGE
+ "ILcnV2ChannelListListener";
/**
* Interface for handling favorite network related information.
- * @hide
*/
public static final String IFAVORITE_NETWORK = SCAN_PACKAGE + "IFavoriteNetwork";
/**
- * Interface for detecting favorite network during scanning.
- * @hide
+ * Interface for notifying changes favorite network during scanning.
*/
public static final String IFAVORITE_NETWORK_LISTENER = SCAN_PACKAGE
+ "IFavoriteNetworkListener";
/**
- * Interface for handling Turksat channel update system service.
- * @hide
+ * Interface for handling Turksat(TKGS) channel update system service.
*/
public static final String ITKGS_INFO = SCAN_PACKAGE + "ITkgsInfo";
/**
- * Interface for changes related to TKGS information.
- * @hide
+ * Interface for notifying changes related to Turksat(TKGS) information.
*/
public static final String ITKGS_INFO_LISTENER = SCAN_PACKAGE + "ITkgsInfoListener";
/**
* Interface for satellite search related to low noise block downconverter.
- * @hide
*/
public static final String ISCAN_SAT_SEARCH = SCAN_PACKAGE + "IScanSatSearch";
/**
@@ -295,113 +277,94 @@ public final class TvInputServiceExtensionManager {
*/
public static final String ICAM_APP_INFO_SERVICE = CAM_PACKAGE + "ICamAppInfoService";
/**
- * Interface for changes on conditional access module app related information.
- * @hide
+ * Interface for notifying changes on conditional access module app related information.
*/
public static final String ICAM_APP_INFO_LISTENER = CAM_PACKAGE + "ICamAppInfoListener";
/**
* Interface for handling conditional access module related information.
- * @hide
*/
public static final String ICAM_MONITORING_SERVICE = CAM_PACKAGE + "ICamMonitoringService";
/**
- * Interface for changes on conditional access module related information.
- * @hide
+ * Interface for notifying changes on conditional access module related information.
*/
public static final String ICAM_INFO_LISTENER = CAM_PACKAGE + "ICamInfoListener";
/**
- * Interface for handling control of CI+ operations.
- * @hide
+ * Interface for handling control of common interface plus operations.
*/
public static final String ICI_OPERATOR_INTERFACE = CAM_PACKAGE + "ICiOperatorInterface";
/**
- * Interfaces for changes on CI+ operations.
- * @hide
+ * Interfaces for notifying changes on common interface plus operations.
*/
public static final String ICI_OPERATOR_LISTENER = CAM_PACKAGE + "ICiOperatorListener";
/**
* Interface for handling conditional access module profile related information.
- * @hide
*/
public static final String ICAM_PROFILE_INTERFACE = CAM_PACKAGE + "ICamProfileInterface";
/**
- * Interface for handling conditional access module DRM related information.
- * @hide
+ * Interface for handling conditional access module digital rights management (DRM)
+ * related information.
*/
public static final String ICONTENT_CONTROL_SERVICE = CAM_PACKAGE + "IContentControlService";
/**
- * Interface for changes on DRM.
- * @hide
+ * Interface for notifying changes on digital rights management (DRM).
*/
public static final String ICAM_DRM_INFO_LISTENER = CAM_PACKAGE + "ICamDrmInfoListener";
/**
* Interface for handling conditional access module pin related information.
- * @hide
*/
public static final String ICAM_PIN_SERVICE = CAM_PACKAGE + "ICamPinService";
/**
- * Interface for changes on conditional access module pin capability.
- * @hide
+ * Interface for notifying changes on conditional access module pin capability.
*/
public static final String ICAM_PIN_CAPABILITY_LISTENER = CAM_PACKAGE
+ "ICamPinCapabilityListener";
/**
- * Interface for changes on conditional access module pin status.
- * @hide
+ * Interface for notifying changes on conditional access module pin status.
*/
public static final String ICAM_PIN_STATUS_LISTENER = CAM_PACKAGE + "ICamPinStatusListener";
/**
* Interface for handling conditional access module host control service.
- * @hide
*/
public static final String ICAM_HOST_CONTROL_SERVICE = CAM_PACKAGE + "ICamHostControlService";
/**
* Interface for handling conditional access module ask release reply.
- * @hide
*/
public static final String ICAM_HOST_CONTROL_ASK_RELEASE_REPLY_CALLBACK = CAM_PACKAGE
+ "ICamHostControlAskReleaseReplyCallback";
/**
- * Interface for changes on conditional access module host control service.
- * @hide
+ * Interface for notifying changes on conditional access module host control service.
*/
public static final String ICAM_HOST_CONTROL_INFO_LISTENER = CAM_PACKAGE
+ "ICamHostControlInfoListener";
/**
* Interface for handling conditional access module host control service tune_quietly_flag.
- * @hide
*/
public static final String ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG = CAM_PACKAGE
+ "ICamHostControlTuneQuietlyFlag";
/**
- * Interface for changes on conditional access module host control service tune_quietly_flag.
- * @hide
+ * Interface for notifying changes on conditional access module host control service
+ * tune_quietly_flag.
*/
public static final String ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG_LISTENER = CAM_PACKAGE
+ "ICamHostControlTuneQuietlyFlagListener";
/**
- * Interface for handling conditional access module multi media interface.
- * @hide
+ * Interface for handling conditional access module multi-media interface.
*/
public static final String IMMI_INTERFACE = CAM_PACKAGE + "IMmiInterface";
/**
- * Interface for controlling conditional access module multi media session.
- * @hide
+ * Interface for controlling conditional access module multi-media session.
*/
public static final String IMMI_SESSION = CAM_PACKAGE + "IMmiSession";
/**
- * Interface for changes on conditional access module multi media session status.
- * @hide
+ * Interface for notifying changes on conditional access module multi-media session status.
*/
public static final String IMMI_STATUS_CALLBACK = CAM_PACKAGE + "IMmiStatusCallback";
/**
- * Interface for changes on conditional access app info related to entering menu.
- * @hide
+ * Interface for notifying changes on conditional access app info related to entering menu.
*/
public static final String IENTER_MENU_ERROR_CALLBACK = CAM_PACKAGE + "IEnterMenuErrorCallback";
/**
- * Interface for handling RRT downloadable rating data.
- * @hide
+ * Interface for handling Region Rating Table downloadable rating data.
*/
public static final String IDOWNLOADABLE_RATING_TABLE_MONITOR = RATING_PACKAGE
+ "IDownloadableRatingTableMonitor";
@@ -410,64 +373,54 @@ public final class TvInputServiceExtensionManager {
*/
public static final String IRATING_INTERFACE = RATING_PACKAGE + "IRatingInterface";
/**
- * Interface for handling PMT rating related information.
- * @hide
+ * Interface for handling Program Map Table rating related information.
*/
public static final String IPMT_RATING_INTERFACE = RATING_PACKAGE + "IPmtRatingInterface";
/**
- * Interface for changes on PMT rating related information.
- * @hide
+ * Interface for notifying changes on Program Map Table rating related information.
*/
public static final String IPMT_RATING_LISTENER = RATING_PACKAGE + "IPmtRatingListener";
/**
- * Interface for handling IVBI rating related information.
- * @hide
+ * Interface for handling Vertical Blanking Interval rating related information.
*/
public static final String IVBI_RATING_INTERFACE = RATING_PACKAGE + "IVbiRatingInterface";
/**
- * Interface for changes on IVBI rating related information.
- * @hide
+ * Interface for notifying changes on Vertical Blanking Interval rating related information.
*/
public static final String IVBI_RATING_LISTENER = RATING_PACKAGE + "IVbiRatingListener";
/**
* Interface for handling program rating related information.
- * @hide
*/
public static final String IPROGRAM_INFO = RATING_PACKAGE + "IProgramInfo";
/**
- * Interface for changes on program rating related information.
- * @hide
+ * Interface for notifying changes on program rating related information.
*/
public static final String IPROGRAM_INFO_LISTENER = RATING_PACKAGE + "IProgramInfoListener";
/**
* Interface for getting broadcast time related information.
*/
- public static final String IBROADCAST_TIME = TIME_PACKAGE + "BroadcastTime";
+ public static final String IBROADCAST_TIME = TIME_PACKAGE + "IBroadcastTime";
/**
* Interface for handling data service signal information on teletext.
*/
public static final String IDATA_SERVICE_SIGNAL_INFO = TELETEXT_PACKAGE
+ "IDataServiceSignalInfo";
/**
- * Interface for changes on data service signal information on teletext.
- * @hide
+ * Interface for notifying changes on data service signal information on teletext.
*/
public static final String IDATA_SERVICE_SIGNAL_INFO_LISTENER = TELETEXT_PACKAGE
+ "IDataServiceSignalInfoListener";
/**
* Interface for handling teletext page information.
- * @hide
*/
public static final String ITELETEXT_PAGE_SUB_CODE = TELETEXT_PACKAGE + "ITeletextPageSubCode";
/**
* Interface for handling scan background service update.
- * @hide
*/
public static final String ISCAN_BACKGROUND_SERVICE_UPDATE = SCAN_BSU_PACKAGE
+ "IScanBackgroundServiceUpdate";
/**
- * Interface for changes on background service update
- * @hide
+ * Interface for notifying changes on background service update
*/
public static final String ISCAN_BACKGROUND_SERVICE_UPDATE_LISTENER = SCAN_BSU_PACKAGE
+ "IScanBackgroundServiceUpdateListener";
@@ -484,98 +437,82 @@ public final class TvInputServiceExtensionManager {
*/
public static final String IHDMI_SIGNAL_INTERFACE = SIGNAL_PACKAGE + "IHdmiSignalInterface";
/**
- * Interfaces for changes on HDMI signal information update.
- * @hide
+ * Interfaces for notifying changes on HDMI signal information update.
*/
public static final String IHDMI_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE
+ "IHdmiSignalInfoListener";
/**
* Interfaces for handling audio signal information update.
- * @hide
*/
public static final String IAUDIO_SIGNAL_INFO = SIGNAL_PACKAGE + "IAudioSignalInfo";
/**
* Interfaces for handling analog audio signal information update.
- * @hide
*/
public static final String IANALOG_AUDIO_INFO = SIGNAL_PACKAGE + "IAnalogAudioInfo";
/**
- * Interfaces for change on audio signal information update.
- * @hide
+ * Interfaces for notifying changes on audio signal information update.
*/
public static final String IAUDIO_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE
+ "IAudioSignalInfoListener";
/**
* Interfaces for handling video signal information update.
- * @hide
*/
public static final String IVIDEO_SIGNAL_INFO = SIGNAL_PACKAGE + "IVideoSignalInfo";
/**
- * Interfaces for changes on video signal information update.
- * @hide
+ * Interfaces for notifying changes on video signal information update.
*/
public static final String IVIDEO_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE
+ "IVideoSignalInfoListener";
/**
* Interfaces for handling service database updates.
- * @hide
*/
public static final String ISERVICE_LIST_EDIT = SERVICE_DATABASE_PACKAGE + "IServiceListEdit";
/**
- * Interfaces for changes on service database updates.
+ * Interfaces for notifying changes on service database updates.
*/
public static final String ISERVICE_LIST_EDIT_LISTENER = SERVICE_DATABASE_PACKAGE
+ "IServiceListEditListener";
/**
* Interfaces for getting service database related information.
- * @hide
*/
public static final String ISERVICE_LIST = SERVICE_DATABASE_PACKAGE + "IServiceList";
/**
* Interfaces for transferring service database related information.
- * @hide
*/
public static final String ISERVICE_LIST_TRANSFER_INTERFACE = SERVICE_DATABASE_PACKAGE
+ "IServiceListTransferInterface";
/**
* Interfaces for exporting service database session.
- * @hide
*/
public static final String ISERVICE_LIST_EXPORT_SESSION = SERVICE_DATABASE_PACKAGE
+ "IServiceListExportSession";
/**
- * Interfaces for changes on exporting service database session.
- * @hide
+ * Interfaces for notifying changes on exporting service database session.
*/
public static final String ISERVICE_LIST_EXPORT_LISTENER = SERVICE_DATABASE_PACKAGE
+ "IServiceListExportListener";
/**
* Interfaces for importing service database session.
- * @hide
*/
public static final String ISERVICE_LIST_IMPORT_SESSION = SERVICE_DATABASE_PACKAGE
+ "IServiceListImportSession";
/**
- * Interfaces for changes on importing service database session.
- * @hide
+ * Interfaces for notifying changes on importing service database session.
*/
public static final String ISERVICE_LIST_IMPORT_LISTENER = SERVICE_DATABASE_PACKAGE
+ "IServiceListImportListener";
/**
* Interfaces for setting channel list resources.
- * @hide
*/
public static final String ISERVICE_LIST_SET_CHANNEL_LIST_SESSION = SERVICE_DATABASE_PACKAGE
+ "IServiceListSetChannelListSession";
/**
- * Interfaces for changes on setting channel list resources.
- * @hide
+ * Interfaces for notifying changes on setting channel list resources.
*/
public static final String ISERVICE_LIST_SET_CHANNEL_LIST_LISTENER = SERVICE_DATABASE_PACKAGE
+ "IServiceListSetChannelListListener";
/**
* Interfaces for transferring channel list resources.
- * @hide
*/
public static final String ICHANNEL_LIST_TRANSFER = SERVICE_DATABASE_PACKAGE
+ "IChannelListTransfer";
@@ -584,14 +521,12 @@ public final class TvInputServiceExtensionManager {
*/
public static final String IRECORDED_CONTENTS = PVR_PACKAGE + "IRecordedContents";
/**
- * Interfaces for changes on deleting record contents.
- * @hide
+ * Interfaces for notifying changes on deleting record contents.
*/
public static final String IDELETE_RECORDED_CONTENTS_CALLBACK = PVR_PACKAGE
+ "IDeleteRecordedContentsCallback";
/**
- * Interfaces for changes on getting record contents.
- * @hide
+ * Interfaces for notifying changes on getting record contents.
*/
public static final String IGET_INFO_RECORDED_CONTENTS_CALLBACK = PVR_PACKAGE
+ "IGetInfoRecordedContentsCallback";
@@ -600,61 +535,51 @@ public final class TvInputServiceExtensionManager {
*/
public static final String IEVENT_MONITOR = EVENT_PACKAGE + "IEventMonitor";
/**
- * Interfaces for changes on present event information.
- * @hide
+ * Interfaces for notifying changes on present event information.
*/
public static final String IEVENT_MONITOR_LISTENER = EVENT_PACKAGE + "IEventMonitorListener";
/**
* Interfaces for handling download event information.
- * @hide
*/
public static final String IEVENT_DOWNLOAD = EVENT_PACKAGE + "IEventDownload";
/**
- * Interfaces for changes on downloading event information.
- * @hide
+ * Interfaces for notifying changes on downloading event information.
*/
public static final String IEVENT_DOWNLOAD_LISTENER = EVENT_PACKAGE + "IEventDownloadListener";
/**
- * Interfaces for handling download event information for DVB and DTMB.
- * @hide
+ * Interfaces for handling download event information for Digital Video Broadcast
+ * and Digital Terrestrial Multimedia Broadcast.
*/
public static final String IEVENT_DOWNLOAD_SESSION = EVENT_PACKAGE + "IEventDownloadSession";
/**
* Interfaces for handling analog color system.
- * @hide
*/
public static final String IANALOG_ATTRIBUTE_INTERFACE = ANALOG_PACKAGE
+ "IAnalogAttributeInterface";
/**
* Interfaces for monitoring channel tuned information.
- * @hide
*/
public static final String ICHANNEL_TUNED_INTERFACE = TUNE_PACKAGE + "IChannelTunedInterface";
/**
- * Interfaces for changes on channel tuned information.
- * @hide
+ * Interfaces for notifying changes on channel tuned information.
*/
public static final String ICHANNEL_TUNED_LISTENER = TUNE_PACKAGE + "IChannelTunedListener";
/**
* Interfaces for handling tuner frontend signal info.
- * @hide
*/
public static final String ITUNER_FRONTEND_SIGNAL_INFO_INTERFACE = SIGNAL_PACKAGE
+ "ITunerFrontendSignalInfoInterface";
/**
- * Interfaces for changes on tuner frontend signal info.
- * @hide
+ * Interfaces for notifying changes on tuner frontend signal info.
*/
public static final String ITUNER_FRONTEND_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE
+ "ITunerFrontendSignalInfoListener";
/**
* Interfaces for handling mux tune operations.
- * @hide
*/
public static final String IMUX_TUNE_SESSION = TUNE_PACKAGE + "IMuxTuneSession";
/**
* Interfaces for initing mux tune session.
- * @hide
*/
public static final String IMUX_TUNE = TUNE_PACKAGE + "IMuxTune";
diff --git a/media/java/android/media/tv/extension/pvr/IDeleteRecordedContentsCallback.aidl b/media/java/android/media/tv/extension/pvr/IDeleteRecordedContentsCallback.aidl
new file mode 100644
index 000000000000..62f151145472
--- /dev/null
+++ b/media/java/android/media/tv/extension/pvr/IDeleteRecordedContentsCallback.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.pvr;
+
+/**
+ * @hide
+ */
+oneway interface IDeleteRecordedContentsCallback {
+ void onRecordedContentsDeleted(in String[] contentUri, in int[] result);
+}
diff --git a/media/java/android/media/tv/extension/pvr/IGetInfoRecordedContentsCallback.aidl b/media/java/android/media/tv/extension/pvr/IGetInfoRecordedContentsCallback.aidl
new file mode 100644
index 000000000000..64f8fc2188b7
--- /dev/null
+++ b/media/java/android/media/tv/extension/pvr/IGetInfoRecordedContentsCallback.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.pvr;
+
+/**
+ * @hide
+ */
+interface IGetInfoRecordedContentsCallback {
+ void onRecordedContentsGetInfo(int result);
+}
diff --git a/media/java/android/media/tv/extension/pvr/IRecordedContents.aidl b/media/java/android/media/tv/extension/pvr/IRecordedContents.aidl
new file mode 100644
index 000000000000..74a15b8e0b94
--- /dev/null
+++ b/media/java/android/media/tv/extension/pvr/IRecordedContents.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.pvr;
+
+import android.media.tv.extension.pvr.IDeleteRecordedContentsCallback;
+import android.media.tv.extension.pvr.IGetInfoRecordedContentsCallback;
+
+
+/**
+ * @hide
+ */
+interface IRecordedContents {
+ // Delete recorded contents by URIs
+ // using callback to notify the result or any errors during the deletion process.
+ void deleteRecordedContents(in String[] contentUri,
+ in IDeleteRecordedContentsCallback callback);
+ // Get the channel lock status for recorded content identified by the URI provided in sync way.
+ int getRecordedContentsLockInfoSync(String contentUri);
+ // Get the channel lock status for recorded content identified by the URI provided in async way.
+ void getRecordedContentsLockInfoAsync(String contentUri,
+ in IGetInfoRecordedContentsCallback callback);
+}
diff --git a/media/java/android/media/tv/extension/scan/IFavoriteNetwork.aidl b/media/java/android/media/tv/extension/scan/IFavoriteNetwork.aidl
new file mode 100644
index 000000000000..ff78aa4be39c
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IFavoriteNetwork.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.IFavoriteNetworkListener;
+import android.os.Bundle;
+
+/**
+ * Country: Norway
+ * Broadcast Type: BROADCAST_TYPE_DVB_T
+ * (Operator: RiksTV)
+ *
+ * @hide
+ */
+interface IFavoriteNetwork {
+ // Get the favorite network information,If there are no conflicts, the array of Bundle is empty.
+ Bundle[] getFavoriteNetworks();
+ // Select and set one of two or more favorite networks detected by the service scan.
+ int setFavoriteNetwork(in Bundle favoriteNetworkSettings);
+ // Set the listener to be invoked when two or more favorite networks are detected.
+ int setListener(in IFavoriteNetworkListener listener);
+}
diff --git a/media/java/android/media/tv/extension/scan/IFavoriteNetworkListener.aidl b/media/java/android/media/tv/extension/scan/IFavoriteNetworkListener.aidl
new file mode 100644
index 000000000000..699422493dd6
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IFavoriteNetworkListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface IFavoriteNetworkListener {
+ void onDetectFavoriteNetwork(in Bundle detectFavoriteNetworks);
+}
diff --git a/media/java/android/media/tv/extension/scan/IHDPlusInfo.aidl b/media/java/android/media/tv/extension/scan/IHDPlusInfo.aidl
new file mode 100644
index 000000000000..cdf6e23f4b47
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IHDPlusInfo.aidl
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+/**
+ * @hide
+ */
+interface IHDPlusInfo {
+ // Specifying a HDPlusInfo and start a network scan.
+ int setHDPlusInfo(String isBlindScanContinue, String isHDMode);
+}
diff --git a/media/java/android/media/tv/extension/scan/ILcnConflict.aidl b/media/java/android/media/tv/extension/scan/ILcnConflict.aidl
new file mode 100644
index 000000000000..5dff39eb5920
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ILcnConflict.aidl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.ILcnConflictListener;
+import android.os.Bundle;
+
+/**
+ * Country: Italy, France
+ * Broadcast Type: BROADCAST_TYPE_DVB_T
+ *
+ * @hide
+ */
+interface ILcnConflict {
+ // Get the LCN conflict groups information, If there are no conflicts, the array of Bundle is empty.
+ Bundle[] getLcnConflictGroups();
+ // Resolve LCN conflicts caused by service scans.
+ int resolveLcnConflict(in Bundle[] lcnConflictSettings);
+ // Set the listener to be invoked the LCN conflict event.
+ int setListener(in ILcnConflictListener listener);
+}
diff --git a/media/java/android/media/tv/extension/scan/ILcnConflictListener.aidl b/media/java/android/media/tv/extension/scan/ILcnConflictListener.aidl
new file mode 100644
index 000000000000..6bbbeb8e1e06
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ILcnConflictListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface ILcnConflictListener {
+ void onDetectLcnConflict(in Bundle detectLcnConflicts);
+}
diff --git a/media/java/android/media/tv/extension/scan/ILcnV2ChannelList.aidl b/media/java/android/media/tv/extension/scan/ILcnV2ChannelList.aidl
new file mode 100644
index 000000000000..f9a9d345a575
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ILcnV2ChannelList.aidl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.ILcnV2ChannelListListener;
+import android.os.Bundle;
+
+/**
+ * Country: (NorDig etc.)
+ * Broadcast Type: BROADCAST_TYPE_DVB_T, BROADCAST_TYPE_DVB_C
+ *
+ * @hide
+ */
+interface ILcnV2ChannelList {
+ // Get the LCN V2 channel list information. If there are no conflicts, the array of Bundle is empty.
+ Bundle[] getLcnV2ChannelLists();
+ // Select and set one of two or more LCN V2 channel list detected by the service scan.
+ int setLcnV2ChannelList(in Bundle lcnV2ChannelListSettings);
+ // Set the listener to be invoked when two or more LCN V2 channel list are detected.
+ int setListener(in ILcnV2ChannelListListener listener);
+}
diff --git a/media/java/android/media/tv/extension/scan/ILcnV2ChannelListListener.aidl b/media/java/android/media/tv/extension/scan/ILcnV2ChannelListListener.aidl
new file mode 100644
index 000000000000..cbdb83c656f4
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ILcnV2ChannelListListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface ILcnV2ChannelListListener {
+ void onDetectLcnV2ChannelList(in Bundle detectLcnV2ChannelList);
+}
diff --git a/media/java/android/media/tv/extension/scan/IOperatorDetection.aidl b/media/java/android/media/tv/extension/scan/IOperatorDetection.aidl
new file mode 100644
index 000000000000..770f8668983e
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IOperatorDetection.aidl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.IOperatorDetectionListener;
+import android.os.Bundle;
+
+/**
+ * Country: Any
+ * Broadcast Type: BROADCAST_TYPE_DVB_S
+ * (Operator: M7)
+ *
+ * @hide
+ */
+interface IOperatorDetection {
+ // Set the operator selected info for scanning.
+ int setOperatorDetection(in Bundle operatorSelected);
+ // Set the listener to be invoked when one or more operator detection has been detected by
+ // operator detection searches.
+ int setListener(in IOperatorDetectionListener listener);
+}
diff --git a/media/java/android/media/tv/extension/scan/IOperatorDetectionListener.aidl b/media/java/android/media/tv/extension/scan/IOperatorDetectionListener.aidl
new file mode 100644
index 000000000000..7dcd46177c43
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IOperatorDetectionListener.aidl
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.os.Bundle;
+
+
+/**
+ * @hide
+ */
+oneway interface IOperatorDetectionListener {
+ void onDetectOperatorDetectionList(in Bundle[] detectOperatorDetectionList);
+}
diff --git a/media/java/android/media/tv/extension/scan/IRegionChannelList.aidl b/media/java/android/media/tv/extension/scan/IRegionChannelList.aidl
new file mode 100644
index 000000000000..fe755f873110
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IRegionChannelList.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.IRegionChannelListListener;
+
+/**
+ * @hide
+ */
+interface IRegionChannelList {
+ // Set the region channel list for scanning.
+ int setRegionChannelList(String regionChannelList);
+ // Set the listener to be invoked when one or more region channel list has been detected by
+ // region channel list searches.
+ int setListener(in IRegionChannelListListener listener);
+}
diff --git a/media/java/android/media/tv/extension/scan/IRegionChannelListListener.aidl b/media/java/android/media/tv/extension/scan/IRegionChannelListListener.aidl
new file mode 100644
index 000000000000..06b0eb5537a2
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IRegionChannelListListener.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+/**
+ * @hide
+ */
+oneway interface IRegionChannelListListener {
+ void onDetectRegionChannelList(in String[] detectRegionChannelList);
+}
diff --git a/media/java/android/media/tv/extension/scan/IScanInterface.aidl b/media/java/android/media/tv/extension/scan/IScanInterface.aidl
new file mode 100644
index 000000000000..b44d1d243150
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IScanInterface.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.IScanListener;
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IScanInterface {
+ IBinder createSession(int broadcastType, String countryCode, String operator,
+ in IScanListener listener);
+ Bundle getParameters(int broadcastType, String countryCode, String operator,
+ in Bundle params);
+}
diff --git a/media/java/android/media/tv/extension/scan/IScanListener.aidl b/media/java/android/media/tv/extension/scan/IScanListener.aidl
new file mode 100644
index 000000000000..2c4807f97c58
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IScanListener.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface IScanListener {
+ // notify events during scan.
+ void onEvent(in Bundle eventArgs);
+ // notify the scan progress.
+ void onScanProgress(String scanProgress, in Bundle scanProgressInfo);
+ // notify the scan completion.
+ void onScanCompleted(int scanResult);
+ // notify that the temporaily held channel list is stored.
+ void onStoreCompleted(int storeResult);
+}
diff --git a/media/java/android/media/tv/extension/scan/IScanSatSearch.aidl b/media/java/android/media/tv/extension/scan/IScanSatSearch.aidl
new file mode 100644
index 000000000000..b8074fc4a9bd
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IScanSatSearch.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+/**
+ * For satellite search function.
+ * @hide
+ */
+interface IScanSatSearch {
+ // Set currecnt LNB as customized LNB, default LNB is universal LNB
+ int setCustomizedLnb(String customizedLnb);
+}
diff --git a/media/java/android/media/tv/extension/scan/IScanSession.aidl b/media/java/android/media/tv/extension/scan/IScanSession.aidl
new file mode 100644
index 000000000000..d42eca1342b5
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/IScanSession.aidl
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IScanSession {
+ // Start a service scan.
+ int startScan(int broadcastType, String countryCode, String operator, in int[] frequency,
+ String scanType, String languageCode);
+ // Reset the scan information held in TIS.
+ int resetScan();
+ // Cancel scan.
+ int cancelScan();
+
+ // Get available interface for created ScanExtension interface.
+ String[] getAvailableExtensionInterfaceNames();
+ // Get extension interface for Scan.
+ IBinder getExtensionInterface(String name);
+
+ // Clear the results of the service scan from the service database.
+ int clearServiceList(in Bundle optionalClearParams);
+ // Store the results of the service scan from the service database.
+ int storeServiceList();
+ // Get a service information specified by the service information ID.
+ Bundle getServiceInfo(String serviceInfoId, in String[] keys);
+ // Get a service information ID list.
+ String[] getServiceInfoIdList();
+ // Get a list of service info by the filter.
+ Bundle getServiceInfoList(in Bundle filterInfo, in String[] keys);
+ // Update the service information.
+ int updateServiceInfo(in Bundle serviceInfo);
+ // Updates the service information for the specified service information ID in array list.
+ int updateServiceInfoByList(in Bundle[] serviceInfo);
+
+ /* DVBI specific functions */
+ // Get all of the serviceLists, parsed from Local TV storage, Broadcast, USB file discovery.
+ Bundle getServiceLists();
+ // Users choose one serviceList from the serviceLists, and install the services.
+ int setServiceList(int serviceListRecId);
+ // Get all of the packageData, parsed from the selected serviceList XML.
+ Bundle getPackageData();
+ // Choose the package using package id and install the corresponding services.
+ int setPackage(String packageId);
+ // Get all of the countryRegionData, parsed from the selected serviceList XML.
+ Bundle getCountryRegionData();
+ // Choose the countryRegion using countryRegion id, and install the corresponding services.
+ int setCountryRegion(String regionId);
+ // Get all of the regionData, parsed from the selected serviceList XML.
+ Bundle getRegionData();
+ // Choose the region using the regionData id, and install the corresponding services.
+ int setRegion(String regionId);
+
+ // Get unique session token for the scan.
+ String getSessionToken();
+ // Release scan resource, the register listener will be released.
+ int release();
+}
diff --git a/media/java/android/media/tv/extension/scan/ITargetRegion.aidl b/media/java/android/media/tv/extension/scan/ITargetRegion.aidl
new file mode 100644
index 000000000000..417e12243b82
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ITargetRegion.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.ITargetRegionListener;
+
+import android.os.Bundle;
+
+/**
+ * Country: U.K.
+ * Broadcast Type: BROADCAST_TYPE_DVB_T
+ *
+ * @hide
+ */
+interface ITargetRegion {
+ // Get the target regions information. If there are no conflicts, the array of Bundle is empty.
+ Bundle[] getTargetRegions();
+ // Select and set one of two or more target region detected by the service scan.
+ int setTargetRegion(in Bundle targetRegionSettings);
+ // Set the listener to be invoked when two or more regions are detected.
+ int setListener(in ITargetRegionListener listener);
+}
diff --git a/media/java/android/media/tv/extension/scan/ITargetRegionListener.aidl b/media/java/android/media/tv/extension/scan/ITargetRegionListener.aidl
new file mode 100644
index 000000000000..9d6aa8e8ea31
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ITargetRegionListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface ITargetRegionListener {
+ void onDetectTargetRegion(in Bundle detectTargetRegions);
+}
diff --git a/media/java/android/media/tv/extension/scan/ITkgsInfo.aidl b/media/java/android/media/tv/extension/scan/ITkgsInfo.aidl
new file mode 100644
index 000000000000..f25952c1cbdc
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ITkgsInfo.aidl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+import android.media.tv.extension.scan.ITkgsInfoListener;
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface ITkgsInfo {
+ int setPrefServiceList(String prefServiceList);
+ int setTkgsInfoListener(in ITkgsInfoListener listener);
+}
diff --git a/media/java/android/media/tv/extension/scan/ITkgsInfoListener.aidl b/media/java/android/media/tv/extension/scan/ITkgsInfoListener.aidl
new file mode 100644
index 000000000000..e3dcf2d4c5ad
--- /dev/null
+++ b/media/java/android/media/tv/extension/scan/ITkgsInfoListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.scan;
+
+/**
+ * @hide
+ */
+oneway interface ITkgsInfoListener {
+ void onServiceList(in String[] serviceList);
+ void onTableVersionUpdate(int tableVersion);
+ void onUserMessage(String strMessage);
+}
diff --git a/media/java/android/media/tv/extension/signal/IAnalogAudioInfo.aidl b/media/java/android/media/tv/extension/signal/IAnalogAudioInfo.aidl
new file mode 100644
index 000000000000..742191ff3c05
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IAnalogAudioInfo.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IAnalogAudioInfo {
+ Bundle getAnalogAudioInfo(String sessionToken);
+}
diff --git a/media/java/android/media/tv/extension/signal/IAudioSignalInfo.aidl b/media/java/android/media/tv/extension/signal/IAudioSignalInfo.aidl
new file mode 100644
index 000000000000..4c953a08364a
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IAudioSignalInfo.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.IAudioSignalInfoListener;
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IAudioSignalInfo {
+ // Get audio signal information.
+ Bundle getAudioSignalInfo(String sessionToken);
+ // Notify TIS whether user selects audio track via mts button on the remote control.
+ void notifyMtsSelectTrackFlag(boolean mtsFlag);
+ // Get the audio track id selected via mts.
+ String getMtsSelectedTrackId();
+ // Register a listener to receive the updated audio signal information.
+ void addAudioSignalInfoListener(String clientToken, in IAudioSignalInfoListener listener);
+ // Remove a listener for audio signal information update notifications.
+ void removeAudioSignalInfoListener(in IAudioSignalInfoListener listener);
+}
diff --git a/media/java/android/media/tv/extension/signal/IAudioSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/IAudioSignalInfoListener.aidl
new file mode 100644
index 000000000000..adf239ab1b32
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IAudioSignalInfoListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface IAudioSignalInfoListener {
+ void onAudioSignalInfoChanged(String sessionToken, in Bundle changedSignalInfo);
+}
diff --git a/media/java/android/media/tv/extension/signal/IHdmiSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/IHdmiSignalInfoListener.aidl
new file mode 100644
index 000000000000..bd468b2e7f34
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IHdmiSignalInfoListener.aidl
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+/**
+ * @hide
+ */
+oneway interface IHdmiSignalInfoListener {
+ void onSignalInfoChanged(String sessionToken);
+ void onLowLatencyModeChanged(int enable);
+}
diff --git a/media/java/android/media/tv/extension/signal/IHdmiSignalInterface.aidl b/media/java/android/media/tv/extension/signal/IHdmiSignalInterface.aidl
new file mode 100644
index 000000000000..39625e3c958d
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IHdmiSignalInterface.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.IHdmiSignalInfoListener;
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+interface IHdmiSignalInterface {
+ // Register a listener for Hdmi Signal Info updates.
+ void addHdmiSignalInfoListener(String inputId, in IHdmiSignalInfoListener listener);
+ // Remove a listener for Hdmi Signal Info update notifications.
+ void removeHdmiSignalInfoListener(String inputId, in IHdmiSignalInfoListener listener);
+ // Obtain HdmiSignalInfo based on the inputId and sessionToken.
+ Bundle getHdmiSignalInfo(String sessionToken);
+ // Enable/disable low-latency decoding mode.
+ void setLowLatency(String sessionToken, int mode);
+ // Enable/disable force-VRR mode.
+ void setForceVrr(String sessionToken, int mode);
+}
diff --git a/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoInterface.aidl b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoInterface.aidl
new file mode 100644
index 000000000000..7f05e7033aeb
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoInterface.aidl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.ITunerFrontendSignalInfoListener;
+import android.os.Bundle;
+
+/**
+* @hide
+*/
+interface ITunerFrontendSignalInfoInterface {
+ Bundle getFrontendSignalInfo(String sessionToken);
+ void setFrontendSignalInfoListener(in ITunerFrontendSignalInfoListener listener);
+}
diff --git a/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoListener.aidl
new file mode 100644
index 000000000000..9c22a3570cce
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/ITunerFrontendSignalInfoListener.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+/**
+* @hide
+*/
+oneway interface ITunerFrontendSignalInfoListener {
+ void onFrontendStatusChanged(int frontendStatus);
+}
diff --git a/media/java/android/media/tv/extension/signal/IVideoSignalInfo.aidl b/media/java/android/media/tv/extension/signal/IVideoSignalInfo.aidl
new file mode 100644
index 000000000000..b17142acf2ab
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IVideoSignalInfo.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+import android.media.tv.extension.signal.IVideoSignalInfoListener;
+import android.os.Bundle;
+
+
+/**
+ * @hide
+ */
+interface IVideoSignalInfo {
+ void addVideoSignalInfoListener(String clientToken, in IVideoSignalInfoListener listener);
+ void removeVideoSignalInfoListener(in IVideoSignalInfoListener listener);
+ Bundle getVideoSignalInfo(String sessionToken);
+}
diff --git a/media/java/android/media/tv/extension/signal/IVideoSignalInfoListener.aidl b/media/java/android/media/tv/extension/signal/IVideoSignalInfoListener.aidl
new file mode 100644
index 000000000000..aafc192f32fa
--- /dev/null
+++ b/media/java/android/media/tv/extension/signal/IVideoSignalInfoListener.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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.media.tv.extension.signal;
+
+import android.os.Bundle;
+
+/**
+ * @hide
+ */
+oneway interface IVideoSignalInfoListener {
+ void onVideoSignalInfoChanged(String sessionToken, in Bundle changedSignalInfo);
+}
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index d05ee551c172..a94230014437 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -1362,13 +1362,26 @@ static jboolean android_media_MediaPlayer_setOutputDevice(JNIEnv *env, jobject t
return mp->setOutputDevice(device_id) == NO_ERROR;
}
-static jint android_media_MediaPlayer_getRoutedDeviceId(JNIEnv *env, jobject thiz)
+static jintArray android_media_MediaPlayer_getRoutedDeviceIds(JNIEnv *env, jobject thiz)
{
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
if (mp == NULL) {
- return AUDIO_PORT_HANDLE_NONE;
+ return NULL;
+ }
+ DeviceIdVector deviceIds;
+ // TODO: b/379161379 - Should we throw an exception if the result is not ok?
+ mp->getRoutedDeviceIds(deviceIds);
+ jintArray result;
+ result = env->NewIntArray(deviceIds.size());
+ if (result == NULL) {
+ return NULL;
}
- return mp->getRoutedDeviceId();
+ jint* values = env->GetIntArrayElements(result, 0);
+ for (unsigned int i = 0; i < deviceIds.size(); i++) {
+ values[i++] = static_cast<jint>(deviceIds[i]);
+ }
+ env->ReleaseIntArrayElements(result, values, 0);
+ return result;
}
static void android_media_MediaPlayer_enableDeviceCallback(
@@ -1452,7 +1465,8 @@ static const JNINativeMethod gMethods[] = {
// AudioRouting
{"native_setOutputDevice", "(I)Z", (void *)android_media_MediaPlayer_setOutputDevice},
- {"native_getRoutedDeviceId", "()I", (void *)android_media_MediaPlayer_getRoutedDeviceId},
+ {"native_getRoutedDeviceIds", "()[I",
+ (void *)android_media_MediaPlayer_getRoutedDeviceIds},
{"native_enableDeviceCallback", "(Z)V", (void *)android_media_MediaPlayer_enableDeviceCallback},
};
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index 9a6d5d7d730a..643fc8a2d925 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -722,21 +722,31 @@ android_media_MediaRecorder_setInputDevice(JNIEnv *env, jobject thiz, jint devic
return true;
}
-static jint
-android_media_MediaRecorder_getRoutedDeviceId(JNIEnv *env, jobject thiz)
+static jintArray
+android_media_MediaRecorder_getRoutedDeviceIds(JNIEnv *env, jobject thiz)
{
- ALOGV("android_media_MediaRecorder_getRoutedDeviceId");
+ ALOGV("android_media_MediaRecorder_getRoutedDeviceIds");
sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
if (mr == NULL) {
jniThrowException(env, "java/lang/IllegalStateException", NULL);
- return AUDIO_PORT_HANDLE_NONE;
+ return NULL;
}
- audio_port_handle_t deviceId;
- process_media_recorder_call(env, mr->getRoutedDeviceId(&deviceId),
- "java/lang/RuntimeException", "getRoutedDeviceId failed.");
- return (jint) deviceId;
+ DeviceIdVector deviceIds;
+ process_media_recorder_call(env, mr->getRoutedDeviceIds(deviceIds),
+ "java/lang/RuntimeException", "getRoutedDeviceIds failed.");
+ jintArray result;
+ result = env->NewIntArray(deviceIds.size());
+ if (result == NULL) {
+ return NULL;
+ }
+ jint* values = env->GetIntArrayElements(result, 0);
+ for (unsigned int i = 0; i < deviceIds.size(); i++) {
+ values[i++] = static_cast<jint>(deviceIds[i]);
+ }
+ env->ReleaseIntArrayElements(result, values, 0);
+ return result;
}
static void
@@ -880,7 +890,8 @@ static const JNINativeMethod gMethods[] = {
{"native_getMetrics", "()Landroid/os/PersistableBundle;", (void *)android_media_MediaRecorder_native_getMetrics},
{"native_setInputDevice", "(I)Z", (void *)android_media_MediaRecorder_setInputDevice},
- {"native_getRoutedDeviceId", "()I", (void *)android_media_MediaRecorder_getRoutedDeviceId},
+ {"native_getRoutedDeviceIds", "()[I",
+ (void *)android_media_MediaRecorder_getRoutedDeviceIds},
{"native_enableDeviceCallback", "(Z)V", (void *)android_media_MediaRecorder_enableDeviceCallback},
{"native_getActiveMicrophones", "(Ljava/util/ArrayList;)I", (void *)android_media_MediaRecord_getActiveMicrophones},
diff --git a/nfc/api/current.txt b/nfc/api/current.txt
index 008120429c40..9a7a39f213ee 100644
--- a/nfc/api/current.txt
+++ b/nfc/api/current.txt
@@ -81,11 +81,14 @@ package android.nfc {
method @FlaggedApi("android.nfc.enable_nfc_reader_option") public boolean isReaderOptionSupported();
method public boolean isSecureNfcEnabled();
method public boolean isSecureNfcSupported();
+ method @FlaggedApi("android.nfc.nfc_check_tag_intent_preference") public boolean isTagIntentAllowed();
+ method @FlaggedApi("android.nfc.nfc_check_tag_intent_preference") public boolean isTagIntentAppPreferenceSupported();
method @FlaggedApi("android.nfc.enable_nfc_charging") public boolean isWlcEnabled();
method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void resetDiscoveryTechnology(@NonNull android.app.Activity);
method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void setDiscoveryTechnology(@NonNull android.app.Activity, int, int);
method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean setObserveModeEnabled(boolean);
field public static final String ACTION_ADAPTER_STATE_CHANGED = "android.nfc.action.ADAPTER_STATE_CHANGED";
+ field @FlaggedApi("android.nfc.nfc_check_tag_intent_preference") public static final String ACTION_CHANGE_TAG_INTENT_PREFERENCE = "android.nfc.action.CHANGE_TAG_INTENT_PREFERENCE";
field public static final String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED";
field @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static final String ACTION_PREFERRED_PAYMENT_CHANGED = "android.nfc.action.PREFERRED_PAYMENT_CHANGED";
field public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED";
diff --git a/nfc/api/system-current.txt b/nfc/api/system-current.txt
index f587660cae5b..15814edcd86a 100644
--- a/nfc/api/system-current.txt
+++ b/nfc/api/system-current.txt
@@ -11,7 +11,6 @@ package android.nfc {
method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public java.util.Map<java.lang.String,java.lang.Boolean> getTagIntentAppPreferenceForUser(int);
method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOn();
method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOnSupported();
- method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean isTagIntentAppPreferenceSupported();
method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public void registerControllerAlwaysOnListener(@NonNull java.util.concurrent.Executor, @NonNull android.nfc.NfcAdapter.ControllerAlwaysOnListener);
method @FlaggedApi("android.nfc.nfc_vendor_cmd") @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public void registerNfcVendorNciCallback(@NonNull java.util.concurrent.Executor, @NonNull android.nfc.NfcAdapter.NfcVendorNciCallback);
method @FlaggedApi("android.nfc.enable_nfc_charging") public void registerWlcStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.nfc.NfcAdapter.WlcStateListener);
@@ -97,6 +96,7 @@ package android.nfc {
method public void onDisableRequested(@NonNull java.util.function.Consumer<java.lang.Boolean>);
method public void onDisableStarted();
method public void onEeListenActivated(boolean);
+ method public void onEeUpdated();
method public void onEnableFinished(int);
method public void onEnableRequested(@NonNull java.util.function.Consumer<java.lang.Boolean>);
method public void onEnableStarted();
diff --git a/nfc/java/android/nfc/INfcAdapter.aidl b/nfc/java/android/nfc/INfcAdapter.aidl
index 31514a09adad..a08b55fe86b8 100644
--- a/nfc/java/android/nfc/INfcAdapter.aidl
+++ b/nfc/java/android/nfc/INfcAdapter.aidl
@@ -121,4 +121,5 @@ interface INfcAdapter
List<Entry> getRoutingTableEntryList();
void indicateDataMigration(boolean inProgress, String pkg);
int commitRouting();
+ boolean isTagIntentAllowed(in String pkg, in int Userid);
}
diff --git a/nfc/java/android/nfc/INfcOemExtensionCallback.aidl b/nfc/java/android/nfc/INfcOemExtensionCallback.aidl
index 1a21c0bae413..e5eac0b4d6fd 100644
--- a/nfc/java/android/nfc/INfcOemExtensionCallback.aidl
+++ b/nfc/java/android/nfc/INfcOemExtensionCallback.aidl
@@ -48,6 +48,7 @@ interface INfcOemExtensionCallback {
void onRfFieldActivated(boolean isActivated);
void onRfDiscoveryStarted(boolean isDiscoveryStarted);
void onEeListenActivated(boolean isActivated);
+ void onEeUpdated();
void onGetOemAppSearchIntent(in List<String> firstPackage, in ResultReceiver intentConsumer);
void onNdefMessage(in Tag tag, in NdefMessage message, in ResultReceiver hasOemExecutableContent);
void onLaunchHceAppChooserActivity(in String selectedAid, in List<ApduServiceInfo> services, in ComponentName failedComponent, in String category);
diff --git a/nfc/java/android/nfc/NfcAdapter.java b/nfc/java/android/nfc/NfcAdapter.java
index c5d8191b22e6..056844f38f3c 100644
--- a/nfc/java/android/nfc/NfcAdapter.java
+++ b/nfc/java/android/nfc/NfcAdapter.java
@@ -49,6 +49,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.util.Log;
import java.io.IOException;
@@ -2505,22 +2506,22 @@ public final class NfcAdapter {
}
/**
- * Checks if the device supports Tag application preference.
+ * Checks if the device supports Tag Intent App Preference functionality.
+ *
+ * When supported, {@link #ACTION_NDEF_DISCOVERED}, {@link #ACTION_TECH_DISCOVERED} or
+ * {@link #ACTION_TAG_DISCOVERED} will not be dispatched to an Activity if
+ * {@link isTagIntentAllowed} returns {@code false}.
*
* @return {@code true} if the device supports Tag application preference, {@code false}
* otherwise
* @throws UnsupportedOperationException if FEATURE_NFC is unavailable
- *
- * @hide
*/
- @SystemApi
- @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
+ @FlaggedApi(Flags.FLAG_NFC_CHECK_TAG_INTENT_PREFERENCE)
public boolean isTagIntentAppPreferenceSupported() {
if (!sHasNfcFeature) {
throw new UnsupportedOperationException();
}
return callServiceReturn(() -> sService.isTagIntentAppPreferenceSupported(), false);
-
}
/**
@@ -2895,4 +2896,42 @@ public final class NfcAdapter {
}
return mNfcOemExtension;
}
+
+ /**
+ * Activity action: Bring up the settings page that allows the user to enable or disable tag
+ * intent reception for apps.
+ *
+ * <p>This will direct user to the settings page shows a list that asks users whether
+ * they want to allow or disallow the package to start an activity when a tag is discovered.
+ *
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ @FlaggedApi(Flags.FLAG_NFC_CHECK_TAG_INTENT_PREFERENCE)
+ public static final String ACTION_CHANGE_TAG_INTENT_PREFERENCE =
+ "android.nfc.action.CHANGE_TAG_INTENT_PREFERENCE";
+
+ /**
+ * Checks whether the user has disabled the calling app from receiving NFC tag intents.
+ *
+ * <p>This method checks whether the caller package name is either not present in the user
+ * disabled list or is explicitly allowed by the user.
+ *
+ * @return {@code true} if an app is either not present in the list or is added to the list
+ * with the flag set to {@code true}. Otherwise, it returns {@code false}.
+ * It also returns {@code true} if {@link isTagIntentAppPreferenceSupported} returns
+ * {@code false}.
+ *
+ * @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
+ */
+ @FlaggedApi(Flags.FLAG_NFC_CHECK_TAG_INTENT_PREFERENCE)
+ public boolean isTagIntentAllowed() {
+ if (!sHasNfcFeature) {
+ throw new UnsupportedOperationException();
+ }
+ if (!isTagIntentAppPreferenceSupported()) {
+ return true;
+ }
+ return callServiceReturn(() -> sService.isTagIntentAllowed(mContext.getPackageName(),
+ UserHandle.myUserId()), false);
+ }
}
diff --git a/nfc/java/android/nfc/NfcOemExtension.java b/nfc/java/android/nfc/NfcOemExtension.java
index 326ca6449c53..9ed678fe6014 100644
--- a/nfc/java/android/nfc/NfcOemExtension.java
+++ b/nfc/java/android/nfc/NfcOemExtension.java
@@ -367,6 +367,15 @@ public final class NfcOemExtension {
void onEeListenActivated(boolean isActivated);
/**
+ * Notifies that some NFCEE (NFC Execution Environment) has been updated.
+ *
+ * <p> This indicates that some applet has been installed/updated/removed in
+ * one of the NFCEE's.
+ * </p>
+ */
+ void onEeUpdated();
+
+ /**
* Gets the intent to find the OEM package in the OEM App market. If the consumer returns
* {@code null} or a timeout occurs, the intent from the first available package will be
* used instead.
@@ -830,6 +839,12 @@ public final class NfcOemExtension {
}
@Override
+ public void onEeUpdated() throws RemoteException {
+ mCallbackMap.forEach((cb, ex) ->
+ handleVoidCallback(null, (Object input) -> cb.onEeUpdated(), ex));
+ }
+
+ @Override
public void onStateUpdated(int state) throws RemoteException {
mCallbackMap.forEach((cb, ex) ->
handleVoidCallback(state, cb::onStateUpdated, ex));
diff --git a/nfc/java/android/nfc/flags.aconfig b/nfc/java/android/nfc/flags.aconfig
index 8a37aa28cf9d..ee287aba709f 100644
--- a/nfc/java/android/nfc/flags.aconfig
+++ b/nfc/java/android/nfc/flags.aconfig
@@ -181,3 +181,11 @@ flag {
description: "Enable set service enabled for category other"
bug: "338157113"
}
+
+flag {
+ name: "nfc_check_tag_intent_preference"
+ is_exported: true
+ namespace: "nfc"
+ description: "App can check its tag intent preference status"
+ bug: "335916336"
+}
diff --git a/packages/CrashRecovery/services/module/java/com/android/server/PackageWatchdog.java b/packages/CrashRecovery/services/module/java/com/android/server/PackageWatchdog.java
index fbf51fd7cca7..8c15b093e48e 100644
--- a/packages/CrashRecovery/services/module/java/com/android/server/PackageWatchdog.java
+++ b/packages/CrashRecovery/services/module/java/com/android/server/PackageWatchdog.java
@@ -218,7 +218,7 @@ public class PackageWatchdog {
@GuardedBy("sPackageWatchdogLock")
private static PackageWatchdog sPackageWatchdog;
- private final Object mLock = new Object();
+ private static final Object sLock = new Object();
// System server context
private final Context mContext;
// Handler to run short running tasks
@@ -228,7 +228,7 @@ public class PackageWatchdog {
// Contains (observer-name -> observer-handle) that have ever been registered from
// previous boots. Observers with all packages expired are periodically pruned.
// It is saved to disk on system shutdown and repouplated on startup so it survives reboots.
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private final ArrayMap<String, ObserverInternal> mAllObservers = new ArrayMap<>();
// File containing the XML data of monitored packages /data/system/package-watchdog.xml
private final AtomicFile mPolicyFile;
@@ -244,26 +244,26 @@ public class PackageWatchdog {
private final Set<String> mPackagesExemptFromImpactLevelThreshold = new ArraySet<>();
// The set of packages that have been synced with the ExplicitHealthCheckController
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private Set<String> mRequestedHealthCheckPackages = new ArraySet<>();
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private boolean mIsPackagesReady;
// Flag to control whether explicit health checks are supported or not
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private boolean mIsHealthCheckEnabled = DEFAULT_EXPLICIT_HEALTH_CHECK_ENABLED;
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private int mTriggerFailureDurationMs = DEFAULT_TRIGGER_FAILURE_DURATION_MS;
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private int mTriggerFailureCount = DEFAULT_TRIGGER_FAILURE_COUNT;
// SystemClock#uptimeMillis when we last executed #syncState
// 0 if no prune is scheduled.
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private long mUptimeAtLastStateSync;
// If true, sync explicit health check packages with the ExplicitHealthCheckController.
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private boolean mSyncRequired = false;
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private long mLastMitigation = -1000000;
@FunctionalInterface
@@ -303,7 +303,11 @@ public class PackageWatchdog {
sPackageWatchdog = this;
}
- /** Creates or gets singleton instance of PackageWatchdog. */
+ /**
+ * Creates or gets singleton instance of PackageWatchdog.
+ *
+ * @param context The system server context.
+ */
public static @NonNull PackageWatchdog getInstance(@NonNull Context context) {
synchronized (sPackageWatchdogLock) {
if (sPackageWatchdog == null) {
@@ -319,7 +323,7 @@ public class PackageWatchdog {
* @hide
*/
public void onPackagesReady() {
- synchronized (mLock) {
+ synchronized (sLock) {
mIsPackagesReady = true;
mHealthCheckController.setCallbacks(packageName -> onHealthCheckPassed(packageName),
packages -> onSupportedPackages(packages),
@@ -338,7 +342,7 @@ public class PackageWatchdog {
* @hide
*/
public void registerHealthObserver(PackageHealthObserver observer) {
- synchronized (mLock) {
+ synchronized (sLock) {
ObserverInternal internalObserver = mAllObservers.get(observer.getUniqueIdentifier());
if (internalObserver != null) {
internalObserver.registeredObserver = observer;
@@ -405,7 +409,7 @@ public class PackageWatchdog {
mLongTaskHandler.post(() -> {
syncState("observing new packages");
- synchronized (mLock) {
+ synchronized (sLock) {
ObserverInternal oldObserver = mAllObservers.get(observer.getUniqueIdentifier());
if (oldObserver == null) {
Slog.d(TAG, observer.getUniqueIdentifier() + " started monitoring health "
@@ -437,7 +441,7 @@ public class PackageWatchdog {
*/
public void unregisterHealthObserver(PackageHealthObserver observer) {
mLongTaskHandler.post(() -> {
- synchronized (mLock) {
+ synchronized (sLock) {
mAllObservers.remove(observer.getUniqueIdentifier());
}
syncState("unregistering observer: " + observer.getUniqueIdentifier());
@@ -458,7 +462,7 @@ public class PackageWatchdog {
Slog.w(TAG, "Could not resolve a list of failing packages");
return;
}
- synchronized (mLock) {
+ synchronized (sLock) {
final long now = mSystemClock.uptimeMillis();
if (Flags.recoverabilityDetection()) {
if (now >= mLastMitigation
@@ -469,7 +473,7 @@ public class PackageWatchdog {
}
}
mLongTaskHandler.post(() -> {
- synchronized (mLock) {
+ synchronized (sLock) {
if (mAllObservers.isEmpty()) {
return;
}
@@ -569,7 +573,7 @@ public class PackageWatchdog {
int currentObserverImpact,
int mitigationCount) {
if (allowMitigations(currentObserverImpact, versionedPackage)) {
- synchronized (mLock) {
+ synchronized (sLock) {
mLastMitigation = mSystemClock.uptimeMillis();
}
currentObserverToNotify.onExecuteHealthCheckMitigation(versionedPackage, failureReason,
@@ -599,7 +603,7 @@ public class PackageWatchdog {
*/
@SuppressWarnings("GuardedBy")
public void noteBoot() {
- synchronized (mLock) {
+ synchronized (sLock) {
// if boot count has reached threshold, start mitigation.
// We wait until threshold number of restarts only for the first time. Perform
// mitigations for every restart after that.
@@ -652,7 +656,7 @@ public class PackageWatchdog {
// This currently adds about 7ms extra to shutdown thread
/** @hide Writes the package information to file during shutdown. */
public void writeNow() {
- synchronized (mLock) {
+ synchronized (sLock) {
// Must only run synchronous tasks as this runs on the ShutdownThread and no other
// thread is guaranteed to run during shutdown.
if (!mAllObservers.isEmpty()) {
@@ -671,7 +675,7 @@ public class PackageWatchdog {
* passed and the health check service is stopped.
*/
private void setExplicitHealthCheckEnabled(boolean enabled) {
- synchronized (mLock) {
+ synchronized (sLock) {
mIsHealthCheckEnabled = enabled;
mHealthCheckController.setEnabled(enabled);
mSyncRequired = true;
@@ -841,7 +845,10 @@ public class PackageWatchdog {
/**
* Returns {@code true} if this observer wishes to observe the given package, {@code false}
- * otherwise
+ * otherwise.
+ * Any failing package can be passed on to the observer. Currently the packages that have
+ * ANRs and perform {@link android.service.watchdog.ExplicitHealthCheckService} are being
+ * passed to observers in these API.
*
* <p> A persistent observer may choose to start observing certain failing packages, even if
* it has not explicitly asked to watch the package with {@link #startObservingHealth}.
@@ -853,14 +860,14 @@ public class PackageWatchdog {
@VisibleForTesting
long getTriggerFailureCount() {
- synchronized (mLock) {
+ synchronized (sLock) {
return mTriggerFailureCount;
}
}
@VisibleForTesting
long getTriggerFailureDurationMs() {
- synchronized (mLock) {
+ synchronized (sLock) {
return mTriggerFailureDurationMs;
}
}
@@ -881,7 +888,7 @@ public class PackageWatchdog {
*/
private void syncRequests() {
boolean syncRequired = false;
- synchronized (mLock) {
+ synchronized (sLock) {
if (mIsPackagesReady) {
Set<String> packages = getPackagesPendingHealthChecksLocked();
if (mSyncRequired || !packages.equals(mRequestedHealthCheckPackages)
@@ -918,7 +925,7 @@ public class PackageWatchdog {
Slog.i(TAG, "Health check passed for package: " + packageName);
boolean isStateChanged = false;
- synchronized (mLock) {
+ synchronized (sLock) {
for (int observerIdx = 0; observerIdx < mAllObservers.size(); observerIdx++) {
ObserverInternal observer = mAllObservers.valueAt(observerIdx);
MonitoredPackage monitoredPackage = observer.getMonitoredPackage(packageName);
@@ -946,7 +953,7 @@ public class PackageWatchdog {
supportedPackageTimeouts.put(info.getPackageName(), info.getHealthCheckTimeoutMillis());
}
- synchronized (mLock) {
+ synchronized (sLock) {
Slog.d(TAG, "Received supported packages " + supportedPackages);
Iterator<ObserverInternal> oit = mAllObservers.values().iterator();
while (oit.hasNext()) {
@@ -977,13 +984,13 @@ public class PackageWatchdog {
}
private void onSyncRequestNotified() {
- synchronized (mLock) {
+ synchronized (sLock) {
mSyncRequired = true;
syncRequestsAsync();
}
}
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private Set<String> getPackagesPendingHealthChecksLocked() {
Set<String> packages = new ArraySet<>();
Iterator<ObserverInternal> oit = mAllObservers.values().iterator();
@@ -1009,7 +1016,7 @@ public class PackageWatchdog {
* health check service and schedules the next state sync.
*/
private void syncState(String reason) {
- synchronized (mLock) {
+ synchronized (sLock) {
Slog.i(TAG, "Syncing state, reason: " + reason);
pruneObserversLocked();
@@ -1025,7 +1032,7 @@ public class PackageWatchdog {
syncState("scheduled");
}
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private void scheduleNextSyncStateLocked() {
long durationMs = getNextStateSyncMillisLocked();
mShortTaskHandler.removeCallbacks(mSyncStateWithScheduledReason);
@@ -1043,7 +1050,7 @@ public class PackageWatchdog {
*
* @returns Long#MAX_VALUE if there are no observed packages.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private long getNextStateSyncMillisLocked() {
long shortestDurationMs = Long.MAX_VALUE;
for (int oIndex = 0; oIndex < mAllObservers.size(); oIndex++) {
@@ -1064,7 +1071,7 @@ public class PackageWatchdog {
* Removes {@code elapsedMs} milliseconds from all durations on monitored packages
* and updates other internal state.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private void pruneObserversLocked() {
long elapsedMs = mUptimeAtLastStateSync == 0
? 0 : mSystemClock.uptimeMillis() - mUptimeAtLastStateSync;
@@ -1092,7 +1099,7 @@ public class PackageWatchdog {
private void onHealthCheckFailed(ObserverInternal observer,
Set<MonitoredPackage> failedPackages) {
mLongTaskHandler.post(() -> {
- synchronized (mLock) {
+ synchronized (sLock) {
PackageHealthObserver registeredObserver = observer.registeredObserver;
if (registeredObserver != null) {
Iterator<MonitoredPackage> it = failedPackages.iterator();
@@ -1201,7 +1208,7 @@ public class PackageWatchdog {
*/
@VisibleForTesting
void updateConfigs() {
- synchronized (mLock) {
+ synchronized (sLock) {
mTriggerFailureCount = DeviceConfig.getInt(
DeviceConfig.NAMESPACE_ROLLBACK,
PROPERTY_WATCHDOG_TRIGGER_FAILURE_COUNT,
@@ -1230,7 +1237,7 @@ public class PackageWatchdog {
*/
private boolean saveToFile() {
Slog.i(TAG, "Saving observer state to file");
- synchronized (mLock) {
+ synchronized (sLock) {
FileOutputStream stream;
try {
stream = mPolicyFile.startWrite();
@@ -1297,20 +1304,38 @@ public class PackageWatchdog {
/** Dump status of every observer in mAllObservers. */
public void dump(@NonNull PrintWriter pw) {
- if (Flags.synchronousRebootInRescueParty() && RescueParty.isRecoveryTriggeredReboot()) {
+ if (Flags.synchronousRebootInRescueParty() && isRecoveryTriggeredReboot()) {
dumpInternal(pw);
} else {
- synchronized (mLock) {
+ synchronized (sLock) {
dumpInternal(pw);
}
}
}
+ /**
+ * Check if we're currently attempting to reboot during mitigation. This method must return
+ * true if triggered reboot early during a boot loop, since the device will not be fully booted
+ * at this time.
+ * @hide
+ */
+ public static boolean isRecoveryTriggeredReboot() {
+ return isFactoryResetPropertySet() || isRebootPropertySet();
+ }
+
+ private static boolean isFactoryResetPropertySet() {
+ return CrashRecoveryProperties.attemptingFactoryReset().orElse(false);
+ }
+
+ private static boolean isRebootPropertySet() {
+ return CrashRecoveryProperties.attemptingReboot().orElse(false);
+ }
+
private void dumpInternal(@NonNull PrintWriter pw) {
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
ipw.println("Package Watchdog status");
ipw.increaseIndent();
- synchronized (mLock) {
+ synchronized (sLock) {
for (String observerName : mAllObservers.keySet()) {
ipw.println("Observer name: " + observerName);
ipw.increaseIndent();
@@ -1324,7 +1349,7 @@ public class PackageWatchdog {
}
@VisibleForTesting
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
void registerObserverInternal(ObserverInternal observerInternal) {
mAllObservers.put(observerInternal.name, observerInternal);
}
@@ -1333,15 +1358,15 @@ public class PackageWatchdog {
* Represents an observer monitoring a set of packages along with the failure thresholds for
* each package.
*
- * <p> Note, the PackageWatchdog#mLock must always be held when reading or writing
+ * <p> Note, the PackageWatchdog#sLock must always be held when reading or writing
* instances of this class.
*/
static class ObserverInternal {
public final String name;
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private final ArrayMap<String, MonitoredPackage> mPackages = new ArrayMap<>();
@Nullable
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public PackageHealthObserver registeredObserver;
private int mMitigationCount;
@@ -1359,7 +1384,7 @@ public class PackageWatchdog {
* Writes important {@link MonitoredPackage} details for this observer to file.
* Does not persist any package failure thresholds.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public boolean writeLocked(XmlSerializer out) {
try {
out.startTag(null, TAG_OBSERVER);
@@ -1387,7 +1412,7 @@ public class PackageWatchdog {
mMitigationCount = mitigationCount;
}
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public void updatePackagesLocked(List<MonitoredPackage> packages) {
for (int pIndex = 0; pIndex < packages.size(); pIndex++) {
MonitoredPackage p = packages.get(pIndex);
@@ -1410,7 +1435,7 @@ public class PackageWatchdog {
* health check passing, or an empty list if no package expired for which an explicit health
* check was still pending
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private Set<MonitoredPackage> prunePackagesLocked(long elapsedMs) {
Set<MonitoredPackage> failedPackages = new ArraySet<>();
Iterator<MonitoredPackage> it = mPackages.values().iterator();
@@ -1435,7 +1460,7 @@ public class PackageWatchdog {
* @returns {@code true} if failure threshold is exceeded, {@code false} otherwise
* @hide
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public boolean onPackageFailureLocked(String packageName) {
if (getMonitoredPackage(packageName) == null && registeredObserver.isPersistent()
&& registeredObserver.mayObservePackage(packageName)) {
@@ -1454,7 +1479,7 @@ public class PackageWatchdog {
*
* @return a mapping of package names to {@link MonitoredPackage} objects.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public ArrayMap<String, MonitoredPackage> getMonitoredPackages() {
return mPackages;
}
@@ -1467,7 +1492,7 @@ public class PackageWatchdog {
* @return the {@link MonitoredPackage} object associated with the package name if one
* exists, {@code null} otherwise.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
@Nullable
public MonitoredPackage getMonitoredPackage(String packageName) {
return mPackages.get(packageName);
@@ -1478,7 +1503,7 @@ public class PackageWatchdog {
*
* @param p: the {@link MonitoredPackage} to store.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public void putMonitoredPackage(MonitoredPackage p) {
mPackages.put(p.getName(), p);
}
@@ -1601,17 +1626,17 @@ public class PackageWatchdog {
* Represents a package and its health check state along with the time
* it should be monitored for.
*
- * <p> Note, the PackageWatchdog#mLock must always be held when reading or writing
+ * <p> Note, the PackageWatchdog#sLock must always be held when reading or writing
* instances of this class.
*/
class MonitoredPackage {
private final String mPackageName;
// Times when package failures happen sorted in ascending order
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private final LongArrayQueue mFailureHistory = new LongArrayQueue();
// Times when an observer was called to mitigate this package's failure. Sorted in
// ascending order.
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private final LongArrayQueue mMitigationCalls;
// One of STATE_[ACTIVE|INACTIVE|PASSED|FAILED]. Updated on construction and after
// methods that could change the health check state: handleElapsedTimeLocked and
@@ -1620,17 +1645,17 @@ public class PackageWatchdog {
// Whether an explicit health check has passed.
// This value in addition with mHealthCheckDurationMs determines the health check state
// of the package, see #getHealthCheckStateLocked
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private boolean mHasPassedHealthCheck;
// System uptime duration to monitor package.
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private long mDurationMs;
// System uptime duration to check the result of an explicit health check
// Initially, MAX_VALUE until we get a value from the health check service
// and request health checks.
// This value in addition with mHasPassedHealthCheck determines the health check state
// of the package, see #getHealthCheckStateLocked
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private long mHealthCheckDurationMs = Long.MAX_VALUE;
MonitoredPackage(String packageName, long durationMs,
@@ -1647,7 +1672,7 @@ public class PackageWatchdog {
/** Writes the salient fields to disk using {@code out}.
* @hide
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public void writeLocked(XmlSerializer out) throws IOException {
out.startTag(null, TAG_PACKAGE);
out.attribute(null, ATTR_NAME, getName());
@@ -1665,7 +1690,7 @@ public class PackageWatchdog {
*
* @return {@code true} if failure count exceeds a threshold, {@code false} otherwise
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public boolean onFailureLocked() {
// Sliding window algorithm: find out if there exists a window containing failures >=
// mTriggerFailureCount.
@@ -1685,7 +1710,7 @@ public class PackageWatchdog {
/**
* Notes the timestamp of a mitigation call into the observer.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public void noteMitigationCallLocked() {
mMitigationCalls.addLast(mSystemClock.uptimeMillis());
}
@@ -1696,7 +1721,7 @@ public class PackageWatchdog {
*
* @return the number of mitigation calls made in the de-escalation window.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public int getMitigationCountLocked() {
try {
final long now = mSystemClock.uptimeMillis();
@@ -1716,7 +1741,7 @@ public class PackageWatchdog {
*
* @return a LongArrayQueue of the mitigation calls relative to the current system uptime.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public LongArrayQueue normalizeMitigationCalls() {
LongArrayQueue normalized = new LongArrayQueue();
final long now = mSystemClock.uptimeMillis();
@@ -1731,7 +1756,7 @@ public class PackageWatchdog {
*
* @return the new health check state
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public int setHealthCheckActiveLocked(long initialHealthCheckDurationMs) {
if (initialHealthCheckDurationMs <= 0) {
Slog.wtf(TAG, "Cannot set non-positive health check duration "
@@ -1751,7 +1776,7 @@ public class PackageWatchdog {
*
* @return the new health check state
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public int handleElapsedTimeLocked(long elapsedMs) {
if (elapsedMs <= 0) {
Slog.w(TAG, "Cannot handle non-positive elapsed time for package " + getName());
@@ -1769,7 +1794,7 @@ public class PackageWatchdog {
}
/** Explicitly update the monitoring duration of the package. */
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public void updateHealthCheckDuration(long newDurationMs) {
mDurationMs = newDurationMs;
}
@@ -1780,7 +1805,7 @@ public class PackageWatchdog {
*
* @return the new {@link HealthCheckState health check state}
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
@HealthCheckState
public int tryPassHealthCheckLocked() {
if (mHealthCheckState != HealthCheckState.FAILED) {
@@ -1799,7 +1824,7 @@ public class PackageWatchdog {
/**
* Returns the current {@link HealthCheckState health check state}.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
@HealthCheckState
public int getHealthCheckStateLocked() {
return mHealthCheckState;
@@ -1810,7 +1835,7 @@ public class PackageWatchdog {
*
* @return the duration or {@link Long#MAX_VALUE} if the package should not be scheduled
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public long getShortestScheduleDurationMsLocked() {
// Consider health check duration only if #isPendingHealthChecksLocked is true
return Math.min(toPositive(mDurationMs),
@@ -1822,7 +1847,7 @@ public class PackageWatchdog {
* Returns {@code true} if the total duration left to monitor the package is less than or
* equal to 0 {@code false} otherwise.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public boolean isExpiredLocked() {
return mDurationMs <= 0;
}
@@ -1831,7 +1856,7 @@ public class PackageWatchdog {
* Returns {@code true} if the package, {@link #getName} is expecting health check results
* {@code false} otherwise.
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public boolean isPendingHealthChecksLocked() {
return mHealthCheckState == HealthCheckState.ACTIVE
|| mHealthCheckState == HealthCheckState.INACTIVE;
@@ -1843,7 +1868,7 @@ public class PackageWatchdog {
*
* @return the new {@link HealthCheckState health check state}
*/
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
@HealthCheckState
private int updateHealthCheckStateLocked() {
int oldState = mHealthCheckState;
@@ -1898,7 +1923,7 @@ public class PackageWatchdog {
}
}
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
@SuppressWarnings("GuardedBy")
void saveAllObserversBootMitigationCountToMetadata(String filePath) {
HashMap<String, Integer> bootMitigationCounts = new HashMap<>();
@@ -2001,7 +2026,7 @@ public class PackageWatchdog {
/** Increments the boot counter, and returns whether the device is bootlooping. */
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
public boolean incrementAndTest() {
if (Flags.recoverabilityDetection()) {
readAllObserversBootMitigationCountIfNecessary(METADATA_FILE);
@@ -2042,7 +2067,7 @@ public class PackageWatchdog {
}
}
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private boolean performedMitigationsDuringWindow() {
for (ObserverInternal observerInternal: mAllObservers.values()) {
if (observerInternal.getBootMitigationCount() > 0) {
@@ -2052,7 +2077,7 @@ public class PackageWatchdog {
return false;
}
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
private void resetAllObserversBootMitigationCount() {
for (int i = 0; i < mAllObservers.size(); i++) {
final ObserverInternal observer = mAllObservers.valueAt(i);
@@ -2061,7 +2086,7 @@ public class PackageWatchdog {
saveAllObserversBootMitigationCountToMetadata(METADATA_FILE);
}
- @GuardedBy("mLock")
+ @GuardedBy("sLock")
@SuppressWarnings("GuardedBy")
void readAllObserversBootMitigationCountIfNecessary(String filePath) {
File metadataFile = new File(filePath);
diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v35/themes.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v35/themes.xml
index fadcf7ba8699..e68253e2200d 100644
--- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v35/themes.xml
+++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v35/themes.xml
@@ -18,7 +18,7 @@
<style name="Theme.CollapsingToolbar.Settings" parent="@style/Theme.MaterialComponents.DayNight">
<item name="elevationOverlayEnabled">true</item>
<item name="elevationOverlayColor">?attr/colorPrimary</item>
- <item name="colorPrimary">@color/settingslib_materialColorOnSurfaceInverse</item>
+ <item name="colorPrimary">@color/settingslib_materialColorInverseOnSurface</item>
<item name="colorAccent">@color/settingslib_materialColorPrimaryFixed</item>
</style>
</resources> \ No newline at end of file
diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v35/themes.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v35/themes.xml
index 7c9d1a47b7ef..f7c9aac68629 100644
--- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v35/themes.xml
+++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v35/themes.xml
@@ -18,7 +18,7 @@
<style name="Theme.CollapsingToolbar.Settings" parent="@style/Theme.MaterialComponents.DayNight">
<item name="elevationOverlayEnabled">true</item>
<item name="elevationOverlayColor">?attr/colorPrimary</item>
- <item name="colorPrimary">@color/settingslib_materialColorOnSurfaceInverse</item>
+ <item name="colorPrimary">@color/settingslib_materialColorInverseOnSurface</item>
<item name="colorAccent">@color/settingslib_materialColorPrimary</item>
</style>
</resources> \ No newline at end of file
diff --git a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SharedPreferencesObservable.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SharedPreferencesObservable.kt
deleted file mode 100644
index e70ec5b2e38e..000000000000
--- a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SharedPreferencesObservable.kt
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2024 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.settingslib.datastore
-
-import android.content.SharedPreferences
-
-/** [SharedPreferences] based [KeyedDataObservable]. */
-class SharedPreferencesObservable(private val sharedPreferences: SharedPreferences) :
- KeyedDataObservable<String>(), AutoCloseable {
-
- private val listener = createSharedPreferenceListener()
-
- init {
- sharedPreferences.registerOnSharedPreferenceChangeListener(listener)
- }
-
- override fun close() {
- sharedPreferences.unregisterOnSharedPreferenceChangeListener(listener)
- }
-}
-
-/** Creates [SharedPreferences.OnSharedPreferenceChangeListener] for [KeyedObservable]. */
-internal fun KeyedObservable<String>.createSharedPreferenceListener() =
- SharedPreferences.OnSharedPreferenceChangeListener { _, key ->
- if (key != null) {
- notifyChange(key, DataChangeReason.UPDATE)
- } else {
- // On Android >= R, SharedPreferences.Editor.clear() will trigger this case
- notifyChange(DataChangeReason.DELETE)
- }
- }
diff --git a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/GetPreferenceGraphApiHandler.kt b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/GetPreferenceGraphApiHandler.kt
index 088bef230374..7aece5185800 100644
--- a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/GetPreferenceGraphApiHandler.kt
+++ b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/GetPreferenceGraphApiHandler.kt
@@ -42,7 +42,7 @@ abstract class GetPreferenceGraphApiHandler(
callingUid: Int,
request: GetPreferenceGraphRequest,
): PreferenceGraphProto {
- val builder = PreferenceGraphBuilder.of(application, request)
+ val builder = PreferenceGraphBuilder.of(application, myUid, callingUid, request)
if (request.screenKeys.isEmpty()) {
for (key in PreferenceScreenRegistry.preferenceScreens.keys) {
builder.addPreferenceScreenFromRegistry(key)
@@ -68,16 +68,18 @@ constructor(
val screenKeys: Set<String> = setOf(),
val visitedScreens: Set<String> = setOf(),
val locale: Locale? = null,
- val includeValue: Boolean = true,
+ val flags: Int = PreferenceGetterFlags.ALL,
+ val includeValue: Boolean = true, // TODO: clean up
val includeValueDescriptor: Boolean = true,
)
object GetPreferenceGraphRequestCodec : MessageCodec<GetPreferenceGraphRequest> {
override fun encode(data: GetPreferenceGraphRequest): Bundle =
- Bundle(3).apply {
+ Bundle(4).apply {
putStringArray(KEY_SCREEN_KEYS, data.screenKeys.toTypedArray())
putStringArray(KEY_VISITED_KEYS, data.visitedScreens.toTypedArray())
putString(KEY_LOCALE, data.locale?.toLanguageTag())
+ putInt(KEY_FLAGS, data.flags)
}
override fun decode(data: Bundle): GetPreferenceGraphRequest {
@@ -88,12 +90,14 @@ object GetPreferenceGraphRequestCodec : MessageCodec<GetPreferenceGraphRequest>
screenKeys.toSet(),
visitedScreens.toSet(),
data.getString(KEY_LOCALE).toLocale(),
+ data.getInt(KEY_FLAGS),
)
}
private const val KEY_SCREEN_KEYS = "k"
private const val KEY_VISITED_KEYS = "v"
private const val KEY_LOCALE = "l"
+ private const val KEY_FLAGS = "f"
}
object PreferenceGraphProtoCodec : MessageCodec<PreferenceGraphProto> {
diff --git a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceCoordinate.kt b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceCoordinate.kt
new file mode 100644
index 000000000000..68aa2d258295
--- /dev/null
+++ b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceCoordinate.kt
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2024 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.settingslib.graph
+
+import android.os.Parcel
+import android.os.Parcelable
+
+/**
+ * Coordinate to locate a preference.
+ *
+ * Within an app, the preference screen key (unique among screens) plus preference key (unique on
+ * the screen) is used to locate a preference.
+ */
+data class PreferenceCoordinate(val screenKey: String, val key: String) : Parcelable {
+
+ constructor(parcel: Parcel) : this(parcel.readString()!!, parcel.readString()!!)
+
+ override fun writeToParcel(parcel: Parcel, flags: Int) {
+ parcel.writeString(screenKey)
+ parcel.writeString(key)
+ }
+
+ override fun describeContents() = 0
+
+ companion object CREATOR : Parcelable.Creator<PreferenceCoordinate> {
+
+ override fun createFromParcel(parcel: Parcel) = PreferenceCoordinate(parcel)
+
+ override fun newArray(size: Int) = arrayOfNulls<PreferenceCoordinate>(size)
+ }
+}
diff --git a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterApi.kt b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterApi.kt
new file mode 100644
index 000000000000..c8453efb9161
--- /dev/null
+++ b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterApi.kt
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2024 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.settingslib.graph
+
+import android.app.Application
+import androidx.annotation.IntDef
+import com.android.settingslib.graph.proto.PreferenceProto
+import com.android.settingslib.ipc.ApiDescriptor
+import com.android.settingslib.ipc.ApiHandler
+import com.android.settingslib.ipc.ApiPermissionChecker
+import com.android.settingslib.metadata.PreferenceHierarchyNode
+import com.android.settingslib.metadata.PreferenceScreenRegistry
+
+/**
+ * Request to get preference information.
+ *
+ * @param preferences coordinate of preferences
+ * @param flags a combination of constants in [PreferenceGetterFlags]
+ */
+class PreferenceGetterRequest(val preferences: Array<PreferenceCoordinate>, val flags: Int)
+
+/** Error code of preference getter request. */
+@Target(AnnotationTarget.TYPE)
+@IntDef(
+ PreferenceGetterErrorCode.NOT_FOUND,
+ PreferenceGetterErrorCode.DISALLOW,
+ PreferenceGetterErrorCode.INTERNAL_ERROR,
+)
+@Retention(AnnotationRetention.SOURCE)
+annotation class PreferenceGetterErrorCode {
+ companion object {
+ /** Preference is not found. */
+ const val NOT_FOUND = 1
+ /** Disallow to get preference value (e.g. uid not allowed). */
+ const val DISALLOW = 2
+ /** Internal error happened when get preference information. */
+ const val INTERNAL_ERROR = 3
+
+ fun getMessage(code: Int) =
+ when (code) {
+ NOT_FOUND -> "Preference not found"
+ DISALLOW -> "Disallow to get preference value"
+ INTERNAL_ERROR -> "Internal error"
+ else -> "Unknown error"
+ }
+ }
+}
+
+/** Response of the getter API. */
+class PreferenceGetterResponse(
+ val errors: Map<PreferenceCoordinate, @PreferenceGetterErrorCode Int>,
+ val preferences: Map<PreferenceCoordinate, PreferenceProto>,
+)
+
+/** Preference getter API descriptor. */
+class PreferenceGetterApiDescriptor(override val id: Int) :
+ ApiDescriptor<PreferenceGetterRequest, PreferenceGetterResponse> {
+
+ override val requestCodec = PreferenceGetterRequestCodec()
+
+ override val responseCodec = PreferenceGetterResponseCodec()
+}
+
+/** Preference getter API implementation. */
+class PreferenceGetterApiHandler(
+ override val id: Int,
+ private val permissionChecker: ApiPermissionChecker<PreferenceGetterRequest>,
+) : ApiHandler<PreferenceGetterRequest, PreferenceGetterResponse> {
+
+ override fun hasPermission(
+ application: Application,
+ myUid: Int,
+ callingUid: Int,
+ request: PreferenceGetterRequest,
+ ) = permissionChecker.hasPermission(application, myUid, callingUid, request)
+
+ override suspend fun invoke(
+ application: Application,
+ myUid: Int,
+ callingUid: Int,
+ request: PreferenceGetterRequest,
+ ): PreferenceGetterResponse {
+ val errors = mutableMapOf<PreferenceCoordinate, Int>()
+ val preferences = mutableMapOf<PreferenceCoordinate, PreferenceProto>()
+ val flags = request.flags
+ for ((screenKey, coordinates) in request.preferences.groupBy { it.screenKey }) {
+ val screenMetadata = PreferenceScreenRegistry[screenKey]
+ if (screenMetadata == null) {
+ for (coordinate in coordinates) {
+ errors[coordinate] = PreferenceGetterErrorCode.NOT_FOUND
+ }
+ continue
+ }
+ val nodes = mutableMapOf<String, PreferenceHierarchyNode?>()
+ for (coordinate in coordinates) nodes[coordinate.key] = null
+ screenMetadata.getPreferenceHierarchy(application).forEachRecursively {
+ val metadata = it.metadata
+ val key = metadata.key
+ if (nodes.containsKey(key)) nodes[key] = it
+ }
+ for (coordinate in coordinates) {
+ val node = nodes[coordinate.key]
+ if (node == null) {
+ errors[coordinate] = PreferenceGetterErrorCode.NOT_FOUND
+ continue
+ }
+ val metadata = node.metadata
+ try {
+ val preferenceProto =
+ metadata.toProto(
+ application,
+ myUid,
+ callingUid,
+ screenMetadata,
+ metadata.key == screenMetadata.key,
+ flags,
+ )
+ if (flags == PreferenceGetterFlags.VALUE && !preferenceProto.hasValue()) {
+ errors[coordinate] = PreferenceGetterErrorCode.DISALLOW
+ } else {
+ preferences[coordinate] = preferenceProto
+ }
+ } catch (e: Exception) {
+ errors[coordinate] = PreferenceGetterErrorCode.INTERNAL_ERROR
+ }
+ }
+ }
+ return PreferenceGetterResponse(errors, preferences)
+ }
+
+ override val requestCodec = PreferenceGetterRequestCodec()
+
+ override val responseCodec = PreferenceGetterResponseCodec()
+}
diff --git a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterCodecs.kt b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterCodecs.kt
new file mode 100644
index 000000000000..ff14eb5aae55
--- /dev/null
+++ b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterCodecs.kt
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2024 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.settingslib.graph
+
+import android.os.Bundle
+import android.os.Parcel
+import com.android.settingslib.graph.proto.PreferenceProto
+import com.android.settingslib.ipc.MessageCodec
+import java.util.Arrays
+
+/** Message codec for [PreferenceGetterRequest]. */
+class PreferenceGetterRequestCodec : MessageCodec<PreferenceGetterRequest> {
+ override fun encode(data: PreferenceGetterRequest) =
+ Bundle(2).apply {
+ putParcelableArray(null, data.preferences)
+ putInt(FLAGS, data.flags)
+ }
+
+ @Suppress("DEPRECATION")
+ override fun decode(data: Bundle): PreferenceGetterRequest {
+ data.classLoader = PreferenceCoordinate::class.java.classLoader
+ val array = data.getParcelableArray(null)!!
+
+ return PreferenceGetterRequest(
+ Arrays.copyOf(array, array.size, Array<PreferenceCoordinate>::class.java),
+ data.getInt(FLAGS),
+ )
+ }
+
+ companion object {
+ private const val FLAGS = "f"
+ }
+}
+
+/** Message codec for [PreferenceGetterResponse]. */
+class PreferenceGetterResponseCodec : MessageCodec<PreferenceGetterResponse> {
+ override fun encode(data: PreferenceGetterResponse) =
+ Bundle(2).apply {
+ data.errors.toErrorsByteArray()?.let { putByteArray(ERRORS, it) }
+ data.preferences.toPreferencesByteArray()?.let { putByteArray(null, it) }
+ }
+
+ private fun Map<PreferenceCoordinate, Int>.toErrorsByteArray(): ByteArray? {
+ if (isEmpty()) return null
+ val parcel = Parcel.obtain()
+ parcel.writeInt(size)
+ for ((coordinate, code) in this) {
+ coordinate.writeToParcel(parcel, 0)
+ parcel.writeInt(code)
+ }
+ val bytes = parcel.marshall()
+ parcel.recycle()
+ return bytes
+ }
+
+ private fun Map<PreferenceCoordinate, PreferenceProto>.toPreferencesByteArray(): ByteArray? {
+ if (isEmpty()) return null
+ val parcel = Parcel.obtain()
+ parcel.writeInt(size)
+ for ((coordinate, preferenceProto) in this) {
+ coordinate.writeToParcel(parcel, 0)
+ val data = preferenceProto.toByteArray()
+ parcel.writeInt(data.size)
+ parcel.writeByteArray(data)
+ }
+ val bytes = parcel.marshall()
+ parcel.recycle()
+ return bytes
+ }
+
+ override fun decode(data: Bundle) =
+ PreferenceGetterResponse(
+ data.getByteArray(ERRORS).toErrors(),
+ data.getByteArray(null).toPreferences(),
+ )
+
+ private fun ByteArray?.toErrors(): Map<PreferenceCoordinate, Int> {
+ if (this == null) return emptyMap()
+ val parcel = Parcel.obtain()
+ parcel.unmarshall(this, 0, size)
+ parcel.setDataPosition(0)
+ val count = parcel.readInt()
+ val errors = mutableMapOf<PreferenceCoordinate, Int>()
+ repeat(count) {
+ val coordinate = PreferenceCoordinate(parcel)
+ errors[coordinate] = parcel.readInt()
+ }
+ parcel.recycle()
+ return errors
+ }
+
+ private fun ByteArray?.toPreferences(): Map<PreferenceCoordinate, PreferenceProto> {
+ if (this == null) return emptyMap()
+ val parcel = Parcel.obtain()
+ parcel.unmarshall(this, 0, size)
+ parcel.setDataPosition(0)
+ val count = parcel.readInt()
+ val preferences = mutableMapOf<PreferenceCoordinate, PreferenceProto>()
+ repeat(count) {
+ val coordinate = PreferenceCoordinate(parcel)
+ val bytes = parcel.readInt()
+ val array = ByteArray(bytes).also { parcel.readByteArray(it) }
+ preferences[coordinate] = PreferenceProto.parseFrom(array)
+ }
+ parcel.recycle()
+ return preferences
+ }
+
+ companion object {
+ private const val ERRORS = "e"
+ }
+}
diff --git a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterFlags.kt b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterFlags.kt
new file mode 100644
index 000000000000..632f154b72ab
--- /dev/null
+++ b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGetterFlags.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2024 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.settingslib.graph
+
+/** Flags for preference getter operation. */
+object PreferenceGetterFlags {
+ const val VALUE = 1 shl 0
+ const val VALUE_DESCRIPTOR = 1 shl 1
+ const val METADATA = 1 shl 2
+ const val ALL = (1 shl 3) - 1
+
+ fun Int.includeValue() = (this and VALUE) != 0
+
+ fun Int.includeValueDescriptor() = (this and VALUE_DESCRIPTOR) != 0
+
+ fun Int.includeMetadata() = (this and METADATA) != 0
+}
diff --git a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGraphBuilder.kt b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGraphBuilder.kt
index 6760e72be4a6..a65d24cf3d6f 100644
--- a/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGraphBuilder.kt
+++ b/packages/SettingsLib/Graph/src/com/android/settingslib/graph/PreferenceGraphBuilder.kt
@@ -31,6 +31,9 @@ import androidx.preference.Preference
import androidx.preference.PreferenceGroup
import androidx.preference.PreferenceScreen
import androidx.preference.TwoStatePreference
+import com.android.settingslib.graph.PreferenceGetterFlags.includeMetadata
+import com.android.settingslib.graph.PreferenceGetterFlags.includeValue
+import com.android.settingslib.graph.PreferenceGetterFlags.includeValueDescriptor
import com.android.settingslib.graph.proto.PreferenceGraphProto
import com.android.settingslib.graph.proto.PreferenceGroupProto
import com.android.settingslib.graph.proto.PreferenceProto
@@ -41,7 +44,6 @@ import com.android.settingslib.metadata.BooleanValue
import com.android.settingslib.metadata.PersistentPreference
import com.android.settingslib.metadata.PreferenceAvailabilityProvider
import com.android.settingslib.metadata.PreferenceHierarchy
-import com.android.settingslib.metadata.PreferenceHierarchyNode
import com.android.settingslib.metadata.PreferenceMetadata
import com.android.settingslib.metadata.PreferenceRestrictionProvider
import com.android.settingslib.metadata.PreferenceScreenBindingKeyProvider
@@ -50,6 +52,7 @@ import com.android.settingslib.metadata.PreferenceScreenRegistry
import com.android.settingslib.metadata.PreferenceSummaryProvider
import com.android.settingslib.metadata.PreferenceTitleProvider
import com.android.settingslib.metadata.RangeValue
+import com.android.settingslib.metadata.ReadWritePermit
import com.android.settingslib.preference.PreferenceScreenFactory
import com.android.settingslib.preference.PreferenceScreenProvider
import java.util.Locale
@@ -60,14 +63,17 @@ private const val TAG = "PreferenceGraphBuilder"
/** Builder of preference graph. */
class PreferenceGraphBuilder
-private constructor(private val context: Context, private val request: GetPreferenceGraphRequest) {
+private constructor(
+ private val context: Context,
+ private val myUid: Int,
+ private val callingUid: Int,
+ private val request: GetPreferenceGraphRequest,
+) {
private val preferenceScreenFactory by lazy {
PreferenceScreenFactory(context.ofLocale(request.locale))
}
private val builder by lazy { PreferenceGraphProto.newBuilder() }
private val visitedScreens = mutableSetOf<String>().apply { addAll(request.visitedScreens) }
- private val includeValue = request.includeValue
- private val includeValueDescriptor = request.includeValueDescriptor
private suspend fun init() {
for (key in request.screenKeys) {
@@ -229,7 +235,7 @@ private constructor(private val context: Context, private val request: GetPrefer
enabled = isEnabled
available = isVisible
persistent = isPersistent
- if (includeValue && isPersistent && this@toProto is TwoStatePreference) {
+ if (request.flags.includeValue() && isPersistent && this@toProto is TwoStatePreference) {
value = preferenceValueProto { booleanValue = this@toProto.isChecked }
}
this@toProto.fragment.toActionTarget(preferenceExtras)?.let {
@@ -243,14 +249,14 @@ private constructor(private val context: Context, private val request: GetPrefer
screenMetadata: PreferenceScreenMetadata,
isRoot: Boolean,
): PreferenceGroupProto = preferenceGroupProto {
- preference = toProto(screenMetadata, this@toProto, isRoot)
+ preference = toProto(screenMetadata, this@toProto.metadata, isRoot)
forEachAsync {
addPreferences(
preferenceOrGroupProto {
if (it is PreferenceHierarchy) {
group = it.toProto(screenMetadata, false)
} else {
- preference = toProto(screenMetadata, it, false)
+ preference = toProto(screenMetadata, it.metadata, false)
}
}
)
@@ -259,93 +265,19 @@ private constructor(private val context: Context, private val request: GetPrefer
private suspend fun toProto(
screenMetadata: PreferenceScreenMetadata,
- node: PreferenceHierarchyNode,
+ metadata: PreferenceMetadata,
isRoot: Boolean,
- ) = preferenceProto {
- val metadata = node.metadata
- key = metadata.key
- metadata.getTitleTextProto(isRoot)?.let { title = it }
- if (metadata.summary != 0) {
- summary = textProto { resourceId = metadata.summary }
- } else {
- (metadata as? PreferenceSummaryProvider)?.getSummary(context)?.let {
- summary = textProto { string = it.toString() }
- }
- }
- val metadataIcon = metadata.getPreferenceIcon(context)
- if (metadataIcon != 0) icon = metadataIcon
- if (metadata.keywords != 0) keywords = metadata.keywords
- val preferenceExtras = metadata.extras(context)
- preferenceExtras?.let { extras = it.toProto() }
- indexable = metadata.isIndexable(context)
- enabled = metadata.isEnabled(context)
- if (metadata is PreferenceAvailabilityProvider) {
- available = metadata.isAvailable(context)
- }
- if (metadata is PreferenceRestrictionProvider) {
- restricted = metadata.isRestricted(context)
- }
- persistent = metadata.isPersistent(context)
- if (persistent) {
- if (includeValue && metadata is PersistentPreference<*>) {
- value = preferenceValueProto {
- when (metadata) {
- is BooleanValue ->
- metadata
- .storage(context)
- .getValue(metadata.key, Boolean::class.javaObjectType)
- ?.let { booleanValue = it }
- is RangeValue -> {
- metadata
- .storage(context)
- .getValue(metadata.key, Int::class.javaObjectType)
- ?.let { intValue = it }
- }
- else -> {}
- }
- }
+ ) =
+ metadata.toProto(context, myUid, callingUid, screenMetadata, isRoot, request.flags).also {
+ if (metadata is PreferenceScreenMetadata) {
+ @Suppress("CheckReturnValue") addPreferenceScreenMetadata(metadata)
}
- if (includeValueDescriptor) {
- valueDescriptor = preferenceValueDescriptorProto {
- when (metadata) {
- is BooleanValue -> booleanType = true
- is RangeValue -> rangeValue = rangeValueProto {
- min = metadata.getMinValue(context)
- max = metadata.getMaxValue(context)
- step = metadata.getIncrementStep(context)
- }
- else -> {}
- }
+ metadata.intent(context)?.resolveActivity(context.packageManager)?.let {
+ if (it.packageName == context.packageName) {
+ add(it.className)
}
}
}
- if (metadata is PreferenceScreenMetadata) {
- @Suppress("CheckReturnValue") addPreferenceScreenMetadata(metadata)
- }
- metadata.intent(context)?.let { actionTarget = it.toActionTarget() }
- screenMetadata.getLaunchIntent(context, metadata)?.let { launchIntent = it.toProto() }
- }
-
- private fun PreferenceMetadata.getTitleTextProto(isRoot: Boolean): TextProto? {
- if (isRoot && this is PreferenceScreenMetadata) {
- val titleRes = screenTitle
- if (titleRes != 0) {
- return textProto { resourceId = titleRes }
- } else {
- getScreenTitle(context)?.let {
- return textProto { string = it.toString() }
- }
- }
- } else {
- val titleRes = title
- if (titleRes != 0) {
- return textProto { resourceId = titleRes }
- }
- }
- return (this as? PreferenceTitleProvider)?.getTitle(context)?.let {
- textProto { string = it.toString() }
- }
- }
private suspend fun String?.toActionTarget(extras: Bundle?): ActionTarget? {
if (this.isNullOrEmpty()) return null
@@ -399,22 +331,129 @@ private constructor(private val context: Context, private val request: GetPrefer
return null
}
- private suspend fun Intent.toActionTarget(): ActionTarget {
- if (component?.packageName == "") {
- setClassName(context, component!!.className)
+ private suspend fun Intent.toActionTarget() =
+ toActionTarget(context).also {
+ resolveActivity(context.packageManager)?.let {
+ if (it.packageName == context.packageName) {
+ add(it.className)
+ }
+ }
}
- resolveActivity(context.packageManager)?.let {
- if (it.packageName == context.packageName) {
- add(it.className)
+
+ companion object {
+ suspend fun of(
+ context: Context,
+ myUid: Int,
+ callingUid: Int,
+ request: GetPreferenceGraphRequest,
+ ) = PreferenceGraphBuilder(context, myUid, callingUid, request).also { it.init() }
+ }
+}
+
+fun PreferenceMetadata.toProto(
+ context: Context,
+ myUid: Int,
+ callingUid: Int,
+ screenMetadata: PreferenceScreenMetadata,
+ isRoot: Boolean,
+ flags: Int,
+) = preferenceProto {
+ val metadata = this@toProto
+ key = metadata.key
+ if (flags.includeMetadata()) {
+ metadata.getTitleTextProto(context, isRoot)?.let { title = it }
+ if (metadata.summary != 0) {
+ summary = textProto { resourceId = metadata.summary }
+ } else {
+ (metadata as? PreferenceSummaryProvider)?.getSummary(context)?.let {
+ summary = textProto { string = it.toString() }
}
}
- return actionTargetProto { intent = toProto() }
+ val metadataIcon = metadata.getPreferenceIcon(context)
+ if (metadataIcon != 0) icon = metadataIcon
+ if (metadata.keywords != 0) keywords = metadata.keywords
+ val preferenceExtras = metadata.extras(context)
+ preferenceExtras?.let { extras = it.toProto() }
+ indexable = metadata.isIndexable(context)
+ enabled = metadata.isEnabled(context)
+ if (metadata is PreferenceAvailabilityProvider) {
+ available = metadata.isAvailable(context)
+ }
+ if (metadata is PreferenceRestrictionProvider) {
+ restricted = metadata.isRestricted(context)
+ }
+ metadata.intent(context)?.let { actionTarget = it.toActionTarget(context) }
+ screenMetadata.getLaunchIntent(context, metadata)?.let { launchIntent = it.toProto() }
}
+ persistent = metadata.isPersistent(context)
+ if (persistent) {
+ if (
+ flags.includeValue() &&
+ enabled &&
+ (!hasAvailable() || available) &&
+ (!hasRestricted() || !restricted) &&
+ metadata is PersistentPreference<*> &&
+ metadata.getReadPermit(context, myUid, callingUid) == ReadWritePermit.ALLOW
+ ) {
+ value = preferenceValueProto {
+ when (metadata) {
+ is BooleanValue ->
+ metadata
+ .storage(context)
+ .getValue(metadata.key, Boolean::class.javaObjectType)
+ ?.let { booleanValue = it }
+ is RangeValue -> {
+ metadata
+ .storage(context)
+ .getValue(metadata.key, Int::class.javaObjectType)
+ ?.let { intValue = it }
+ }
+ else -> {}
+ }
+ }
+ }
+ if (flags.includeValueDescriptor()) {
+ valueDescriptor = preferenceValueDescriptorProto {
+ when (metadata) {
+ is BooleanValue -> booleanType = true
+ is RangeValue -> rangeValue = rangeValueProto {
+ min = metadata.getMinValue(context)
+ max = metadata.getMaxValue(context)
+ step = metadata.getIncrementStep(context)
+ }
+ else -> {}
+ }
+ }
+ }
+ }
+}
- companion object {
- suspend fun of(context: Context, request: GetPreferenceGraphRequest) =
- PreferenceGraphBuilder(context, request).also { it.init() }
+private fun PreferenceMetadata.getTitleTextProto(context: Context, isRoot: Boolean): TextProto? {
+ if (isRoot && this is PreferenceScreenMetadata) {
+ val titleRes = screenTitle
+ if (titleRes != 0) {
+ return textProto { resourceId = titleRes }
+ } else {
+ getScreenTitle(context)?.let {
+ return textProto { string = it.toString() }
+ }
+ }
+ } else {
+ val titleRes = title
+ if (titleRes != 0) {
+ return textProto { resourceId = titleRes }
+ }
+ }
+ return (this as? PreferenceTitleProvider)?.getTitle(context)?.let {
+ textProto { string = it.toString() }
+ }
+}
+
+private fun Intent.toActionTarget(context: Context): ActionTarget {
+ if (component?.packageName == "") {
+ setClassName(context, component!!.className)
}
+ return actionTargetProto { intent = toProto() }
}
@SuppressLint("AppBundleLocaleChanges")
diff --git a/packages/SettingsLib/Metadata/src/com/android/settingslib/metadata/PreferenceHierarchy.kt b/packages/SettingsLib/Metadata/src/com/android/settingslib/metadata/PreferenceHierarchy.kt
index a2b826a50e58..9179f8ffc082 100644
--- a/packages/SettingsLib/Metadata/src/com/android/settingslib/metadata/PreferenceHierarchy.kt
+++ b/packages/SettingsLib/Metadata/src/com/android/settingslib/metadata/PreferenceHierarchy.kt
@@ -58,6 +58,9 @@ class PreferenceHierarchy internal constructor(metadata: PreferenceMetadata) :
/** Specifies preference order in the hierarchy. */
infix fun PreferenceHierarchyNode.order(order: Int) = apply { this.order = order }
+ /** Specifies preference order in the hierarchy for group. */
+ infix fun PreferenceHierarchy.order(order: Int) = apply { this.order = order }
+
/** Adds a preference to the hierarchy. */
@JvmOverloads
fun add(metadata: PreferenceMetadata, order: Int? = null) {
diff --git a/packages/SettingsLib/Service/src/com/android/settingslib/service/PreferenceService.kt b/packages/SettingsLib/Service/src/com/android/settingslib/service/PreferenceService.kt
index ed748bb58a9a..7cb36db856eb 100644
--- a/packages/SettingsLib/Service/src/com/android/settingslib/service/PreferenceService.kt
+++ b/packages/SettingsLib/Service/src/com/android/settingslib/service/PreferenceService.kt
@@ -17,6 +17,8 @@
package com.android.settingslib.service
import com.android.settingslib.graph.GetPreferenceGraphRequest
+import com.android.settingslib.graph.PreferenceGetterApiHandler
+import com.android.settingslib.graph.PreferenceGetterRequest
import com.android.settingslib.graph.PreferenceSetterApiHandler
import com.android.settingslib.graph.PreferenceSetterRequest
import com.android.settingslib.ipc.ApiHandler
@@ -37,6 +39,7 @@ open class PreferenceService(
preferenceScreenProviders: Set<Class<out PreferenceScreenProvider>> = setOf(),
graphPermissionChecker: ApiPermissionChecker<GetPreferenceGraphRequest>? = null,
setterPermissionChecker: ApiPermissionChecker<PreferenceSetterRequest>? = null,
+ getterPermissionChecker: ApiPermissionChecker<PreferenceGetterRequest>? = null,
vararg apiHandlers: ApiHandler<*, *>,
) :
MessengerService(
@@ -45,6 +48,9 @@ open class PreferenceService(
setterPermissionChecker?.let {
add(PreferenceSetterApiHandler(API_PREFERENCE_SETTER, it))
}
+ getterPermissionChecker?.let {
+ add(PreferenceGetterApiHandler(API_PREFERENCE_GETTER, it))
+ }
addAll(apiHandlers)
},
permissionChecker,
diff --git a/packages/SettingsLib/Service/src/com/android/settingslib/service/ServiceApiConstants.kt b/packages/SettingsLib/Service/src/com/android/settingslib/service/ServiceApiConstants.kt
index 7655daa6cf21..d71405e126ce 100644
--- a/packages/SettingsLib/Service/src/com/android/settingslib/service/ServiceApiConstants.kt
+++ b/packages/SettingsLib/Service/src/com/android/settingslib/service/ServiceApiConstants.kt
@@ -24,6 +24,9 @@ internal const val API_GET_PREFERENCE_GRAPH = 1
/** API id for preference value setter. */
internal const val API_PREFERENCE_SETTER = 2
+/** API id for preference getter. */
+internal const val API_PREFERENCE_GETTER = 3
+
/**
* The max API id reserved for internal preference service usages. Custom API id should start with
* **1000** to avoid conflict.
diff --git a/packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml b/packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml
index b46181e20eaa..8b574aa95176 100644
--- a/packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml
+++ b/packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml
@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!--Deprecated. After sdk 35, don't use it, using materialColorOnSurfaceInverse in light theme -->
+<!--Deprecated. After sdk 35, don't use it, using materialColorInverseOnSurface in light theme -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/system_neutral1_500" android:lStar="98" />
</selector> \ No newline at end of file
diff --git a/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml b/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml
index 313748d8f091..46ec62e7a5ef 100644
--- a/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml
+++ b/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml
@@ -51,7 +51,7 @@
<color name="settingslib_text_color_preference_category_title">@android:color/system_accent1_100</color>
- <!--Deprecated. After sdk 35, don't use it, using materialColorOnSurfaceInverse in dark theme -->
+ <!--Deprecated. After sdk 35, don't use it, using materialColorInverseOnSurface in dark theme -->
<color name="settingslib_surface_dark">@android:color/system_neutral1_800</color>
<!--Deprecated. After sdk 35, don't use it-->
diff --git a/packages/SettingsLib/SettingsTheme/res/values-night-v35/colors.xml b/packages/SettingsLib/SettingsTheme/res/values-night-v35/colors.xml
index 94ff02d898db..84a3ed68af01 100644
--- a/packages/SettingsLib/SettingsTheme/res/values-night-v35/colors.xml
+++ b/packages/SettingsLib/SettingsTheme/res/values-night-v35/colors.xml
@@ -53,11 +53,11 @@
<color name="settingslib_materialColorSurfaceContainerLow">@android:color/system_surface_container_low_dark</color>
<color name="settingslib_materialColorOnPrimaryContainer">@android:color/system_on_primary_container_dark</color>
<color name="settingslib_materialColorOnErrorContainer">@android:color/system_on_error_container_dark</color>
- <color name="settingslib_materialColorOnSurfaceInverse">@android:color/system_on_surface_light</color>
+ <color name="settingslib_materialColorInverseOnSurface">@android:color/system_on_surface_light</color>
<color name="settingslib_materialColorSecondaryContainer">@android:color/system_secondary_container_dark</color>
<color name="settingslib_materialColorErrorContainer">@android:color/system_error_container_dark</color>
- <color name="settingslib_materialColorPrimaryInverse">@android:color/system_primary_light</color>
- <color name="settingslib_materialColorSurfaceInverse">@android:color/system_surface_light</color>
+ <color name="settingslib_materialColorInversePrimary">@android:color/system_primary_light</color>
+ <color name="settingslib_materialColorInverseSurface">@android:color/system_surface_light</color>
<color name="settingslib_materialColorSurfaceVariant">@android:color/system_surface_variant_dark</color>
<color name="settingslib_materialColorTertiaryContainer">@android:color/system_tertiary_container_dark</color>
<color name="settingslib_materialColorPrimaryContainer">@android:color/system_primary_container_dark</color>
diff --git a/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml b/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml
index b99ee5123491..fef92b792bec 100644
--- a/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml
+++ b/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml
@@ -67,9 +67,9 @@
<color name="settingslib_accent_primary_variant">@android:color/system_accent1_600</color>
<!--Deprecated. After sdk 35 don't use it.-->
<color name="settingslib_accent_secondary_device_default">@android:color/system_accent2_100</color>
- <!--Deprecated. After sdk 35 don't use it.using materialColorOnSurfaceInverse in dark theme-->
+ <!--Deprecated. After sdk 35 don't use it.using materialColorInverseOnSurface in dark theme-->
<color name="settingslib_background_device_default_dark">@android:color/system_neutral1_900</color>
- <!--Deprecated. After sdk 35 don't use it. using materialColorOnSurfaceInverse in light theme-->
+ <!--Deprecated. After sdk 35 don't use it. using materialColorInverseOnSurface in light theme-->
<color name="settingslib_background_device_default_light">@android:color/system_neutral1_50</color>
<!--Deprecated. After sdk 35 don't use it. using materialColorOnSurface-->
<color name="settingslib_text_color_primary_device_default">@android:color/system_neutral1_900</color>
diff --git a/packages/SettingsLib/SettingsTheme/res/values-v35/colors.xml b/packages/SettingsLib/SettingsTheme/res/values-v35/colors.xml
index 8b9501608000..90c19e1aa676 100644
--- a/packages/SettingsLib/SettingsTheme/res/values-v35/colors.xml
+++ b/packages/SettingsLib/SettingsTheme/res/values-v35/colors.xml
@@ -66,16 +66,16 @@
<color name="settingslib_materialColorSecondaryFixedDim">@android:color/system_secondary_fixed_dim</color>
<color name="settingslib_materialColorOnErrorContainer">@android:color/system_on_error_container_light</color>
<color name="settingslib_materialColorOnSecondaryFixed">@android:color/system_on_secondary_fixed</color>
- <color name="settingslib_materialColorOnSurfaceInverse">@android:color/system_on_surface_dark</color>
+ <color name="settingslib_materialColorInverseOnSurface">@android:color/system_on_surface_dark</color>
<color name="settingslib_materialColorTertiaryFixedDim">@android:color/system_tertiary_fixed_dim</color>
<color name="settingslib_materialColorOnTertiaryFixed">@android:color/system_on_tertiary_fixed</color>
<color name="settingslib_materialColorPrimaryFixedDim">@android:color/system_primary_fixed_dim</color>
<color name="settingslib_materialColorSecondaryContainer">@android:color/system_secondary_container_light</color>
<color name="settingslib_materialColorErrorContainer">@android:color/system_error_container_light</color>
<color name="settingslib_materialColorOnPrimaryFixed">@android:color/system_on_primary_fixed</color>
- <color name="settingslib_materialColorPrimaryInverse">@android:color/system_primary_dark</color>
+ <color name="settingslib_materialColorInversePrimary">@android:color/system_primary_dark</color>
<color name="settingslib_materialColorSecondaryFixed">@android:color/system_secondary_fixed</color>
- <color name="settingslib_materialColorSurfaceInverse">@android:color/system_surface_dark</color>
+ <color name="settingslib_materialColorInverseSurface">@android:color/system_surface_dark</color>
<color name="settingslib_materialColorSurfaceVariant">@android:color/system_surface_variant_light</color>
<color name="settingslib_materialColorTertiaryContainer">@android:color/system_tertiary_container_light</color>
<color name="settingslib_materialColorTertiaryFixed">@android:color/system_tertiary_fixed</color>
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/compose/ModifierExt.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/compose/ModifierExt.kt
index e883a4a55af9..25bb46c837f6 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/compose/ModifierExt.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/compose/ModifierExt.kt
@@ -25,3 +25,36 @@ fun Modifier.contentDescription(contentDescription: String?) =
if (contentDescription != null) this.semantics {
this.contentDescription = contentDescription
} else this
+
+/**
+ * Concatenates this modifier with another if `condition` is true.
+ *
+ * This method allows inline conditional addition of modifiers to a modifier chain. Instead of
+ * writing
+ *
+ * ```
+ * val aModifier = Modifier.a()
+ * val bModifier = if(condition) aModifier.b() else aModifier
+ * Composable(modifier = bModifier)
+ * ```
+ *
+ * You can instead write
+ *
+ * ```
+ * Composable(modifier = Modifier.a().thenIf(condition){
+ * Modifier.b()
+ * }
+ * ```
+ *
+ * This makes the modifier chain easier to read.
+ *
+ * Note that unlike the non-factory version, the conditional modifier is recreated each time, and
+ * may never be created at all.
+ *
+ * @param condition Whether or not to apply the modifiers.
+ * @param factory Creates the modifier to concatenate with the current one.
+ * @return a Modifier representing this modifier followed by other in sequence.
+ * @see Modifier.then
+ */
+inline fun Modifier.thenIf(condition: Boolean, crossinline factory: () -> Modifier): Modifier =
+ if (condition) this.then(factory()) else this
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/preference/BaseLayout.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/preference/BaseLayout.kt
index acb96be64a34..b1bb79d61b03 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/preference/BaseLayout.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/preference/BaseLayout.kt
@@ -36,12 +36,13 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
-import androidx.compose.ui.unit.min
+import com.android.settingslib.spa.framework.compose.thenIf
import com.android.settingslib.spa.framework.theme.SettingsDimension
import com.android.settingslib.spa.framework.theme.SettingsOpacity.alphaForEnabled
import com.android.settingslib.spa.framework.theme.SettingsShape
import com.android.settingslib.spa.framework.theme.SettingsTheme
import com.android.settingslib.spa.framework.theme.isSpaExpressiveEnabled
+import com.android.settingslib.spa.widget.ui.LocalIsInCategory
import com.android.settingslib.spa.widget.ui.SettingsTitle
@Composable
@@ -57,18 +58,18 @@ internal fun BaseLayout(
paddingVertical: Dp = SettingsDimension.itemPaddingVertical,
widget: @Composable () -> Unit = {},
) {
+ val surfaceBright = MaterialTheme.colorScheme.surfaceBright
Row(
modifier =
modifier
.fillMaxWidth()
.semantics(mergeDescendants = true) {}
- .then(
- if (isSpaExpressiveEnabled)
- Modifier.heightIn(min = SettingsDimension.preferenceMinHeight)
- .clip(SettingsShape.CornerExtraSmall)
- .background(MaterialTheme.colorScheme.surfaceBright)
- else Modifier
- )
+ .thenIf(isSpaExpressiveEnabled) {
+ Modifier.heightIn(min = SettingsDimension.preferenceMinHeight)
+ }
+ .thenIf(isSpaExpressiveEnabled && LocalIsInCategory.current) {
+ Modifier.clip(SettingsShape.CornerExtraSmall).background(surfaceBright)
+ }
.padding(end = paddingEnd),
verticalAlignment = Alignment.CenterVertically,
) {
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Category.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Category.kt
index 28b2b4ab1662..96d2abb70391 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Category.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Category.kt
@@ -31,6 +31,8 @@ import androidx.compose.material.icons.outlined.TouchApp
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.compositionLocalOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -99,7 +101,7 @@ fun Category(title: String? = null, content: @Composable ColumnScope.() -> Unit)
verticalArrangement =
if (isSpaExpressiveEnabled) Arrangement.spacedBy(SettingsDimension.paddingTiny)
else Arrangement.Top,
- content = content,
+ content = { CompositionLocalProvider(LocalIsInCategory provides true) { content() } },
)
}
}
@@ -109,15 +111,14 @@ fun Category(title: String? = null, content: @Composable ColumnScope.() -> Unit)
*
* @param list The list of items to display.
* @param entry The entry for each list item according to its index in list.
- * @param key Optional. The key for each item in list to provide unique item identifiers, making
- * the list more efficient.
- * @param title Optional. Category title for each item or each group of items in the list. It
- * should be decided by the index.
+ * @param key Optional. The key for each item in list to provide unique item identifiers, making the
+ * list more efficient.
+ * @param title Optional. Category title for each item or each group of items in the list. It should
+ * be decided by the index.
* @param bottomPadding Optional. Bottom outside padding of the category.
* @param state Optional. State of LazyList.
* @param content Optional. Content to be shown at the top of the category.
*/
-
@Composable
fun LazyCategory(
list: List<Any>,
@@ -144,17 +145,19 @@ fun LazyCategory(
verticalArrangement = Arrangement.spacedBy(SettingsDimension.paddingTiny),
state = state,
) {
- item { content() }
+ item { CompositionLocalProvider(LocalIsInCategory provides true) { content() } }
items(count = list.size, key = key) {
title?.invoke(it)?.let { title -> CategoryTitle(title) }
- val entryPreference = entry(it)
- entryPreference()
+ CompositionLocalProvider(LocalIsInCategory provides true) { entry(it)() }
}
}
}
}
+/** LocalIsInCategory containing the if the current composable is in a category. */
+internal val LocalIsInCategory = compositionLocalOf { false }
+
@Preview
@Composable
private fun CategoryPreview() {
diff --git a/packages/SettingsLib/aconfig/settingslib.aconfig b/packages/SettingsLib/aconfig/settingslib.aconfig
index bf419cc46aeb..076f82acce09 100644
--- a/packages/SettingsLib/aconfig/settingslib.aconfig
+++ b/packages/SettingsLib/aconfig/settingslib.aconfig
@@ -171,3 +171,10 @@ flag {
description: "Enable the user consent prompt before writing sensitive preferences via service"
bug: "378552675"
}
+
+flag {
+ name: "hearing_devices_input_routing_control"
+ namespace: "accessibility"
+ description: "Enable the input routing control in device details and hearing devices dialog."
+ bug: "349255906"
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index d0827b30efc9..4eb0567c67d9 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -133,8 +133,9 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
* If an ACTION_UUID intent comes in within
* MAX_UUID_DELAY_FOR_AUTO_CONNECT milliseconds, we will try auto-connect
* again with the new UUIDs
+ * The value is reset if a manual disconnection happens.
*/
- private long mConnectAttempted;
+ private long mConnectAttempted = -1;
// Active device state
private boolean mIsActiveDeviceA2dp = false;
@@ -369,6 +370,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
}
public void disconnect() {
+ mConnectAttempted = -1;
synchronized (mProfileLock) {
if (getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) {
for (CachedBluetoothDevice member : getMemberDevice()) {
@@ -983,15 +985,19 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
}
if (BluetoothUtils.D) {
- Log.d(TAG, "onUuidChanged: Time since last connect="
- + (SystemClock.elapsedRealtime() - mConnectAttempted));
+ long lastConnectAttempted = mConnectAttempted == -1 ? 0 : mConnectAttempted;
+ Log.d(
+ TAG,
+ "onUuidChanged: Time since last connect/manual disconnect="
+ + (SystemClock.elapsedRealtime() - lastConnectAttempted));
}
/*
* If a connect was attempted earlier without any UUID, we will do the connect now.
* Otherwise, allow the connect on UUID change.
*/
- if ((mConnectAttempted + timeout) > SystemClock.elapsedRealtime()) {
+ if (mConnectAttempted != -1
+ && (mConnectAttempted + timeout) > SystemClock.elapsedRealtime()) {
Log.d(TAG, "onUuidChanged: triggering connectDevice");
connectDevice();
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt b/packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt
index b41e9703d427..4c4ce2a61851 100644
--- a/packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt
+++ b/packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt
@@ -221,6 +221,7 @@ class AudioSharingRepositoryImpl(
override suspend fun audioSharingAvailable(): Boolean {
return withContext(backgroundCoroutineContext) {
BluetoothUtils.isAudioSharingEnabled()
+ || BluetoothUtils.isAudioSharingPreviewEnabled(contentResolver)
}
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/volume/shared/AudioSharingLogger.kt b/packages/SettingsLib/src/com/android/settingslib/volume/shared/AudioSharingLogger.kt
index 18a4c6d1748d..791d86611b06 100644
--- a/packages/SettingsLib/src/com/android/settingslib/volume/shared/AudioSharingLogger.kt
+++ b/packages/SettingsLib/src/com/android/settingslib/volume/shared/AudioSharingLogger.kt
@@ -26,4 +26,6 @@ interface AudioSharingLogger {
fun onVolumeMapChanged(map: Map<Int, Int>)
fun onSetDeviceVolumeRequested(volume: Int)
+
+ fun onAudioSharingAvailabilityRequestedError(requestFrom: String, e: String)
} \ No newline at end of file
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/FakeAudioSharingRepositoryLogger.kt b/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/FakeAudioSharingRepositoryLogger.kt
index cc4cc8d4ab96..731b3a136cd7 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/FakeAudioSharingRepositoryLogger.kt
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/FakeAudioSharingRepositoryLogger.kt
@@ -43,4 +43,8 @@ class FakeAudioSharingRepositoryLogger : AudioSharingLogger {
override fun onSetDeviceVolumeRequested(volume: Int) {
mutableLogs.add("onSetVolumeRequested volume=$volume")
}
+
+ override fun onAudioSharingAvailabilityRequestedError(requestFrom: String, e: String) {
+ mutableLogs.add("onAudioSharingAvailabilityRequestedError, requestFrom=$requestFrom")
+ }
} \ No newline at end of file
diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/GlobalSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/GlobalSettingsValidators.java
index 8f58e8cd1973..c90ba8249d54 100644
--- a/packages/SettingsProvider/src/android/provider/settings/validators/GlobalSettingsValidators.java
+++ b/packages/SettingsProvider/src/android/provider/settings/validators/GlobalSettingsValidators.java
@@ -462,5 +462,7 @@ public class GlobalSettingsValidators {
Global.Wearable.PHONE_SWITCHING_REQUEST_SOURCE_NONE,
Global.Wearable.PHONE_SWITCHING_REQUEST_SOURCE_COMPANION
));
+ VALIDATORS.put(Global.HEARING_DEVICE_LOCAL_AMBIENT_VOLUME, ANY_STRING_VALIDATOR);
+ VALIDATORS.put(Global.HEARING_DEVICE_LOCAL_NOTIFICATION, ANY_STRING_VALIDATOR);
}
}
diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java
index 558ccaf7a707..509b88b257fe 100644
--- a/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java
+++ b/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java
@@ -263,6 +263,5 @@ public class SystemSettingsValidators {
VALIDATORS.put(System.NOTIFICATION_COOLDOWN_ENABLED, BOOLEAN_VALIDATOR);
VALIDATORS.put(System.NOTIFICATION_COOLDOWN_ALL, BOOLEAN_VALIDATOR);
VALIDATORS.put(System.NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED, BOOLEAN_VALIDATOR);
- VALIDATORS.put(System.HEARING_DEVICE_LOCAL_AMBIENT_VOLUME, ANY_STRING_VALIDATOR);
}
}
diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
index c2beaa8048f6..9de7faf04df6 100644
--- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
+++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
@@ -564,6 +564,8 @@ public class SettingsBackupTest {
Settings.Global.MANAGED_PROVISIONING_DEFER_PROVISIONING_TO_ROLE_HOLDER,
Settings.Global.REVIEW_PERMISSIONS_NOTIFICATION_STATE,
Settings.Global.ENABLE_BACK_ANIMATION, // Temporary for T, dev option only
+ Settings.Global.HEARING_DEVICE_LOCAL_AMBIENT_VOLUME, // cache per hearing device
+ Settings.Global.HEARING_DEVICE_LOCAL_NOTIFICATION, // cache per hearing device
Settings.Global.Wearable.COMBINED_LOCATION_ENABLE,
Settings.Global.Wearable.HAS_PAY_TOKENS,
Settings.Global.Wearable.GMS_CHECKIN_TIMEOUT_MIN,
@@ -944,8 +946,7 @@ public class SettingsBackupTest {
Settings.System.WEAR_ACCESSIBILITY_GESTURE_ENABLED_DURING_OOBE,
Settings.System.WEAR_TTS_PREWARM_ENABLED,
Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ,
- Settings.System.MULTI_AUDIO_FOCUS_ENABLED, // form-factor/OEM specific
- Settings.System.HEARING_DEVICE_LOCAL_AMBIENT_VOLUME // internal cache
+ Settings.System.MULTI_AUDIO_FOCUS_ENABLED // form-factor/OEM specific
);
if (!Flags.backUpSmoothDisplayAndForcePeakRefreshRate()) {
settings.add(Settings.System.MIN_REFRESH_RATE);
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index dafe38dc5c00..d1a22e8612d3 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -208,7 +208,9 @@ filegroup {
"tests/src/**/systemui/qs/tiles/DreamTileTest.java",
"tests/src/**/systemui/qs/FgsManagerControllerTest.java",
"tests/src/**/systemui/qs/QSPanelTest.kt",
+ "tests/src/**/systemui/reardisplay/RearDisplayCoreStartableTest.kt",
"tests/src/**/systemui/reardisplay/RearDisplayDialogControllerTest.java",
+ "tests/src/**/systemui/reardisplay/RearDisplayInnerDialogDelegateTest.kt",
"tests/src/**/systemui/statusbar/KeyboardShortcutListSearchTest.java",
"tests/src/**/systemui/statusbar/KeyboardShortcutsTest.java",
"tests/src/**/systemui/statusbar/KeyguardIndicationControllerWithCoroutinesTest.kt",
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 123f82393679..67666c3db81f 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -632,9 +632,9 @@ flag {
flag {
name: "status_bar_connected_displays"
- namespace: "systemui"
+ namespace: "lse_desktop_experience"
description: "Shows the status bar on connected displays"
- bug: "362720336"
+ bug: "379264862"
}
flag {
diff --git a/packages/SystemUI/compose/core/src/com/android/compose/theme/PlatformTheme.kt b/packages/SystemUI/compose/core/src/com/android/compose/theme/PlatformTheme.kt
index d31d7aa59489..71ec63c1666c 100644
--- a/packages/SystemUI/compose/core/src/com/android/compose/theme/PlatformTheme.kt
+++ b/packages/SystemUI/compose/core/src/com/android/compose/theme/PlatformTheme.kt
@@ -63,6 +63,9 @@ private fun platformColorScheme(isDarkTheme: Boolean, context: Context): ColorSc
return if (isDarkTheme) {
dynamicDarkColorScheme(context)
.copy(
+ inverseSurface = color(context, R.color.system_inverse_surface_dark),
+ inverseOnSurface = color(context, R.color.system_inverse_on_surface_dark),
+ inversePrimary = color(context, R.color.system_inverse_primary_dark),
error = color(context, R.color.system_error_dark),
onError = color(context, R.color.system_on_error_dark),
errorContainer = color(context, R.color.system_error_container_dark),
@@ -71,6 +74,9 @@ private fun platformColorScheme(isDarkTheme: Boolean, context: Context): ColorSc
} else {
dynamicLightColorScheme(context)
.copy(
+ inverseSurface = color(context, R.color.system_inverse_surface_light),
+ inverseOnSurface = color(context, R.color.system_inverse_on_surface_light),
+ inversePrimary = color(context, R.color.system_inverse_primary_light),
error = color(context, R.color.system_error_light),
onError = color(context, R.color.system_on_error_light),
errorContainer = color(context, R.color.system_error_container_light),
diff --git a/packages/SystemUI/compose/core/tests/src/com/android/compose/theme/PlatformThemeTest.kt b/packages/SystemUI/compose/core/tests/src/com/android/compose/theme/PlatformThemeTest.kt
index de021a0677cf..737853b88f7a 100644
--- a/packages/SystemUI/compose/core/tests/src/com/android/compose/theme/PlatformThemeTest.kt
+++ b/packages/SystemUI/compose/core/tests/src/com/android/compose/theme/PlatformThemeTest.kt
@@ -89,7 +89,7 @@ class PlatformThemeTest {
addValue(
"inversePrimary",
colorScheme.inversePrimary,
- R.attr.materialColorPrimaryInverse,
+ R.attr.materialColorInversePrimary,
)
addValue("secondary", colorScheme.secondary, R.attr.materialColorSecondary)
addValue("onSecondary", colorScheme.onSecondary, R.attr.materialColorOnSecondary)
@@ -131,12 +131,12 @@ class PlatformThemeTest {
addValue(
"inverseSurface",
colorScheme.inverseSurface,
- R.attr.materialColorSurfaceInverse,
+ R.attr.materialColorInverseSurface,
)
addValue(
"inverseOnSurface",
colorScheme.inverseOnSurface,
- R.attr.materialColorOnSurfaceInverse,
+ R.attr.materialColorInverseOnSurface,
)
addValue("error", colorScheme.error, R.attr.materialColorError)
addValue("onError", colorScheme.onError, R.attr.materialColorOnError)
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt
index 1551ca97a2e3..ef5e90bd7aad 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt
@@ -179,11 +179,18 @@ internal constructor(
val targetItem =
if (communalWidgetResizing()) {
state.layoutInfo.visibleItemsInfo.findLast { item ->
+ val lastVisibleItemIndex = state.layoutInfo.visibleItemsInfo.last().index
val itemBoundingBox = IntRect(item.offset, item.size)
draggingItemKey != item.key &&
contentListState.isItemEditable(item.index) &&
(draggingBoundingBox.contains(itemBoundingBox.center) ||
- itemBoundingBox.contains(draggingBoundingBox.center))
+ itemBoundingBox.contains(draggingBoundingBox.center)) &&
+ // If we swap with the last visible item, and that item doesn't fit
+ // in the gap created by moving the current item, then the current item
+ // will get placed after the last visible item. In this case, it gets
+ // placed outside of the viewport. We avoid this here, so the user
+ // has to scroll first before the swap can happen.
+ (item.index != lastVisibleItemIndex || item.span <= draggingItem.span)
}
} else {
state.layoutInfo.visibleItemsInfo
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/SingleShadeMeasurePolicy.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/SingleShadeMeasurePolicy.kt
index 352d29e21987..74896482be88 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/SingleShadeMeasurePolicy.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/SingleShadeMeasurePolicy.kt
@@ -25,7 +25,6 @@ import androidx.compose.ui.layout.Placeable
import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.offset
-import androidx.compose.ui.util.fastFirst
import androidx.compose.ui.util.fastFirstOrNull
import com.android.systemui.shade.ui.composable.SingleShadeMeasurePolicy.LayoutId
import kotlin.math.max
@@ -60,18 +59,20 @@ class SingleShadeMeasurePolicy(
val shadeHeaderPlaceable =
measurables
- .fastFirst { it.layoutId == LayoutId.ShadeHeader }
- .measure(constraintsWithCutout)
+ .fastFirstOrNull { it.layoutId == LayoutId.ShadeHeader }
+ ?.measure(constraintsWithCutout)
val mediaPlaceable =
measurables
.fastFirstOrNull { it.layoutId == LayoutId.Media }
?.measure(applyMediaConstraints(constraintsWithCutout, isMediaInRow))
val quickSettingsPlaceable =
measurables
- .fastFirst { it.layoutId == LayoutId.QuickSettings }
- .measure(constraintsWithCutout)
+ .fastFirstOrNull { it.layoutId == LayoutId.QuickSettings }
+ ?.measure(constraintsWithCutout)
val notificationsPlaceable =
- measurables.fastFirst { it.layoutId == LayoutId.Notifications }.measure(constraints)
+ measurables
+ .fastFirstOrNull { it.layoutId == LayoutId.Notifications }
+ ?.measure(constraints)
val notificationsTop =
calculateNotificationsTop(
@@ -84,23 +85,25 @@ class SingleShadeMeasurePolicy(
onNotificationsTopChanged(notificationsTop)
return layout(constraints.maxWidth, constraints.maxHeight) {
- shadeHeaderPlaceable.placeRelative(x = insetsLeft, y = insetsTop)
- quickSettingsPlaceable.placeRelative(
+ shadeHeaderPlaceable?.placeRelative(x = insetsLeft, y = insetsTop)
+ val statusBarHeaderHeight = shadeHeaderPlaceable?.height ?: 0
+ quickSettingsPlaceable?.placeRelative(
x = insetsLeft,
- y = insetsTop + shadeHeaderPlaceable.height,
+ y = insetsTop + statusBarHeaderHeight,
)
- if (mediaPlaceable != null)
+ if (mediaPlaceable != null) {
+ val quickSettingsHeight = quickSettingsPlaceable?.height ?: 0
+
if (isMediaInRow) {
// mediaPlaceable height ranges from 0 to qsHeight. We want it to be centered
// vertically when it's smaller than the QS
- val mediaCenteringOffset =
- (quickSettingsPlaceable.height - mediaPlaceable.height) / 2
+ val mediaCenteringOffset = (quickSettingsHeight - mediaPlaceable.height) / 2
mediaPlaceable.placeRelative(
x = insetsLeft + constraintsWithCutout.maxWidth / 2,
y =
insetsTop +
- shadeHeaderPlaceable.height +
+ statusBarHeaderHeight +
mediaCenteringOffset +
mediaOffset(),
zIndex = mediaZIndex(),
@@ -108,30 +111,34 @@ class SingleShadeMeasurePolicy(
} else {
mediaPlaceable.placeRelative(
x = insetsLeft,
- y = insetsTop + shadeHeaderPlaceable.height + quickSettingsPlaceable.height,
+ y = insetsTop + statusBarHeaderHeight + quickSettingsHeight,
zIndex = mediaZIndex(),
)
}
+ }
// Notifications don't need to accommodate for horizontal insets
- notificationsPlaceable.placeRelative(x = 0, y = notificationsTop)
+ notificationsPlaceable?.placeRelative(x = 0, y = notificationsTop)
}
}
private fun calculateNotificationsTop(
- statusBarHeaderPlaceable: Placeable,
- quickSettingsPlaceable: Placeable,
+ statusBarHeaderPlaceable: Placeable?,
+ quickSettingsPlaceable: Placeable?,
mediaPlaceable: Placeable?,
insetsTop: Int,
isMediaInRow: Boolean,
): Int {
val mediaHeight = mediaPlaceable?.height ?: 0
+ val statusBarHeaderHeight = statusBarHeaderPlaceable?.height ?: 0
+ val quickSettingsHeight = quickSettingsPlaceable?.height ?: 0
+
return insetsTop +
- statusBarHeaderPlaceable.height +
+ statusBarHeaderHeight +
if (isMediaInRow) {
- max(quickSettingsPlaceable.height, mediaHeight)
+ max(quickSettingsHeight, mediaHeight)
} else {
- quickSettingsPlaceable.height + mediaHeight
+ quickSettingsHeight + mediaHeight
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt b/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt
index 163f4b36f472..78e605601b76 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/SystemUIDialogFactoryExt.kt
@@ -307,6 +307,6 @@ private fun draggableTopPadding(): Dp {
private object DraggableBottomSheet {
val DefaultTopPadding = 64.dp
- val LargeScreenTopPadding = 72.dp
+ val LargeScreenTopPadding = 56.dp
val MaxWidth = 640.dp
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt
index 44f60cb6f0a6..eb2a01632095 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt
@@ -350,8 +350,7 @@ internal class ElementNode(
val placeInThisContent =
elementContentWhenIdle(
layoutImpl,
- currentState.currentScene,
- currentState.currentOverlays,
+ currentState,
isInContent = { it in element.stateByContent },
) == content.key
@@ -639,20 +638,11 @@ internal inline fun elementState(
internal inline fun elementContentWhenIdle(
layoutImpl: SceneTransitionLayoutImpl,
- idle: TransitionState.Idle,
- isInContent: (ContentKey) -> Boolean,
-): ContentKey {
- val currentScene = idle.currentScene
- val overlays = idle.currentOverlays
- return elementContentWhenIdle(layoutImpl, currentScene, overlays, isInContent)
-}
-
-private inline fun elementContentWhenIdle(
- layoutImpl: SceneTransitionLayoutImpl,
- currentScene: SceneKey,
- overlays: Set<OverlayKey>,
+ currentState: TransitionState,
isInContent: (ContentKey) -> Boolean,
): ContentKey {
+ val currentScene = currentState.currentScene
+ val overlays = currentState.currentOverlays
if (overlays.isEmpty()) {
return currentScene
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt
index c790ff03aef1..509a16c5a704 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MovableElement.kt
@@ -188,7 +188,9 @@ private fun shouldComposeMovableElement(
return when (
val elementState = movableElementState(element, layoutImpl.state.transitionStates)
) {
- null -> false
+ null ->
+ movableElementContentWhenIdle(layoutImpl, element, layoutImpl.state.transitionState) ==
+ content
is TransitionState.Idle ->
movableElementContentWhenIdle(layoutImpl, element, elementState) == content
is TransitionState.Transition -> {
@@ -217,7 +219,7 @@ private fun movableElementState(
private fun movableElementContentWhenIdle(
layoutImpl: SceneTransitionLayoutImpl,
element: MovableElementKey,
- elementState: TransitionState.Idle,
+ elementState: TransitionState,
): ContentKey {
val contents = element.contentPicker.contents
return elementContentWhenIdle(layoutImpl, elementState, isInContent = { contents.contains(it) })
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt
index 3bf2ed50b709..b3fd097946d0 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt
@@ -354,6 +354,7 @@ internal class MutableSceneTransitionLayoutStateImpl(
}
override suspend fun startTransition(transition: TransitionState.Transition, chain: Boolean) {
+ Log.i(TAG, "startTransition(transition=$transition, chain=$chain)")
checkThread()
// Prepare the transition before starting it. This is outside of the try/finally block on
@@ -486,6 +487,7 @@ internal class MutableSceneTransitionLayoutStateImpl(
return
}
+ Log.i(TAG, "finishTransition(transition=$transition)")
check(transitionStates.fastAll { it is TransitionState.Transition })
// Mark this transition as finished.
@@ -513,13 +515,10 @@ internal class MutableSceneTransitionLayoutStateImpl(
// If all transitions are finished, we are idle.
if (i == nStates) {
check(finishedTransitions.isEmpty())
- this.transitionStates =
- listOf(
- TransitionState.Idle(
- lastTransition.currentScene,
- lastTransition.currentOverlays,
- )
- )
+ val idle =
+ TransitionState.Idle(lastTransition.currentScene, lastTransition.currentOverlays)
+ Log.i(TAG, "all transitions finished. idle=$idle")
+ this.transitionStates = listOf(idle)
} else if (i > 0) {
this.transitionStates = transitionStates.subList(fromIndex = i, toIndex = nStates)
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/state/TransitionState.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/state/TransitionState.kt
index 33f015fe49d9..d66fe42084de 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/state/TransitionState.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/content/state/TransitionState.kt
@@ -90,6 +90,10 @@ sealed interface TransitionState {
// The set of overlays does not change in a [ChangeCurrentScene] transition.
return currentOverlaysWhenTransitionStarted
}
+
+ override fun toString(): String {
+ return "ChangeScene(fromScene=$fromScene, toScene=$toScene)"
+ }
}
/**
@@ -146,6 +150,12 @@ sealed interface TransitionState {
currentOverlaysWhenTransitionStarted - overlay
}
}
+
+ override fun toString(): String {
+ val isShowing = overlay == toContent
+ return "ShowOrHideOverlay(overlay=$overlay, fromOrToScene=$fromOrToScene, " +
+ "isShowing=$isShowing)"
+ }
}
/** We are transitioning from [fromOverlay] to [toOverlay]. */
@@ -194,6 +204,10 @@ sealed interface TransitionState {
add(include)
}
}
+
+ override fun toString(): String {
+ return "ReplaceOverlay(fromOverlay=$fromOverlay, toOverlay=$toOverlay)"
+ }
}
/**
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt
index 09b59394724d..b4c8ad7c3327 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MovableElementTest.kt
@@ -35,6 +35,7 @@ import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertIsNotDisplayed
import androidx.compose.ui.test.assertPositionInRootIsEqualTo
import androidx.compose.ui.test.hasParent
+import androidx.compose.ui.test.hasTestTag
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onAllNodesWithText
@@ -404,4 +405,40 @@ class MovableElementTest {
rule.waitForIdle()
rule.onNodeWithTag(fooParentInOverlayTag).assertSizeIsEqualTo(fooSize)
}
+
+ @Test
+ fun movableElementInOverlayShouldBeComposed() {
+ val fooKey = MovableElementKey("foo", contents = setOf(OverlayA))
+ val fooContentTag = "fooContentTag"
+
+ @Composable
+ fun ContentScope.MovableFoo(modifier: Modifier = Modifier) {
+ MovableElement(fooKey, modifier) {
+ content { Box(Modifier.testTag(fooContentTag).size(100.dp)) }
+ }
+ }
+
+ val state =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ initialScene = SceneA,
+ initialOverlays = setOf(OverlayA),
+ )
+ }
+
+ val scope =
+ rule.setContentAndCreateMainScope {
+ SceneTransitionLayout(state) {
+ scene(SceneA) { Box(Modifier.fillMaxSize()) }
+ overlay(OverlayA) { MovableFoo() }
+ overlay(OverlayB) { Box(Modifier.size(50.dp)) }
+ }
+ }
+
+ rule.onNode(hasTestTag(fooContentTag)).assertIsDisplayed().assertSizeIsEqualTo(100.dp)
+
+ // Show overlay B. This shouldn't have any impact on Foo that should still be composed in A.
+ scope.launch { state.startTransition(transition(SceneA, OverlayB)) }
+ rule.onNode(hasTestTag(fooContentTag)).assertIsDisplayed().assertSizeIsEqualTo(100.dp)
+ }
}
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
index 5317ac1dddcd..9bb92bc13416 100644
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt
@@ -67,11 +67,7 @@ class DefaultClockProvider(
val buffers = messageBuffers ?: ClockMessageBuffers(LogUtil.DEFAULT_MESSAGE_BUFFER)
val fontAxes = ClockFontAxis.merge(FlexClockController.FONT_AXES, settings.axes)
val clockSettings = settings.copy(axes = fontAxes.map { it.toSetting() })
- val typefaceCache =
- TypefaceCache(buffers.infraMessageBuffer) {
- // TODO(b/364680873): Move constant to config_clockFontFamily when shipping
- return@TypefaceCache Typeface.create("google-sans-flex-clock", Typeface.NORMAL)
- }
+ val typefaceCache = TypefaceCache(buffers.infraMessageBuffer) { FLEX_TYPEFACE }
FlexClockController(
ClockContext(
ctx,
@@ -131,6 +127,11 @@ class DefaultClockProvider(
ClockFontAxisSetting("slnt", 0f),
)
+ val FLEX_TYPEFACE by lazy {
+ // TODO(b/364680873): Move constant to config_clockFontFamily when shipping
+ Typeface.create("google-sans-flex-clock", Typeface.NORMAL)
+ }
+
val FLEX_DESIGN = run {
val largeLayer =
listOf(
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelTest.kt
index 7cdfb0eb2451..0f148f89e3c5 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelTest.kt
@@ -30,11 +30,11 @@ import com.android.systemui.common.shared.model.Icon
import com.android.systemui.common.shared.model.Text
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.haptics.slider.sliderHapticsViewModelFactory
-import com.android.systemui.kosmos.brightnessWarningToast
import com.android.systemui.kosmos.testScope
import com.android.systemui.lifecycle.activateIn
import com.android.systemui.res.R
import com.android.systemui.settings.brightness.domain.interactor.brightnessMirrorShowingInteractor
+import com.android.systemui.settings.brightness.ui.brightnessWarningToast
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractorTest.kt
new file mode 100644
index 000000000000..789178728f18
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractorTest.kt
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2024 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.domain.interactor
+
+import android.hardware.display.defaultDisplay
+import android.hardware.display.rearDisplay
+import android.view.Display
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.display.data.repository.DeviceStateRepository
+import com.android.systemui.display.data.repository.FakeDeviceStateRepository
+import com.android.systemui.display.data.repository.FakeDisplayRepository
+import com.android.systemui.kosmos.runTest
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.kosmos.useUnconfinedTestDispatcher
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.channels.Channel
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.test.TestScope
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.whenever
+
+/** atest RearDisplayStateInteractorTest */
+@RunWith(AndroidJUnit4::class)
+@SmallTest
+class RearDisplayStateInteractorTest : SysuiTestCase() {
+
+ private val kosmos = testKosmos().useUnconfinedTestDispatcher()
+ private val fakeDisplayRepository = FakeDisplayRepository()
+ private val fakeDeviceStateRepository = FakeDeviceStateRepository()
+ private val rearDisplayStateInteractor =
+ RearDisplayStateInteractorImpl(
+ fakeDisplayRepository,
+ fakeDeviceStateRepository,
+ kosmos.testDispatcher,
+ )
+ private val emissionTracker = EmissionTracker(rearDisplayStateInteractor, kosmos.testScope)
+
+ @Before
+ fun setup() {
+ whenever(kosmos.rearDisplay.flags).thenReturn(Display.FLAG_REAR)
+ }
+
+ @Test
+ fun enableRearDisplayWhenDisplayImmediatelyAvailable() =
+ kosmos.runTest {
+ emissionTracker.use { tracker ->
+ fakeDisplayRepository.addDisplay(kosmos.rearDisplay)
+ assertThat(tracker.enabledCount).isEqualTo(0)
+ fakeDeviceStateRepository.emit(
+ DeviceStateRepository.DeviceState.REAR_DISPLAY_OUTER_DEFAULT
+ )
+
+ assertThat(tracker.enabledCount).isEqualTo(1)
+ assertThat(tracker.lastDisplay).isEqualTo(kosmos.rearDisplay)
+ }
+ }
+
+ @Test
+ fun enableAndDisableRearDisplay() =
+ kosmos.runTest {
+ emissionTracker.use { tracker ->
+ // The fake FakeDeviceStateRepository will always start with state UNKNOWN, thus
+ // triggering one initial emission
+ assertThat(tracker.disabledCount).isEqualTo(1)
+
+ fakeDeviceStateRepository.emit(
+ DeviceStateRepository.DeviceState.REAR_DISPLAY_OUTER_DEFAULT
+ )
+
+ // Adding a non-rear display does not trigger an emission
+ fakeDisplayRepository.addDisplay(kosmos.defaultDisplay)
+ assertThat(tracker.enabledCount).isEqualTo(0)
+
+ // Adding a rear display triggers the emission
+ fakeDisplayRepository.addDisplay(kosmos.rearDisplay)
+ assertThat(tracker.enabledCount).isEqualTo(1)
+ assertThat(tracker.lastDisplay).isEqualTo(kosmos.rearDisplay)
+
+ fakeDeviceStateRepository.emit(DeviceStateRepository.DeviceState.UNFOLDED)
+ assertThat(tracker.disabledCount).isEqualTo(2)
+ }
+ }
+
+ @Test
+ fun enableRearDisplayShouldOnlyReactToFirstRearDisplay() =
+ kosmos.runTest {
+ emissionTracker.use { tracker ->
+ fakeDeviceStateRepository.emit(
+ DeviceStateRepository.DeviceState.REAR_DISPLAY_OUTER_DEFAULT
+ )
+
+ // Adding a rear display triggers the emission
+ fakeDisplayRepository.addDisplay(kosmos.rearDisplay)
+ assertThat(tracker.enabledCount).isEqualTo(1)
+
+ // Adding additional rear displays does not trigger additional emissions
+ fakeDisplayRepository.addDisplay(kosmos.rearDisplay)
+ assertThat(tracker.enabledCount).isEqualTo(1)
+ }
+ }
+
+ @Test
+ fun rearDisplayAddedWhenNoLongerInRdm() =
+ kosmos.runTest {
+ emissionTracker.use { tracker ->
+ fakeDeviceStateRepository.emit(
+ DeviceStateRepository.DeviceState.REAR_DISPLAY_OUTER_DEFAULT
+ )
+ fakeDeviceStateRepository.emit(DeviceStateRepository.DeviceState.UNFOLDED)
+
+ // Adding a rear display when no longer in the correct device state does not trigger
+ // an emission
+ fakeDisplayRepository.addDisplay(kosmos.rearDisplay)
+ assertThat(tracker.enabledCount).isEqualTo(0)
+ }
+ }
+
+ @Test
+ fun rearDisplayDisabledDoesNotSpam() =
+ kosmos.runTest {
+ emissionTracker.use { tracker ->
+ fakeDeviceStateRepository.emit(DeviceStateRepository.DeviceState.UNFOLDED)
+ assertThat(tracker.disabledCount).isEqualTo(1)
+
+ // No additional emission
+ fakeDeviceStateRepository.emit(DeviceStateRepository.DeviceState.FOLDED)
+ assertThat(tracker.disabledCount).isEqualTo(1)
+ }
+ }
+
+ class EmissionTracker(rearDisplayInteractor: RearDisplayStateInteractor, scope: TestScope) :
+ AutoCloseable {
+ var enabledCount = 0
+ var disabledCount = 0
+ var lastDisplay: Display? = null
+
+ val job: Job
+
+ init {
+ val channel = Channel<RearDisplayStateInteractor.State>(Channel.UNLIMITED)
+ job =
+ scope.launch {
+ rearDisplayInteractor.state.collect {
+ channel.send(it)
+ if (it is RearDisplayStateInteractor.State.Enabled) {
+ enabledCount++
+ lastDisplay = it.innerDisplay
+ }
+ if (it is RearDisplayStateInteractor.State.Disabled) {
+ disabledCount++
+ }
+ }
+ }
+ }
+
+ override fun close() {
+ job.cancel()
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepositoryTest.kt
index cc4c7c419a11..27b8c59a076d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepositoryTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepositoryTest.kt
@@ -18,13 +18,17 @@ package com.android.systemui.keyboard.shortcut.data.repository
import android.content.Context
import android.content.Context.INPUT_SERVICE
-import android.hardware.input.InputGestureData
-import android.hardware.input.InputGestureData.createKeyTrigger
-import android.hardware.input.KeyGestureEvent
import android.hardware.input.fakeInputManager
import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
-import android.view.KeyEvent
+import android.view.KeyEvent.KEYCODE_SLASH
+import android.view.KeyEvent.META_ALT_ON
+import android.view.KeyEvent.META_CAPS_LOCK_ON
+import android.view.KeyEvent.META_CTRL_ON
+import android.view.KeyEvent.META_FUNCTION_ON
+import android.view.KeyEvent.META_META_ON
+import android.view.KeyEvent.META_SHIFT_ON
+import android.view.KeyEvent.META_SYM_ON
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.hardware.input.Flags.FLAG_ENABLE_CUSTOMIZABLE_INPUT_GESTURES
@@ -32,17 +36,14 @@ import com.android.hardware.input.Flags.FLAG_USE_KEY_GESTURE_EVENT_HANDLER
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.keyboard.shortcut.customShortcutCategoriesRepository
-import com.android.systemui.keyboard.shortcut.shared.model.Shortcut
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategory
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.AppCategories
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.MultiTasking
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.System
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCommand
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.allCustomizableInputGesturesWithSimpleShortcutCombinations
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.customizableInputGestureWithUnknownKeyGestureType
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.expectedShortcutCategoriesWithSimpleShortcutCombination
+import com.android.systemui.keyboard.shortcut.shared.model.KeyCombination
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutKey
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutSubCategory
import com.android.systemui.keyboard.shortcut.shortcutHelperTestHelper
import com.android.systemui.kosmos.testScope
+import com.android.systemui.res.R
import com.android.systemui.settings.FakeUserTracker
import com.android.systemui.settings.userTracker
import com.android.systemui.testKosmos
@@ -83,7 +84,7 @@ class CustomShortcutCategoriesRepositoryTest : SysuiTestCase() {
whenever(
fakeInputManager.inputManager.getCustomInputGestures(/* filter= */ anyOrNull())
)
- .thenReturn(customizableInputGesturesWithSimpleShortcutCombinations)
+ .thenReturn(allCustomizableInputGesturesWithSimpleShortcutCombinations)
helper.toggle(deviceId = 123)
val categories by collectLastValue(repo.categories)
@@ -100,7 +101,7 @@ class CustomShortcutCategoriesRepositoryTest : SysuiTestCase() {
whenever(
fakeInputManager.inputManager.getCustomInputGestures(/* filter= */ anyOrNull())
)
- .thenReturn(customizableInputGesturesWithSimpleShortcutCombinations)
+ .thenReturn(allCustomizableInputGesturesWithSimpleShortcutCombinations)
helper.toggle(deviceId = 123)
val categories by collectLastValue(repo.categories)
@@ -125,167 +126,73 @@ class CustomShortcutCategoriesRepositoryTest : SysuiTestCase() {
}
}
- private fun simpleInputGestureData(
- keyCode: Int = KeyEvent.KEYCODE_A,
- modifiers: Int = KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON,
- keyGestureType: Int,
- ): InputGestureData {
- val builder = InputGestureData.Builder()
- builder.setKeyGestureType(keyGestureType)
- builder.setTrigger(createKeyTrigger(keyCode, modifiers))
- return builder.build()
+ @Test
+ fun pressedKeys_isEmptyByDefault() {
+ testScope.runTest {
+ val pressedKeys by collectLastValue(repo.pressedKeys)
+ assertThat(pressedKeys).isEmpty()
+
+ helper.toggle(deviceId = 123)
+ assertThat(pressedKeys).isEmpty()
+ }
}
- private fun simpleShortcutCategory(
- category: ShortcutCategoryType,
- subcategoryLabel: String,
- shortcutLabel: String,
- ): ShortcutCategory {
- return ShortcutCategory(
- type = category,
- subCategories =
- listOf(
- ShortcutSubCategory(
- label = subcategoryLabel,
- shortcuts = listOf(simpleShortcut(shortcutLabel)),
- )
- ),
- )
+ @Test
+ fun pressedKeys_recognizesAllSupportedModifiers() {
+ testScope.runTest {
+ helper.toggle(deviceId = 123)
+ val pressedKeys by collectLastValue(repo.pressedKeys)
+ repo.updateUserKeyCombination(
+ KeyCombination(modifiers = allSupportedModifiers, keyCode = null)
+ )
+
+ assertThat(pressedKeys)
+ .containsExactly(
+ ShortcutKey.Icon.ResIdIcon(R.drawable.ic_ksh_key_meta),
+ ShortcutKey.Text("Ctrl"),
+ ShortcutKey.Text("Fn"),
+ ShortcutKey.Text("Shift"),
+ ShortcutKey.Text("Alt"),
+ ShortcutKey.Text("Sym"),
+ )
+ }
}
- private fun simpleShortcut(label: String) =
- Shortcut(
- label = label,
- commands =
- listOf(
- ShortcutCommand(
- isCustom = true,
- keys =
- listOf(
- ShortcutKey.Text("Ctrl"),
- ShortcutKey.Text("Alt"),
- ShortcutKey.Text("A"),
- ),
- )
- ),
- )
+ @Test
+ fun pressedKeys_ignoresUnsupportedModifiers() {
+ testScope.runTest {
+ helper.toggle(deviceId = 123)
+ val pressedKeys by collectLastValue(repo.pressedKeys)
+ repo.updateUserKeyCombination(
+ KeyCombination(modifiers = META_CAPS_LOCK_ON, keyCode = null)
+ )
- private val customizableInputGestureWithUnknownKeyGestureType =
- // These key gesture events are currently not supported by shortcut helper customizer
- listOf(
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_GLOBAL_ACTIONS
- ),
- simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_MEDIA_KEY),
- )
+ assertThat(pressedKeys).isEmpty()
+ }
+ }
- private val expectedShortcutCategoriesWithSimpleShortcutCombination =
- listOf(
- simpleShortcutCategory(System, "System apps", "Open assistant"),
- simpleShortcutCategory(System, "System controls", "Go to home screen"),
- simpleShortcutCategory(System, "System apps", "Open settings"),
- simpleShortcutCategory(System, "System controls", "Lock screen"),
- simpleShortcutCategory(System, "System controls", "View notifications"),
- simpleShortcutCategory(System, "System apps", "Take a note"),
- simpleShortcutCategory(System, "System controls", "Take screenshot"),
- simpleShortcutCategory(System, "System controls", "Go back"),
- simpleShortcutCategory(
- MultiTasking,
- "Split screen",
- "Switch from split screen to full screen",
- ),
- simpleShortcutCategory(
- MultiTasking,
- "Split screen",
- "Use split screen with current app on the left",
- ),
- simpleShortcutCategory(
- MultiTasking,
- "Split screen",
- "Switch to app on left or above while using split screen",
- ),
- simpleShortcutCategory(
- MultiTasking,
- "Split screen",
- "Use split screen with current app on the right",
- ),
- simpleShortcutCategory(
- MultiTasking,
- "Split screen",
- "Switch to app on right or below while using split screen",
- ),
- simpleShortcutCategory(System, "System controls", "Show shortcuts"),
- simpleShortcutCategory(System, "System controls", "View recent apps"),
- simpleShortcutCategory(AppCategories, "Applications", "Calculator"),
- simpleShortcutCategory(AppCategories, "Applications", "Calendar"),
- simpleShortcutCategory(AppCategories, "Applications", "Browser"),
- simpleShortcutCategory(AppCategories, "Applications", "Contacts"),
- simpleShortcutCategory(AppCategories, "Applications", "Email"),
- simpleShortcutCategory(AppCategories, "Applications", "Maps"),
- simpleShortcutCategory(AppCategories, "Applications", "SMS"),
- simpleShortcutCategory(MultiTasking, "Recent apps", "Cycle forward through recent apps"),
- )
+ @Test
+ fun pressedKeys_assertCorrectConversion() {
+ testScope.runTest {
+ helper.toggle(deviceId = 123)
+ val pressedKeys by collectLastValue(repo.pressedKeys)
+ repo.updateUserKeyCombination(
+ KeyCombination(modifiers = META_META_ON, keyCode = KEYCODE_SLASH)
+ )
+
+ assertThat(pressedKeys)
+ .containsExactly(
+ ShortcutKey.Icon.ResIdIcon(R.drawable.ic_ksh_key_meta),
+ ShortcutKey.Text("/"),
+ )
+ }
+ }
- private val customizableInputGesturesWithSimpleShortcutCombinations =
- listOf(
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_ASSISTANT
- ),
- simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_HOME),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_SYSTEM_SETTINGS
- ),
- simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LOCK_SCREEN),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_NOTIFICATION_PANEL
- ),
- simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_OPEN_NOTES),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_TAKE_SCREENSHOT
- ),
- simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_BACK),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_MULTI_WINDOW_NAVIGATION
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_LEFT
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_LEFT
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_RIGHT
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_RIGHT
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_OPEN_SHORTCUT_HELPER
- ),
- simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_RECENT_APPS),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_CALCULATOR
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_CALENDAR
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_BROWSER
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_CONTACTS
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_EMAIL
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_MAPS
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_MESSAGING
- ),
- simpleInputGestureData(
- keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_RECENT_APPS_SWITCHER
- ),
- )
+ private val allSupportedModifiers =
+ META_META_ON or
+ META_CTRL_ON or
+ META_FUNCTION_ON or
+ META_SHIFT_ON or
+ META_ALT_ON or
+ META_SYM_ON
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt
index c9c39b3ebf66..a1e7ef4ac5a3 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt
@@ -16,11 +16,20 @@
package com.android.systemui.keyboard.shortcut.data.source
+import android.hardware.input.InputGestureData
+import android.hardware.input.InputGestureData.createKeyTrigger
+import android.hardware.input.KeyGestureEvent
import android.view.KeyEvent
import android.view.KeyboardShortcutGroup
import android.view.KeyboardShortcutInfo
+import com.android.systemui.keyboard.shortcut.shared.model.Shortcut
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategory
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.AppCategories
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.MultiTasking
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.System
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCommand
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutKey
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutSubCategory
import com.android.systemui.keyboard.shortcut.shared.model.shortcut
import com.android.systemui.res.R
@@ -64,6 +73,13 @@ object TestShortcuts {
}
}
+ private val goHomeShortcutInfo =
+ KeyboardShortcutInfo(
+ /* label = */ "Go to home screen",
+ /* keycode = */ KeyEvent.KEYCODE_B,
+ /* modifiers = */ KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON,
+ )
+
private val standardShortcutInfo1 =
KeyboardShortcutInfo(
/* label = */ "Standard shortcut 1",
@@ -79,6 +95,16 @@ object TestShortcuts {
}
}
+ private val customGoHomeShortcut =
+ shortcut("Go to home screen") {
+ command {
+ key("Ctrl")
+ key("Alt")
+ key("A")
+ isCustom(true)
+ }
+ }
+
private val standardShortcutInfo2 =
KeyboardShortcutInfo(
/* label = */ "Standard shortcut 2",
@@ -123,35 +149,38 @@ object TestShortcuts {
listOf(
shortcutInfoWithRepeatedLabel,
shortcutInfoWithRepeatedLabelAlternate,
- shortcutInfoWithRepeatedLabelSecondAlternate
- )
+ shortcutInfoWithRepeatedLabelSecondAlternate,
+ ),
)
private val subCategoryWithGroupedRepeatedShortcutLabels =
ShortcutSubCategory(
label = groupWithRepeatedShortcutLabels.label!!.toString(),
- shortcuts = listOf(shortcutWithGroupedRepeatedLabel)
+ shortcuts = listOf(shortcutWithGroupedRepeatedLabel),
)
private val groupWithStandardShortcutInfo =
KeyboardShortcutGroup("Standard group", listOf(standardShortcutInfo1))
+ val groupWithGoHomeShortcutInfo =
+ KeyboardShortcutGroup("System controls", listOf(goHomeShortcutInfo))
+
private val subCategoryWithStandardShortcut =
ShortcutSubCategory(
label = groupWithStandardShortcutInfo.label!!.toString(),
- shortcuts = listOf(standardShortcut1)
+ shortcuts = listOf(standardShortcut1),
)
private val groupWithOnlyUnsupportedModifierShortcut =
KeyboardShortcutGroup(
"Group with unsupported modifiers",
- listOf(shortcutInfoWithUnsupportedModifiers)
+ listOf(shortcutInfoWithUnsupportedModifiers),
)
private val groupWithSupportedAndUnsupportedModifierShortcut =
KeyboardShortcutGroup(
"Group with mix of supported and not supported modifiers",
- listOf(standardShortcutInfo3, shortcutInfoWithUnsupportedModifiers)
+ listOf(standardShortcutInfo3, shortcutInfoWithUnsupportedModifiers),
)
private val switchToNextLanguageShortcut =
@@ -174,19 +203,19 @@ object TestShortcuts {
private val subCategoryForInputLanguageSwitchShortcuts =
ShortcutSubCategory(
"Input",
- listOf(switchToNextLanguageShortcut, switchToPreviousLanguageShortcut)
+ listOf(switchToNextLanguageShortcut, switchToPreviousLanguageShortcut),
)
private val subCategoryWithUnsupportedShortcutsRemoved =
ShortcutSubCategory(
groupWithSupportedAndUnsupportedModifierShortcut.label!!.toString(),
- listOf(standardShortcut3)
+ listOf(standardShortcut3),
)
private val standardGroup1 =
KeyboardShortcutGroup(
"Standard group 1",
- listOf(standardShortcutInfo1, standardShortcutInfo2, standardShortcutInfo3)
+ listOf(standardShortcutInfo1, standardShortcutInfo2, standardShortcutInfo3),
)
private val standardPackageName1 = "standard.app.group1"
@@ -194,38 +223,63 @@ object TestShortcuts {
private val standardAppGroup1 =
KeyboardShortcutGroup(
"Standard app group 1",
- listOf(standardShortcutInfo1, standardShortcutInfo2, standardShortcutInfo3)
+ listOf(standardShortcutInfo1, standardShortcutInfo2, standardShortcutInfo3),
)
.apply { packageName = standardPackageName1 }
+ private val standardSystemAppSubcategoryWithCustomHomeShortcut =
+ ShortcutSubCategory("System controls", listOf(customGoHomeShortcut))
+
private val standardSubCategory1 =
ShortcutSubCategory(
standardGroup1.label!!.toString(),
- listOf(standardShortcut1, standardShortcut2, standardShortcut3)
+ listOf(standardShortcut1, standardShortcut2, standardShortcut3),
)
private val standardGroup2 =
KeyboardShortcutGroup(
"Standard group 2",
- listOf(standardShortcutInfo3, standardShortcutInfo2, standardShortcutInfo1)
+ listOf(standardShortcutInfo3, standardShortcutInfo2, standardShortcutInfo1),
)
private val standardSubCategory2 =
ShortcutSubCategory(
standardGroup2.label!!.toString(),
- listOf(standardShortcut3, standardShortcut2, standardShortcut1)
+ listOf(standardShortcut3, standardShortcut2, standardShortcut1),
)
private val standardGroup3 =
KeyboardShortcutGroup(
"Standard group 3",
- listOf(standardShortcutInfo2, standardShortcutInfo1)
+ listOf(standardShortcutInfo2, standardShortcutInfo1),
)
private val standardSubCategory3 =
ShortcutSubCategory(
standardGroup3.label!!.toString(),
- listOf(standardShortcut2, standardShortcut1)
+ listOf(standardShortcut2, standardShortcut1),
+ )
+
+ private val systemSubCategoryWithGoHomeShortcuts =
+ ShortcutSubCategory(
+ label = "System controls",
+ shortcuts =
+ listOf(
+ shortcut("Go to home screen") {
+ command {
+ key("Ctrl")
+ key("Alt")
+ key("B")
+ }
+ command {
+ key("Ctrl")
+ key("Alt")
+ key("A")
+ isCustom(true)
+ }
+ }
+ ),
)
+
val imeGroups = listOf(standardGroup1, standardGroup2, standardGroup3)
val imeCategory =
ShortcutCategory(
@@ -235,8 +289,8 @@ object TestShortcuts {
subCategoryForInputLanguageSwitchShortcuts,
standardSubCategory1,
standardSubCategory2,
- standardSubCategory3
- )
+ standardSubCategory3,
+ ),
)
val currentAppGroups = listOf(standardAppGroup1)
@@ -245,15 +299,33 @@ object TestShortcuts {
val systemGroups = listOf(standardGroup3, standardGroup2, standardGroup1)
val systemCategory =
ShortcutCategory(
- type = ShortcutCategoryType.System,
- subCategories = listOf(standardSubCategory3, standardSubCategory2, standardSubCategory1)
+ type = System,
+ subCategories = listOf(standardSubCategory3, standardSubCategory2, standardSubCategory1),
+ )
+
+ val systemCategoryWithMergedGoHomeShortcut =
+ ShortcutCategory(
+ type = System,
+ subCategories = listOf(systemSubCategoryWithGoHomeShortcuts),
+ )
+
+ val systemCategoryWithCustomHomeShortcut =
+ ShortcutCategory(
+ type = System,
+ subCategories =
+ listOf(
+ standardSubCategory3,
+ standardSubCategory2,
+ standardSubCategory1,
+ standardSystemAppSubcategoryWithCustomHomeShortcut,
+ ),
)
val multitaskingGroups = listOf(standardGroup2, standardGroup1)
val multitaskingCategory =
ShortcutCategory(
- type = ShortcutCategoryType.MultiTasking,
- subCategories = listOf(standardSubCategory2, standardSubCategory1)
+ type = MultiTasking,
+ subCategories = listOf(standardSubCategory2, standardSubCategory1),
)
val groupsWithDuplicateShortcutLabels =
@@ -266,14 +338,14 @@ object TestShortcuts {
listOf(
subCategoryForInputLanguageSwitchShortcuts,
subCategoryWithGroupedRepeatedShortcutLabels,
- subCategoryWithStandardShortcut
+ subCategoryWithStandardShortcut,
)
val groupsWithUnsupportedModifier =
listOf(
groupWithStandardShortcutInfo,
groupWithOnlyUnsupportedModifierShortcut,
- groupWithSupportedAndUnsupportedModifierShortcut
+ groupWithSupportedAndUnsupportedModifierShortcut,
)
val subCategoriesWithUnsupportedModifiersRemoved =
@@ -283,8 +355,174 @@ object TestShortcuts {
listOf(
subCategoryForInputLanguageSwitchShortcuts,
subCategoryWithStandardShortcut,
- subCategoryWithUnsupportedShortcutsRemoved
+ subCategoryWithUnsupportedShortcutsRemoved,
)
val groupsWithOnlyUnsupportedModifiers = listOf(groupWithOnlyUnsupportedModifierShortcut)
+
+ private fun simpleInputGestureData(
+ keyCode: Int = KeyEvent.KEYCODE_A,
+ modifiers: Int = KeyEvent.META_CTRL_ON or KeyEvent.META_ALT_ON,
+ keyGestureType: Int,
+ ): InputGestureData {
+ val builder = InputGestureData.Builder()
+ builder.setKeyGestureType(keyGestureType)
+ builder.setTrigger(createKeyTrigger(keyCode, modifiers))
+ return builder.build()
+ }
+
+ private fun simpleShortcutCategory(
+ category: ShortcutCategoryType,
+ subcategoryLabel: String,
+ shortcutLabel: String,
+ ): ShortcutCategory {
+ return ShortcutCategory(
+ type = category,
+ subCategories =
+ listOf(
+ ShortcutSubCategory(
+ label = subcategoryLabel,
+ shortcuts = listOf(simpleShortcut(shortcutLabel)),
+ )
+ ),
+ )
+ }
+
+ private fun simpleShortcut(label: String) =
+ Shortcut(
+ label = label,
+ commands =
+ listOf(
+ ShortcutCommand(
+ isCustom = true,
+ keys =
+ listOf(
+ ShortcutKey.Text("Ctrl"),
+ ShortcutKey.Text("Alt"),
+ ShortcutKey.Text("A"),
+ ),
+ )
+ ),
+ )
+
+ val customizableInputGestureWithUnknownKeyGestureType =
+ // These key gesture events are currently not supported by shortcut helper customizer
+ listOf(
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_GLOBAL_ACTIONS
+ ),
+ simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_MEDIA_KEY),
+ )
+
+ val expectedShortcutCategoriesWithSimpleShortcutCombination =
+ listOf(
+ simpleShortcutCategory(System, "System apps", "Open assistant"),
+ simpleShortcutCategory(System, "System controls", "Go to home screen"),
+ simpleShortcutCategory(System, "System apps", "Open settings"),
+ simpleShortcutCategory(System, "System controls", "Lock screen"),
+ simpleShortcutCategory(System, "System controls", "View notifications"),
+ simpleShortcutCategory(System, "System apps", "Take a note"),
+ simpleShortcutCategory(System, "System controls", "Take screenshot"),
+ simpleShortcutCategory(System, "System controls", "Go back"),
+ simpleShortcutCategory(
+ MultiTasking,
+ "Split screen",
+ "Switch from split screen to full screen",
+ ),
+ simpleShortcutCategory(
+ MultiTasking,
+ "Split screen",
+ "Use split screen with current app on the left",
+ ),
+ simpleShortcutCategory(
+ MultiTasking,
+ "Split screen",
+ "Switch to app on left or above while using split screen",
+ ),
+ simpleShortcutCategory(
+ MultiTasking,
+ "Split screen",
+ "Use split screen with current app on the right",
+ ),
+ simpleShortcutCategory(
+ MultiTasking,
+ "Split screen",
+ "Switch to app on right or below while using split screen",
+ ),
+ simpleShortcutCategory(System, "System controls", "Show shortcuts"),
+ simpleShortcutCategory(System, "System controls", "View recent apps"),
+ simpleShortcutCategory(AppCategories, "Applications", "Calculator"),
+ simpleShortcutCategory(AppCategories, "Applications", "Calendar"),
+ simpleShortcutCategory(AppCategories, "Applications", "Browser"),
+ simpleShortcutCategory(AppCategories, "Applications", "Contacts"),
+ simpleShortcutCategory(AppCategories, "Applications", "Email"),
+ simpleShortcutCategory(AppCategories, "Applications", "Maps"),
+ simpleShortcutCategory(AppCategories, "Applications", "SMS"),
+ simpleShortcutCategory(MultiTasking, "Recent apps", "Cycle forward through recent apps"),
+ )
+ val customInputGestureTypeHome =
+ simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_HOME)
+
+ val allCustomizableInputGesturesWithSimpleShortcutCombinations =
+ listOf(
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_ASSISTANT
+ ),
+ simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_HOME),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_SYSTEM_SETTINGS
+ ),
+ simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LOCK_SCREEN),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_NOTIFICATION_PANEL
+ ),
+ simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_OPEN_NOTES),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_TAKE_SCREENSHOT
+ ),
+ simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_BACK),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_MULTI_WINDOW_NAVIGATION
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_LEFT
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_LEFT
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_RIGHT
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_RIGHT
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_OPEN_SHORTCUT_HELPER
+ ),
+ simpleInputGestureData(keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_RECENT_APPS),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_CALCULATOR
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_CALENDAR
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_BROWSER
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_CONTACTS
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_EMAIL
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_MAPS
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_LAUNCH_DEFAULT_MESSAGING
+ ),
+ simpleInputGestureData(
+ keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_RECENT_APPS_SWITCHER
+ ),
+ )
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt
index 57c8b444b922..f7c77017e239 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt
@@ -16,12 +16,24 @@
package com.android.systemui.keyboard.shortcut.domain.interactor
+import android.content.Context
+import android.content.Context.INPUT_SERVICE
+import android.hardware.input.InputGestureData
+import android.hardware.input.fakeInputManager
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.Flags
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.keyboard.shortcut.data.source.FakeKeyboardShortcutGroupsSource
import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.allCustomizableInputGesturesWithSimpleShortcutCombinations
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.customInputGestureTypeHome
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.groupWithGoHomeShortcutInfo
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.systemCategoryWithCustomHomeShortcut
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts.systemCategoryWithMergedGoHomeShortcut
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategory
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.InputMethodEditor
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.MultiTasking
@@ -34,6 +46,8 @@ import com.android.systemui.keyboard.shortcut.shortcutHelperSystemShortcutsSourc
import com.android.systemui.keyboard.shortcut.shortcutHelperTestHelper
import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.kosmos.testScope
+import com.android.systemui.settings.FakeUserTracker
+import com.android.systemui.settings.userTracker
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -42,13 +56,18 @@ import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.kotlin.anyOrNull
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.whenever
@SmallTest
@RunWith(AndroidJUnit4::class)
class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
+ private val mockUserContext: Context = mock()
private val systemShortcutsSource = FakeKeyboardShortcutGroupsSource()
private val multitaskingShortcutsSource = FakeKeyboardShortcutGroupsSource()
+
@OptIn(ExperimentalCoroutinesApi::class)
private val kosmos =
testKosmos().also {
@@ -57,17 +76,23 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
it.shortcutHelperMultiTaskingShortcutsSource = multitaskingShortcutsSource
it.shortcutHelperAppCategoriesShortcutsSource = FakeKeyboardShortcutGroupsSource()
it.shortcutHelperCurrentAppShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.userTracker = FakeUserTracker(onCreateCurrentUserContext = { mockUserContext })
}
+ private val fakeInputManager = kosmos.fakeInputManager
private val testScope = kosmos.testScope
- private val interactor = kosmos.shortcutHelperCategoriesInteractor
+ private lateinit var interactor: ShortcutHelperCategoriesInteractor
private val helper = kosmos.shortcutHelperTestHelper
+ private val inter by lazy { kosmos.shortcutHelperCategoriesInteractor }
@Before
fun setShortcuts() {
+ interactor = kosmos.shortcutHelperCategoriesInteractor
helper.setImeShortcuts(TestShortcuts.imeGroups)
systemShortcutsSource.setGroups(TestShortcuts.systemGroups)
multitaskingShortcutsSource.setGroups(TestShortcuts.multitaskingGroups)
+ whenever(mockUserContext.getSystemService(INPUT_SERVICE))
+ .thenReturn(fakeInputManager.inputManager)
}
@Test
@@ -120,7 +145,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
ShortcutCategory(
type = InputMethodEditor,
subCategories =
- TestShortcuts.imeSubCategoriesWithGroupedDuplicatedShortcutLabels
+ TestShortcuts.imeSubCategoriesWithGroupedDuplicatedShortcutLabels,
),
)
.inOrder()
@@ -140,7 +165,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
ShortcutCategory(
type = System,
subCategories =
- TestShortcuts.subCategoriesWithGroupedDuplicatedShortcutLabels
+ TestShortcuts.subCategoriesWithGroupedDuplicatedShortcutLabels,
),
TestShortcuts.multitaskingCategory,
TestShortcuts.imeCategory,
@@ -163,7 +188,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
ShortcutCategory(
type = MultiTasking,
subCategories =
- TestShortcuts.subCategoriesWithGroupedDuplicatedShortcutLabels
+ TestShortcuts.subCategoriesWithGroupedDuplicatedShortcutLabels,
),
TestShortcuts.imeCategory,
)
@@ -185,7 +210,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
ShortcutCategory(
type = InputMethodEditor,
subCategories =
- TestShortcuts.imeSubCategoriesWithUnsupportedModifiersRemoved
+ TestShortcuts.imeSubCategoriesWithUnsupportedModifiersRemoved,
),
)
.inOrder()
@@ -203,7 +228,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
.containsExactly(
ShortcutCategory(
type = System,
- subCategories = TestShortcuts.subCategoriesWithUnsupportedModifiersRemoved
+ subCategories = TestShortcuts.subCategoriesWithUnsupportedModifiersRemoved,
),
TestShortcuts.multitaskingCategory,
TestShortcuts.imeCategory,
@@ -224,7 +249,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
TestShortcuts.systemCategory,
ShortcutCategory(
type = MultiTasking,
- subCategories = TestShortcuts.subCategoriesWithUnsupportedModifiersRemoved
+ subCategories = TestShortcuts.subCategoriesWithUnsupportedModifiersRemoved,
),
TestShortcuts.imeCategory,
)
@@ -240,10 +265,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
helper.showFromActivity()
assertThat(categories)
- .containsExactly(
- TestShortcuts.multitaskingCategory,
- TestShortcuts.imeCategory,
- )
+ .containsExactly(TestShortcuts.multitaskingCategory, TestShortcuts.imeCategory)
.inOrder()
}
@@ -256,10 +278,63 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
helper.showFromActivity()
assertThat(categories)
+ .containsExactly(TestShortcuts.systemCategory, TestShortcuts.imeCategory)
+ .inOrder()
+ }
+
+ @Test
+ @DisableFlags(Flags.FLAG_KEYBOARD_SHORTCUT_HELPER_SHORTCUT_CUSTOMIZER)
+ fun categories_excludesCustomShortcutsWhenFlagIsOff() {
+ testScope.runTest {
+ setCustomInputGestures(allCustomizableInputGesturesWithSimpleShortcutCombinations)
+ helper.showFromActivity()
+ val categories by collectLastValue(interactor.shortcutCategories)
+ assertThat(categories)
.containsExactly(
TestShortcuts.systemCategory,
+ TestShortcuts.multitaskingCategory,
+ TestShortcuts.imeCategory,
+ )
+ }
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYBOARD_SHORTCUT_HELPER_SHORTCUT_CUSTOMIZER)
+ fun categories_includesCustomShortcutsWhenFlagIsOn() {
+ testScope.runTest {
+ setCustomInputGestures(listOf(customInputGestureTypeHome))
+ helper.showFromActivity()
+ val categories by collectLastValue(interactor.shortcutCategories)
+ assertThat(categories)
+ .containsExactly(
+ systemCategoryWithCustomHomeShortcut,
+ TestShortcuts.multitaskingCategory,
+ TestShortcuts.imeCategory,
+ )
+ }
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYBOARD_SHORTCUT_HELPER_SHORTCUT_CUSTOMIZER)
+ fun categories_correctlyMergesDefaultAndCustomShortcutsOfSameType() {
+ testScope.runTest {
+ setCustomInputGestures(listOf(customInputGestureTypeHome))
+ systemShortcutsSource.setGroups(groupWithGoHomeShortcutInfo)
+ helper.showFromActivity()
+
+ val categories by collectLastValue(interactor.shortcutCategories)
+
+ assertThat(categories)
+ .containsExactly(
+ systemCategoryWithMergedGoHomeShortcut,
+ TestShortcuts.multitaskingCategory,
TestShortcuts.imeCategory,
)
- .inOrder()
}
+ }
+
+ private fun setCustomInputGestures(customInputGestures: List<InputGestureData>) {
+ whenever(fakeInputManager.inputManager.getCustomInputGestures(/* filter= */ anyOrNull()))
+ .thenReturn(customInputGestures)
+ }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperDialogStarterTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperDialogStarterTest.kt
index 1580ea5c1272..000024f9b814 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperDialogStarterTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperDialogStarterTest.kt
@@ -16,6 +16,9 @@
package com.android.systemui.keyboard.shortcut.ui
+import android.content.Context
+import android.content.Context.INPUT_SERVICE
+import android.hardware.input.fakeInputManager
import androidx.test.annotation.UiThreadTest
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
@@ -36,6 +39,8 @@ import com.android.systemui.kosmos.testCase
import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.kosmos.testScope
import com.android.systemui.plugins.activityStarter
+import com.android.systemui.settings.FakeUserTracker
+import com.android.systemui.settings.userTracker
import com.android.systemui.statusbar.phone.systemUIDialogFactory
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -44,6 +49,8 @@ import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.whenever
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@@ -52,7 +59,7 @@ class ShortcutHelperDialogStarterTest : SysuiTestCase() {
private val fakeSystemSource = FakeKeyboardShortcutGroupsSource()
private val fakeMultiTaskingSource = FakeKeyboardShortcutGroupsSource()
-
+ private val mockUserContext: Context = mock()
private val kosmos =
Kosmos().also {
it.testCase = this
@@ -62,8 +69,10 @@ class ShortcutHelperDialogStarterTest : SysuiTestCase() {
it.shortcutHelperAppCategoriesShortcutsSource = FakeKeyboardShortcutGroupsSource()
it.shortcutHelperInputShortcutsSource = FakeKeyboardShortcutGroupsSource()
it.shortcutHelperCurrentAppShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.userTracker = FakeUserTracker(onCreateCurrentUserContext = { mockUserContext })
}
+ private val inputManager = kosmos.fakeInputManager.inputManager
private val testScope = kosmos.testScope
private val testHelper = kosmos.shortcutHelperTestHelper
private val dialogFactory = kosmos.systemUIDialogFactory
@@ -85,6 +94,7 @@ class ShortcutHelperDialogStarterTest : SysuiTestCase() {
fun setUp() {
fakeSystemSource.setGroups(TestShortcuts.systemGroups)
fakeMultiTaskingSource.setGroups(TestShortcuts.multitaskingGroups)
+ whenever(mockUserContext.getSystemService(INPUT_SERVICE)).thenReturn(inputManager)
}
@Test
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt
index d94c97af6f14..c0db95f9e5d2 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt
@@ -34,6 +34,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteract
import com.android.systemui.keyguard.domain.interactor.KeyguardSmartspaceInteractor
import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardSmartspaceViewModel
+import com.android.systemui.res.R
import com.android.systemui.shared.R as sharedR
import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController
import com.android.systemui.util.mockito.any
@@ -68,6 +69,7 @@ class SmartspaceSectionTest : SysuiTestCase() {
private val clockShouldBeCentered = MutableStateFlow(false)
private val hasCustomWeatherDataDisplay = MutableStateFlow(false)
private val isWeatherVisibleFlow = MutableStateFlow(false)
+ private val isShadeLayoutWide = MutableStateFlow(false)
@Before
fun setup() {
@@ -80,7 +82,7 @@ class SmartspaceSectionTest : SysuiTestCase() {
keyguardSmartspaceInteractor,
lockscreenSmartspaceController,
keyguardUnlockAnimationController,
- blueprintInteractor
+ blueprintInteractor,
)
constraintLayout = ConstraintLayout(mContext)
whenever(lockscreenSmartspaceController.buildAndConnectView(any()))
@@ -93,6 +95,7 @@ class SmartspaceSectionTest : SysuiTestCase() {
whenever(keyguardClockViewModel.clockShouldBeCentered).thenReturn(clockShouldBeCentered)
whenever(keyguardSmartspaceViewModel.isSmartspaceEnabled).thenReturn(true)
whenever(keyguardSmartspaceViewModel.isWeatherVisible).thenReturn(isWeatherVisibleFlow)
+ whenever(keyguardSmartspaceViewModel.isShadeLayoutWide).thenReturn(isShadeLayoutWide)
constraintSet = ConstraintSet()
}
@@ -125,6 +128,26 @@ class SmartspaceSectionTest : SysuiTestCase() {
}
@Test
+ fun testConstraintsWhenShadeLayoutIsNotWide() {
+ underTest.addViews(constraintLayout)
+ underTest.applyConstraints(constraintSet)
+
+ val smartspaceConstraints = constraintSet.getConstraint(smartspaceView.id)
+ assertThat(smartspaceConstraints.layout.endToEnd).isEqualTo(ConstraintSet.PARENT_ID)
+ }
+
+ @Test
+ fun testConstraintsWhenShadeLayoutIsWide() {
+ isShadeLayoutWide.value = true
+
+ underTest.addViews(constraintLayout)
+ underTest.applyConstraints(constraintSet)
+
+ val smartspaceConstraints = constraintSet.getConstraint(smartspaceView.id)
+ assertThat(smartspaceConstraints.layout.endToEnd).isEqualTo(R.id.split_shade_guideline)
+ }
+
+ @Test
fun testConstraintsWhenNotHasCustomWeatherDataDisplay() {
whenever(keyguardSmartspaceViewModel.isDateWeatherDecoupled).thenReturn(true)
underTest.addViews(constraintLayout)
@@ -160,6 +183,7 @@ class SmartspaceSectionTest : SysuiTestCase() {
assertThat(constraintSet.getVisibility(weatherView.id)).isEqualTo(GONE)
assertThat(constraintSet.getVisibility(dateView.id)).isEqualTo(VISIBLE)
}
+
@Test
fun testCustomDateWeatherVisibility() {
hasCustomWeatherDataDisplay.value = true
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelTest.kt
index 0c3fcb3ef759..adce9d65cbe0 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelTest.kt
@@ -26,6 +26,7 @@ import com.android.systemui.keyguard.data.repository.keyguardSmartspaceRepositor
import com.android.systemui.keyguard.shared.model.ClockSize
import com.android.systemui.kosmos.testScope
import com.android.systemui.plugins.clocks.ClockController
+import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
@@ -96,4 +97,26 @@ class KeyguardSmartspaceViewModelTest : SysuiTestCase() {
assertThat(isWeatherVisible).isEqualTo(false)
}
+
+ @Test
+ fun isShadeLayoutWide_withConfigTrue_true() =
+ with(kosmos) {
+ testScope.runTest {
+ val isShadeLayoutWide by collectLastValue(underTest.isShadeLayoutWide)
+ shadeRepository.setShadeLayoutWide(true)
+
+ assertThat(isShadeLayoutWide).isTrue()
+ }
+ }
+
+ @Test
+ fun isShadeLayoutWide_withConfigFalse_false() =
+ with(kosmos) {
+ testScope.runTest {
+ val isShadeLayoutWide by collectLastValue(underTest.isShadeLayoutWide)
+ shadeRepository.setShadeLayoutWide(false)
+
+ assertThat(isShadeLayoutWide).isFalse()
+ }
+ }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
index 83f95eaf4cda..e9633f49f76d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerBaseTest.java
@@ -21,9 +21,6 @@ import static com.android.systemui.flags.SceneContainerFlagParameterizationKt.pa
import static com.google.common.truth.Truth.assertThat;
-import static kotlinx.coroutines.flow.FlowKt.asStateFlow;
-import static kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow;
-
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
@@ -39,6 +36,9 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import static kotlinx.coroutines.flow.FlowKt.asStateFlow;
+import static kotlinx.coroutines.flow.StateFlowKt.MutableStateFlow;
+
import android.content.res.Configuration;
import android.content.res.Resources;
import android.platform.test.annotations.DisableFlags;
@@ -70,9 +70,6 @@ import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController;
import com.android.systemui.util.animation.DisappearParameters;
-import kotlinx.coroutines.flow.MutableStateFlow;
-import kotlinx.coroutines.flow.StateFlow;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -88,6 +85,8 @@ import java.util.List;
import javax.inject.Provider;
+import kotlinx.coroutines.flow.MutableStateFlow;
+import kotlinx.coroutines.flow.StateFlow;
import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
import platform.test.runner.parameterized.Parameters;
@@ -232,6 +231,7 @@ public class QSPanelControllerBaseTest extends SysuiTestCase {
@After
public void tearDown() {
+ mController.destroy();
disallowTestableLooperAsMainThread();
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerTest.kt
index 02c5b5ad214c..96f6a622e2f3 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QSPanelControllerTest.kt
@@ -1,10 +1,10 @@
package com.android.systemui.qs
import android.content.res.Configuration
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
import android.testing.TestableResources
import android.view.ContextThemeWrapper
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
import com.android.internal.logging.MetricsLogger
import com.android.internal.logging.UiEventLogger
import com.android.systemui.SysuiTestCase
@@ -37,8 +37,8 @@ import org.mockito.Mockito.any
import org.mockito.Mockito.never
import org.mockito.Mockito.reset
import org.mockito.Mockito.verify
-import org.mockito.MockitoAnnotations
import org.mockito.Mockito.`when` as whenever
+import org.mockito.MockitoAnnotations
@SmallTest
@RunWith(AndroidJUnit4::class)
@@ -81,37 +81,39 @@ class QSPanelControllerTest : SysuiTestCase() {
setShouldUseSplitShade(false)
whenever(qsPanel.resources).thenReturn(testableResources.resources)
whenever(qsPanel.context)
- .thenReturn( ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings))
+ .thenReturn(ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings))
whenever(qsPanel.getOrCreateTileLayout()).thenReturn(pagedTileLayout)
whenever(statusBarKeyguardViewManager.isPrimaryBouncerInTransit()).thenReturn(false)
whenever(qsPanel.setListening(anyBoolean())).then {
whenever(qsPanel.isListening).thenReturn(it.getArgument(0))
}
- controller = QSPanelController(
- qsPanel,
- tunerService,
- qsHost,
- qsCustomizerController,
- /* usingMediaPlayer= */ usingMediaPlayer,
- mediaHost,
- qsTileRevealControllerFactory,
- dumpManager,
- metricsLogger,
- uiEventLogger,
- qsLogger,
- brightnessControllerFactory,
- brightnessSliderFactory,
- falsingManager,
- statusBarKeyguardViewManager,
- ResourcesSplitShadeStateController(),
- longPressEffectProvider,
- mediaCarouselInteractor,
- )
+ controller =
+ QSPanelController(
+ qsPanel,
+ tunerService,
+ qsHost,
+ qsCustomizerController,
+ /* usingMediaPlayer= */ usingMediaPlayer,
+ mediaHost,
+ qsTileRevealControllerFactory,
+ dumpManager,
+ metricsLogger,
+ uiEventLogger,
+ qsLogger,
+ brightnessControllerFactory,
+ brightnessSliderFactory,
+ falsingManager,
+ statusBarKeyguardViewManager,
+ ResourcesSplitShadeStateController(),
+ longPressEffectProvider,
+ mediaCarouselInteractor,
+ )
}
@After
fun tearDown() {
+ controller.destroy()
reset(mediaHost)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
index 369bb228494c..7880aceb53be 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/QuickQSPanelControllerTest.kt
@@ -34,6 +34,7 @@ import com.android.systemui.qs.logging.QSLogger
import com.android.systemui.res.R
import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
import com.android.systemui.util.leak.RotationUtils
+import javax.inject.Provider
import org.junit.After
import org.junit.Before
import org.junit.Test
@@ -45,9 +46,8 @@ import org.mockito.Mockito.any
import org.mockito.Mockito.reset
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
-import org.mockito.MockitoAnnotations
-import javax.inject.Provider
import org.mockito.Mockito.`when` as whenever
+import org.mockito.MockitoAnnotations
@SmallTest
@RunWith(AndroidJUnit4::class)
@@ -108,6 +108,7 @@ class QuickQSPanelControllerTest : SysuiTestCase() {
@After
fun tearDown() {
controller.onViewDetached()
+ controller.destroy()
}
@Test
@@ -184,7 +185,7 @@ class QuickQSPanelControllerTest : SysuiTestCase() {
dumpManager,
ResourcesSplitShadeStateController(),
longPressEffectProvider,
- mediaCarouselInteractor
+ mediaCarouselInteractor,
) {
private var rotation = RotationUtils.ROTATION_NONE
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/SettingsProxyTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/SettingsProxyTest.kt
index 2e6d0fc847bb..e25bf13c41f2 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/SettingsProxyTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/SettingsProxyTest.kt
@@ -27,7 +27,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.google.common.truth.Truth.assertThat
-import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestScope
@@ -57,7 +57,7 @@ class SettingsProxyTest : SysuiTestCase() {
@Before
fun setUp() {
testScope = TestScope(testDispatcher)
- mSettings = FakeSettingsProxy(testDispatcher)
+ mSettings = FakeSettingsProxy(testScope)
mContentObserver = object : ContentObserver(Handler(Looper.getMainLooper())) {}
}
@@ -92,7 +92,7 @@ class SettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserverSync(
TEST_SETTING,
notifyForDescendants = true,
- mContentObserver
+ mContentObserver,
)
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
@@ -104,7 +104,7 @@ class SettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserver(
TEST_SETTING,
notifyForDescendants = true,
- mContentObserver
+ mContentObserver,
)
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
@@ -116,7 +116,7 @@ class SettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserverAsync(
TEST_SETTING,
notifyForDescendants = true,
- mContentObserver
+ mContentObserver,
)
testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
@@ -154,7 +154,7 @@ class SettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserverSync(
TEST_SETTING_URI,
notifyForDescendants = true,
- mContentObserver
+ mContentObserver,
)
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
@@ -166,7 +166,7 @@ class SettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserver(
TEST_SETTING_URI,
notifyForDescendants = true,
- mContentObserver
+ mContentObserver,
)
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
@@ -178,7 +178,7 @@ class SettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserverAsync(
TEST_SETTING_URI,
notifyForDescendants = true,
- mContentObserver
+ mContentObserver,
)
testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
@@ -202,7 +202,7 @@ class SettingsProxyTest : SysuiTestCase() {
TEST_SETTING_URI,
false,
mContentObserver,
- it
+ it,
)
}
}
@@ -382,15 +382,15 @@ class SettingsProxyTest : SysuiTestCase() {
assertThat(mSettings.getFloat(TEST_SETTING, 2.5F)).isEqualTo(2.5F)
}
- private class FakeSettingsProxy(val testDispatcher: CoroutineDispatcher) : SettingsProxy {
+ private class FakeSettingsProxy(val testScope: CoroutineScope) : SettingsProxy {
private val mContentResolver = mock(ContentResolver::class.java)
private val settingToValueMap: MutableMap<String, String?> = mutableMapOf()
override fun getContentResolver() = mContentResolver
- override val backgroundDispatcher: CoroutineDispatcher
- get() = testDispatcher
+ override val settingsScope: CoroutineScope
+ get() = testScope
override fun getUriFor(name: String) =
Uri.parse(StringBuilder().append("content://settings/").append(name).toString())
@@ -408,7 +408,7 @@ class SettingsProxyTest : SysuiTestCase() {
name: String,
value: String?,
tag: String?,
- makeDefault: Boolean
+ makeDefault: Boolean,
): Boolean {
settingToValueMap[name] = value
return true
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt
index 00b8cd04bdaf..5787f7dfc61f 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt
@@ -28,7 +28,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.google.common.truth.Truth.assertThat
-import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.StandardTestDispatcher
@@ -36,7 +36,6 @@ import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.advanceUntilIdle
import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertThrows
-import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito.mock
@@ -51,14 +50,9 @@ class UserSettingsProxyTest : SysuiTestCase() {
private var userId = MAIN_USER_ID
private val testDispatcher = StandardTestDispatcher()
- private var mSettings: UserSettingsProxy = FakeUserSettingsProxy({ userId }, testDispatcher)
+ private val testScope = TestScope(testDispatcher)
+ private var mSettings: UserSettingsProxy = FakeUserSettingsProxy({ userId }, testScope)
private var mContentObserver = object : ContentObserver(Handler(Looper.getMainLooper())) {}
- private lateinit var testScope: TestScope
-
- @Before
- fun setUp() {
- testScope = TestScope(testDispatcher)
- }
@Test
fun registerContentObserverForUser_inputString_success() =
@@ -69,7 +63,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -82,7 +76,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -96,7 +90,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -107,14 +101,14 @@ class UserSettingsProxyTest : SysuiTestCase() {
TEST_SETTING,
notifyForDescendants = true,
mContentObserver,
- userId
+ userId,
)
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
eq(true),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -125,16 +119,14 @@ class UserSettingsProxyTest : SysuiTestCase() {
TEST_SETTING,
notifyForDescendants = true,
mContentObserver,
- userId
+ userId,
)
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
- eq(
- true,
- ),
+ eq(true),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -145,7 +137,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
TEST_SETTING,
notifyForDescendants = true,
mContentObserver,
- userId
+ userId,
)
testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
@@ -153,7 +145,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(true),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -166,7 +158,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -179,7 +171,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -189,7 +181,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserverForUserAsync(
TEST_SETTING_URI,
mContentObserver,
- userId
+ userId,
)
testScope.advanceUntilIdle()
@@ -198,7 +190,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -213,7 +205,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
TEST_SETTING_URI,
mContentObserver,
userId,
- runnable
+ runnable,
)
testScope.advanceUntilIdle()
assertThat(callbackCalled).isTrue()
@@ -226,14 +218,14 @@ class UserSettingsProxyTest : SysuiTestCase() {
TEST_SETTING_URI,
notifyForDescendants = true,
mContentObserver,
- userId
+ userId,
)
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
eq(true),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -244,14 +236,14 @@ class UserSettingsProxyTest : SysuiTestCase() {
TEST_SETTING_URI,
notifyForDescendants = true,
mContentObserver,
- userId
+ userId,
)
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
eq(true),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -262,7 +254,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
TEST_SETTING_URI,
notifyForDescendants = true,
mContentObserver,
- userId
+ userId,
)
testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
@@ -270,7 +262,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(true),
eq(mContentObserver),
- eq(MAIN_USER_ID)
+ eq(MAIN_USER_ID),
)
}
@@ -283,7 +275,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(0)
+ eq(0),
)
}
@@ -296,7 +288,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(0)
+ eq(0),
)
}
@@ -309,7 +301,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(0)
+ eq(0),
)
}
}
@@ -320,14 +312,14 @@ class UserSettingsProxyTest : SysuiTestCase() {
mSettings.registerContentObserverSync(
TEST_SETTING_URI,
notifyForDescendants = true,
- mContentObserver
+ mContentObserver,
)
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
eq(true),
eq(mContentObserver),
- eq(0)
+ eq(0),
)
}
@@ -340,7 +332,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(0)
+ eq(0),
)
}
@@ -354,7 +346,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(TEST_SETTING_URI),
eq(false),
eq(mContentObserver),
- eq(0)
+ eq(0),
)
}
}
@@ -557,7 +549,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
*/
private class FakeUserSettingsProxy(
override val currentUserProvider: SettingsProxy.CurrentUserIdProvider,
- val testDispatcher: CoroutineDispatcher
+ val testScope: CoroutineScope,
) : UserSettingsProxy {
private val mContentResolver = mock(ContentResolver::class.java)
@@ -569,8 +561,8 @@ class UserSettingsProxyTest : SysuiTestCase() {
override fun getUriFor(name: String) =
Uri.parse(StringBuilder().append(URI_PREFIX).append(name).toString())
- override val backgroundDispatcher: CoroutineDispatcher
- get() = testDispatcher
+ override val settingsScope: CoroutineScope
+ get() = testScope
override fun getStringForUser(name: String, userHandle: Int) =
userIdToSettingsValueMap[userHandle]?.get(name) ?: ""
@@ -578,7 +570,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
override fun putString(
name: String,
value: String?,
- overrideableByRestore: Boolean
+ overrideableByRestore: Boolean,
): Boolean {
userIdToSettingsValueMap[DEFAULT_USER_ID]?.put(name, value)
return true
@@ -588,7 +580,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
name: String,
value: String?,
tag: String?,
- makeDefault: Boolean
+ makeDefault: Boolean,
): Boolean {
putStringForUser(name, value, DEFAULT_USER_ID)
return true
@@ -605,7 +597,7 @@ class UserSettingsProxyTest : SysuiTestCase() {
tag: String?,
makeDefault: Boolean,
userHandle: Int,
- overrideableByRestore: Boolean
+ overrideableByRestore: Boolean,
): Boolean {
userIdToSettingsValueMap[userHandle]?.set(name, value)
return true
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java
index 191486786329..75f3386ed695 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java
@@ -23,6 +23,7 @@ import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -39,14 +40,13 @@ import android.media.IAudioService;
import android.media.session.MediaSession;
import android.os.Handler;
import android.os.Process;
-import android.platform.test.annotations.EnableFlags;
import android.testing.TestableLooper;
import android.view.accessibility.AccessibilityManager;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import com.android.settingslib.flags.Flags;
+import com.android.keyguard.TestScopeProvider;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.SysuiTestCaseExtKt;
import com.android.systemui.broadcast.BroadcastDispatcher;
@@ -64,6 +64,10 @@ import com.android.systemui.util.concurrency.ThreadFactory;
import com.android.systemui.util.kotlin.JavaAdapter;
import com.android.systemui.util.time.FakeSystemClock;
import com.android.systemui.volume.domain.interactor.AudioSharingInteractor;
+import com.android.systemui.volume.domain.interactor.FakeAudioSharingInteractor;
+import com.android.systemui.volume.shared.VolumeLogger;
+
+import kotlinx.coroutines.test.TestScope;
import org.junit.Before;
import org.junit.Test;
@@ -94,6 +98,9 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
private RingerModeLiveData mRingerModeInternalLiveData;
private final FakeThreadFactory mThreadFactory = new FakeThreadFactory(
new FakeExecutor(new FakeSystemClock()));
+ private final TestScope mTestScope = TestScopeProvider.getTestScope();
+ private final JavaAdapter mJavaAdapter = new JavaAdapter(mTestScope);
+ private FakeAudioSharingInteractor mFakeAudioSharingInteractor;
@Mock
private AudioManager mAudioManager;
@Mock
@@ -117,9 +124,7 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
@Mock
private DumpManager mDumpManager;
@Mock
- private AudioSharingInteractor mAudioSharingInteractor;
- @Mock
- private JavaAdapter mJavaAdapter;
+ private VolumeLogger mVolumeLogger;
@Before
@@ -136,6 +141,8 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
mCallback = mock(VolumeDialogControllerImpl.C.class);
mThreadFactory.setLooper(TestableLooper.get(this).getLooper());
+ mFakeAudioSharingInteractor = spy(new FakeAudioSharingInteractor());
+ mFakeAudioSharingInteractor.setAudioSharingVolumeBarAvailable(true);
mVolumeController =
new TestableVolumeDialogControllerImpl(
mContext,
@@ -155,8 +162,9 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
mUserTracker,
mDumpManager,
mCallback,
- mAudioSharingInteractor,
- mJavaAdapter);
+ mFakeAudioSharingInteractor,
+ mJavaAdapter,
+ mVolumeLogger);
mVolumeController.setEnableDialogs(true, true);
}
@@ -305,13 +313,13 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
}
@Test
- @EnableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
public void testSetStreamVolume_setSecondaryDeviceVolume() {
mVolumeController.setStreamVolume(
VolumeDialogControllerImpl.DYNAMIC_STREAM_BROADCAST, /* level= */ 100);
Objects.requireNonNull(TestableLooper.get(this)).processAllMessages();
+ mTestScope.getTestScheduler().advanceUntilIdle();
- verify(mAudioSharingInteractor).setStreamVolume(100);
+ verify(mFakeAudioSharingInteractor).setStreamVolume(100);
}
static class TestableVolumeDialogControllerImpl extends VolumeDialogControllerImpl {
@@ -336,7 +344,8 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
DumpManager dumpManager,
C callback,
AudioSharingInteractor audioSharingInteractor,
- JavaAdapter javaAdapter) {
+ JavaAdapter javaAdapter,
+ VolumeLogger volumeLogger) {
super(
context,
broadcastDispatcher,
@@ -355,7 +364,8 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
userTracker,
dumpManager,
audioSharingInteractor,
- javaAdapter);
+ javaAdapter,
+ volumeLogger);
mCallbacks = callback;
ArgumentCaptor<WakefulnessLifecycle.Observer> observerCaptor =
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTestKt.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTestKt.kt
index 76b7b8f946b4..a9c352df9a26 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTestKt.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/VolumeDialogControllerImplTestKt.kt
@@ -49,9 +49,10 @@ import com.android.systemui.testKosmos
import com.android.systemui.util.RingerModeLiveData
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.concurrency.FakeThreadFactory
+import com.android.systemui.util.kotlin.JavaAdapter
import com.android.systemui.util.time.fakeSystemClock
import com.android.systemui.volume.data.repository.audioRepository
-import com.android.systemui.volume.domain.interactor.audioSharingInteractor
+import com.android.systemui.volume.domain.interactor.FakeAudioSharingInteractor
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
@@ -76,6 +77,9 @@ class VolumeDialogControllerImplTestKt : SysuiTestCase() {
private val kosmos: Kosmos = testKosmos()
private val audioManager: AudioManager = mock {}
private val callbacks: VolumeDialogController.Callbacks = mock {}
+ private val javaAdapter: JavaAdapter = JavaAdapter(kosmos.testScope)
+ private val fakeAudioSharingInteractor: FakeAudioSharingInteractor =
+ FakeAudioSharingInteractor()
private lateinit var threadFactory: FakeThreadFactory
private lateinit var underTest: VolumeDialogControllerImpl
@@ -87,6 +91,8 @@ class VolumeDialogControllerImplTestKt : SysuiTestCase() {
threadFactory =
FakeThreadFactory(FakeExecutor(fakeSystemClock)).apply { setLooper(looper) }
broadcastDispatcherContext = testableContext
+ fakeAudioSharingInteractor.setAudioSharingVolumeBarAvailable(true)
+
underTest =
VolumeDialogControllerImpl(
applicationContext,
@@ -108,7 +114,8 @@ class VolumeDialogControllerImplTestKt : SysuiTestCase() {
activityManager,
mock { on { userContext }.thenReturn(applicationContext) },
dumpManager,
- audioSharingInteractor,
+ fakeAudioSharingInteractor,
+ javaAdapter,
mock {},
)
.apply {
@@ -129,6 +136,7 @@ class VolumeDialogControllerImplTestKt : SysuiTestCase() {
},
)
testableLooper.processAllMessages()
+ testScheduler.advanceUntilIdle()
verify(callbacks) { 1 * { onStateChanged(any()) } }
}
@@ -163,6 +171,7 @@ class VolumeDialogControllerImplTestKt : SysuiTestCase() {
emitVolumeChange(AudioManager.STREAM_SYSTEM, AudioManager.FLAG_SHOW_UI)
runCurrent()
TestableLooper.get(this@VolumeDialogControllerImplTestKt).processAllMessages()
+ testScheduler.advanceUntilIdle()
verify(callbacks) { 1 * { onShowRequested(any(), any(), any()) } }
}
diff --git a/packages/SystemUI/pods/com/android/systemui/util/settings/GlobalSettingsImpl.java b/packages/SystemUI/pods/com/android/systemui/util/settings/GlobalSettingsImpl.java
index d68501f69bc0..6b909529e33a 100644
--- a/packages/SystemUI/pods/com/android/systemui/util/settings/GlobalSettingsImpl.java
+++ b/packages/SystemUI/pods/com/android/systemui/util/settings/GlobalSettingsImpl.java
@@ -25,7 +25,7 @@ import android.provider.Settings;
import com.android.systemui.util.settings.SettingsSingleThreadBackground;
-import kotlinx.coroutines.CoroutineDispatcher;
+import kotlinx.coroutines.CoroutineScope;
import javax.inject.Inject;
@@ -33,13 +33,13 @@ import javax.inject.Inject;
@SuppressLint("StaticSettingsProvider")
class GlobalSettingsImpl implements GlobalSettings {
private final ContentResolver mContentResolver;
- private final CoroutineDispatcher mBgDispatcher;
+ private final CoroutineScope mSettingsScope;
@Inject
GlobalSettingsImpl(ContentResolver contentResolver,
- @SettingsSingleThreadBackground CoroutineDispatcher bgDispatcher) {
+ @SettingsSingleThreadBackground CoroutineScope settingsScope) {
mContentResolver = contentResolver;
- mBgDispatcher = bgDispatcher;
+ mSettingsScope = settingsScope;
}
@NonNull
@@ -56,8 +56,8 @@ class GlobalSettingsImpl implements GlobalSettings {
@NonNull
@Override
- public CoroutineDispatcher getBackgroundDispatcher() {
- return mBgDispatcher;
+ public CoroutineScope getSettingsScope() {
+ return mSettingsScope;
}
@Override
diff --git a/packages/SystemUI/pods/com/android/systemui/util/settings/SecureSettingsImpl.java b/packages/SystemUI/pods/com/android/systemui/util/settings/SecureSettingsImpl.java
index 211a6f48e475..ae89a5f021c2 100644
--- a/packages/SystemUI/pods/com/android/systemui/util/settings/SecureSettingsImpl.java
+++ b/packages/SystemUI/pods/com/android/systemui/util/settings/SecureSettingsImpl.java
@@ -23,23 +23,23 @@ import android.provider.Settings;
import com.android.systemui.util.settings.SettingsSingleThreadBackground;
-import kotlinx.coroutines.CoroutineDispatcher;
+import kotlinx.coroutines.CoroutineScope;
import javax.inject.Inject;
class SecureSettingsImpl implements SecureSettings {
private final ContentResolver mContentResolver;
private final CurrentUserIdProvider mCurrentUserProvider;
- private final CoroutineDispatcher mBgDispatcher;
+ private final CoroutineScope mSettingsScope;
@Inject
SecureSettingsImpl(
ContentResolver contentResolver,
CurrentUserIdProvider currentUserProvider,
- @SettingsSingleThreadBackground CoroutineDispatcher bgDispatcher) {
+ @SettingsSingleThreadBackground CoroutineScope settingsScope) {
mContentResolver = contentResolver;
mCurrentUserProvider = currentUserProvider;
- mBgDispatcher = bgDispatcher;
+ mSettingsScope = settingsScope;
}
@NonNull
@@ -62,8 +62,8 @@ class SecureSettingsImpl implements SecureSettings {
@NonNull
@Override
- public CoroutineDispatcher getBackgroundDispatcher() {
- return mBgDispatcher;
+ public CoroutineScope getSettingsScope() {
+ return mSettingsScope;
}
@Override
diff --git a/packages/SystemUI/pods/com/android/systemui/util/settings/SettingsProxy.kt b/packages/SystemUI/pods/com/android/systemui/util/settings/SettingsProxy.kt
index 5d0b0d55e1f6..154d3cc9eda1 100644
--- a/packages/SystemUI/pods/com/android/systemui/util/settings/SettingsProxy.kt
+++ b/packages/SystemUI/pods/com/android/systemui/util/settings/SettingsProxy.kt
@@ -23,10 +23,12 @@ import android.provider.Settings.SettingNotFoundException
import androidx.annotation.AnyThread
import androidx.annotation.WorkerThread
import com.android.app.tracing.TraceUtils.trace
-import com.android.systemui.coroutines.newTracingContext
+import com.android.app.tracing.coroutines.launchTraced as launch
+import com.android.app.tracing.coroutines.nameCoroutine
+import kotlin.coroutines.CoroutineContext
+import kotlin.coroutines.EmptyCoroutineContext
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
-import com.android.app.tracing.coroutines.launchTraced as launch
import kotlinx.coroutines.withContext
/**
@@ -47,11 +49,14 @@ interface SettingsProxy {
/** Returns the [ContentResolver] this instance was constructed with. */
fun getContentResolver(): ContentResolver
- /**
- * Returns the background [CoroutineDispatcher] that the async APIs will use for a specific
- * implementation.
- */
- val backgroundDispatcher: CoroutineDispatcher
+ /** Returns the [CoroutineScope] that the async APIs will use. */
+ val settingsScope: CoroutineScope
+
+ @OptIn(ExperimentalStdlibApi::class)
+ fun settingsDispatcherContext(name: String): CoroutineContext {
+ return (settingsScope.coroutineContext[CoroutineDispatcher] ?: EmptyCoroutineContext) +
+ nameCoroutine(name)
+ }
/**
* Construct the content URI for a particular name/value pair, useful for monitoring changes
@@ -82,7 +87,7 @@ interface SettingsProxy {
* wish to synchronize execution.
*/
suspend fun registerContentObserver(name: String, settingsObserver: ContentObserver) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserver-A")) {
registerContentObserverSync(getUriFor(name), settingsObserver)
}
}
@@ -94,7 +99,7 @@ interface SettingsProxy {
*/
@AnyThread
fun registerContentObserverAsync(name: String, settingsObserver: ContentObserver) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-A")).launch {
+ settingsScope.launch("registerContentObserverAsync-A") {
registerContentObserverSync(getUriFor(name), settingsObserver)
}
@@ -111,7 +116,7 @@ interface SettingsProxy {
settingsObserver: ContentObserver,
@WorkerThread registered: Runnable,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-B")).launch {
+ settingsScope.launch("registerContentObserverAsync-B") {
registerContentObserverSync(getUriFor(name), settingsObserver)
registered.run()
}
@@ -134,7 +139,9 @@ interface SettingsProxy {
* wish to synchronize execution.
*/
suspend fun registerContentObserver(uri: Uri, settingsObserver: ContentObserver) {
- withContext(backgroundDispatcher) { registerContentObserverSync(uri, settingsObserver) }
+ withContext(settingsDispatcherContext("registerContentObserver-B")) {
+ registerContentObserverSync(uri, settingsObserver)
+ }
}
/**
@@ -144,7 +151,7 @@ interface SettingsProxy {
*/
@AnyThread
fun registerContentObserverAsync(uri: Uri, settingsObserver: ContentObserver) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-C")).launch {
+ settingsScope.launch("registerContentObserverAsync-C") {
registerContentObserverSync(uri, settingsObserver)
}
@@ -161,7 +168,7 @@ interface SettingsProxy {
settingsObserver: ContentObserver,
@WorkerThread registered: Runnable,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-D")).launch {
+ settingsScope.launch("registerContentObserverAsync-D") {
registerContentObserverSync(uri, settingsObserver)
registered.run()
}
@@ -188,9 +195,9 @@ interface SettingsProxy {
suspend fun registerContentObserver(
name: String,
notifyForDescendants: Boolean,
- settingsObserver: ContentObserver
+ settingsObserver: ContentObserver,
) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserver-C")) {
registerContentObserverSync(getUriFor(name), notifyForDescendants, settingsObserver)
}
}
@@ -206,7 +213,7 @@ interface SettingsProxy {
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-E")).launch {
+ settingsScope.launch("registerContentObserverAsync-E") {
registerContentObserverSync(getUriFor(name), notifyForDescendants, settingsObserver)
}
@@ -224,7 +231,7 @@ interface SettingsProxy {
settingsObserver: ContentObserver,
@WorkerThread registered: Runnable,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-F")).launch {
+ settingsScope.launch("registerContentObserverAsync-F") {
registerContentObserverSync(getUriFor(name), notifyForDescendants, settingsObserver)
registered.run()
}
@@ -239,7 +246,7 @@ interface SettingsProxy {
fun registerContentObserverSync(
uri: Uri,
notifyForDescendants: Boolean,
- settingsObserver: ContentObserver
+ settingsObserver: ContentObserver,
) {
trace({ "SP#registerObserver#[$uri]" }) {
getContentResolver()
@@ -257,9 +264,9 @@ interface SettingsProxy {
suspend fun registerContentObserver(
uri: Uri,
notifyForDescendants: Boolean,
- settingsObserver: ContentObserver
+ settingsObserver: ContentObserver,
) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserver-D")) {
registerContentObserverSync(uri, notifyForDescendants, settingsObserver)
}
}
@@ -275,7 +282,7 @@ interface SettingsProxy {
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-G")).launch {
+ settingsScope.launch("registerContentObserverAsync-G") {
registerContentObserverSync(uri, notifyForDescendants, settingsObserver)
}
@@ -293,7 +300,7 @@ interface SettingsProxy {
settingsObserver: ContentObserver,
@WorkerThread registered: Runnable,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-H")).launch {
+ settingsScope.launch("registerContentObserverAsync-H") {
registerContentObserverSync(uri, notifyForDescendants, settingsObserver)
registered.run()
}
@@ -319,7 +326,9 @@ interface SettingsProxy {
* async block if they wish to synchronize execution.
*/
suspend fun unregisterContentObserver(settingsObserver: ContentObserver) {
- withContext(backgroundDispatcher) { unregisterContentObserverSync(settingsObserver) }
+ withContext(settingsDispatcherContext("unregisterContentObserver")) {
+ unregisterContentObserverSync(settingsObserver)
+ }
}
/**
@@ -330,7 +339,7 @@ interface SettingsProxy {
*/
@AnyThread
fun unregisterContentObserverAsync(settingsObserver: ContentObserver) =
- CoroutineScope(backgroundDispatcher + newTracingContext("SettingsProxy-I")).launch {
+ settingsScope.launch("unregisterContentObserverAsync") {
unregisterContentObserver(settingsObserver)
}
diff --git a/packages/SystemUI/pods/com/android/systemui/util/settings/SystemSettingsImpl.java b/packages/SystemUI/pods/com/android/systemui/util/settings/SystemSettingsImpl.java
index 1b3f74e0c983..65d1c276cbfa 100644
--- a/packages/SystemUI/pods/com/android/systemui/util/settings/SystemSettingsImpl.java
+++ b/packages/SystemUI/pods/com/android/systemui/util/settings/SystemSettingsImpl.java
@@ -23,22 +23,22 @@ import android.provider.Settings;
import com.android.systemui.util.settings.SettingsSingleThreadBackground;
-import kotlinx.coroutines.CoroutineDispatcher;
+import kotlinx.coroutines.CoroutineScope;
import javax.inject.Inject;
class SystemSettingsImpl implements SystemSettings {
private final ContentResolver mContentResolver;
private final CurrentUserIdProvider mCurrentUserProvider;
- private final CoroutineDispatcher mBgCoroutineDispatcher;
+ private final CoroutineScope mSettingsScope;
@Inject
SystemSettingsImpl(ContentResolver contentResolver,
CurrentUserIdProvider currentUserProvider,
- @SettingsSingleThreadBackground CoroutineDispatcher bgDispatcher) {
+ @SettingsSingleThreadBackground CoroutineScope settingsScope) {
mContentResolver = contentResolver;
mCurrentUserProvider = currentUserProvider;
- mBgCoroutineDispatcher = bgDispatcher;
+ mSettingsScope = settingsScope;
}
@NonNull
@@ -61,8 +61,8 @@ class SystemSettingsImpl implements SystemSettings {
@NonNull
@Override
- public CoroutineDispatcher getBackgroundDispatcher() {
- return mBgCoroutineDispatcher;
+ public CoroutineScope getSettingsScope() {
+ return mSettingsScope;
}
@Override
diff --git a/packages/SystemUI/pods/com/android/systemui/util/settings/UserSettingsProxy.kt b/packages/SystemUI/pods/com/android/systemui/util/settings/UserSettingsProxy.kt
index 4b03df6b0070..1a5517059ca4 100644
--- a/packages/SystemUI/pods/com/android/systemui/util/settings/UserSettingsProxy.kt
+++ b/packages/SystemUI/pods/com/android/systemui/util/settings/UserSettingsProxy.kt
@@ -23,13 +23,11 @@ import android.net.Uri
import android.os.UserHandle
import android.provider.Settings.SettingNotFoundException
import com.android.app.tracing.TraceUtils.trace
-import com.android.systemui.coroutines.newTracingContext
+import com.android.app.tracing.coroutines.launchTraced as launch
import com.android.systemui.util.settings.SettingsProxy.Companion.parseFloat
import com.android.systemui.util.settings.SettingsProxy.Companion.parseFloatOrThrow
import com.android.systemui.util.settings.SettingsProxy.Companion.parseLongOrThrow
import com.android.systemui.util.settings.SettingsProxy.Companion.parseLongOrUseDefault
-import kotlinx.coroutines.CoroutineScope
-import com.android.app.tracing.coroutines.launchTraced as launch
import kotlinx.coroutines.withContext
/**
@@ -73,13 +71,13 @@ interface UserSettingsProxy : SettingsProxy {
}
override suspend fun registerContentObserver(uri: Uri, settingsObserver: ContentObserver) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserver-A")) {
registerContentObserverForUserSync(uri, settingsObserver, userId)
}
}
override fun registerContentObserverAsync(uri: Uri, settingsObserver: ContentObserver) =
- CoroutineScope(backgroundDispatcher + newTracingContext("UserSettingsProxy-A")).launch {
+ settingsScope.launch("registerContentObserverAsync-A") {
registerContentObserverForUserSync(uri, settingsObserver, userId)
}
@@ -96,9 +94,9 @@ interface UserSettingsProxy : SettingsProxy {
override suspend fun registerContentObserver(
uri: Uri,
notifyForDescendants: Boolean,
- settingsObserver: ContentObserver
+ settingsObserver: ContentObserver,
) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserver-B")) {
registerContentObserverForUserSync(uri, notifyForDescendants, settingsObserver, userId)
}
}
@@ -113,7 +111,7 @@ interface UserSettingsProxy : SettingsProxy {
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("UserSettingsProxy-B")).launch {
+ settingsScope.launch("registerContentObserverAsync-B") {
registerContentObserverForUserSync(uri, notifyForDescendants, settingsObserver, userId)
}
@@ -126,7 +124,7 @@ interface UserSettingsProxy : SettingsProxy {
fun registerContentObserverForUserSync(
name: String,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
registerContentObserverForUserSync(getUriFor(name), settingsObserver, userHandle)
}
@@ -141,9 +139,9 @@ interface UserSettingsProxy : SettingsProxy {
suspend fun registerContentObserverForUser(
name: String,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserverForUser-A")) {
registerContentObserverForUserSync(name, settingsObserver, userHandle)
}
}
@@ -158,7 +156,7 @@ interface UserSettingsProxy : SettingsProxy {
settingsObserver: ContentObserver,
userHandle: Int,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("UserSettingsProxy-C")).launch {
+ settingsScope.launch("registerContentObserverForUserAsync-A") {
registerContentObserverForUserSync(getUriFor(name), settingsObserver, userHandle)
}
@@ -167,7 +165,7 @@ interface UserSettingsProxy : SettingsProxy {
fun registerContentObserverForUserSync(
uri: Uri,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
registerContentObserverForUserSync(uri, false, settingsObserver, userHandle)
}
@@ -182,9 +180,9 @@ interface UserSettingsProxy : SettingsProxy {
suspend fun registerContentObserverForUser(
uri: Uri,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserverForUser-B")) {
registerContentObserverForUserSync(uri, settingsObserver, userHandle)
}
}
@@ -199,7 +197,7 @@ interface UserSettingsProxy : SettingsProxy {
settingsObserver: ContentObserver,
userHandle: Int,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("UserSettingsProxy-D")).launch {
+ settingsScope.launch("registerContentObserverForUserAsync-B") {
registerContentObserverForUserSync(uri, settingsObserver, userHandle)
}
@@ -216,7 +214,7 @@ interface UserSettingsProxy : SettingsProxy {
userHandle: Int,
@WorkerThread registered: Runnable,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("UserSettingsProxy-E")).launch {
+ settingsScope.launch("registerContentObserverForUserAsync-C") {
registerContentObserverForUserSync(uri, settingsObserver, userHandle)
registered.run()
}
@@ -231,13 +229,13 @@ interface UserSettingsProxy : SettingsProxy {
name: String,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
registerContentObserverForUserSync(
getUriFor(name),
notifyForDescendants,
settingsObserver,
- userHandle
+ userHandle,
)
}
@@ -252,14 +250,14 @@ interface UserSettingsProxy : SettingsProxy {
name: String,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserverForUser-C")) {
registerContentObserverForUserSync(
name,
notifyForDescendants,
settingsObserver,
- userHandle
+ userHandle,
)
}
}
@@ -275,7 +273,7 @@ interface UserSettingsProxy : SettingsProxy {
settingsObserver: ContentObserver,
userHandle: Int,
) {
- CoroutineScope(backgroundDispatcher + newTracingContext("UserSettingsProxy-F")).launch {
+ settingsScope.launch("registerContentObserverForUserAsync-D") {
registerContentObserverForUserSync(
getUriFor(name),
notifyForDescendants,
@@ -291,7 +289,7 @@ interface UserSettingsProxy : SettingsProxy {
uri: Uri,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
trace({ "USP#registerObserver#[$uri]" }) {
getContentResolver()
@@ -299,7 +297,7 @@ interface UserSettingsProxy : SettingsProxy {
uri,
notifyForDescendants,
settingsObserver,
- getRealUserHandle(userHandle)
+ getRealUserHandle(userHandle),
)
Unit
}
@@ -316,14 +314,14 @@ interface UserSettingsProxy : SettingsProxy {
uri: Uri,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
- withContext(backgroundDispatcher) {
+ withContext(settingsDispatcherContext("registerContentObserverForUser-D")) {
registerContentObserverForUserSync(
uri,
notifyForDescendants,
settingsObserver,
- getRealUserHandle(userHandle)
+ getRealUserHandle(userHandle),
)
}
}
@@ -339,7 +337,7 @@ interface UserSettingsProxy : SettingsProxy {
settingsObserver: ContentObserver,
userHandle: Int,
) =
- CoroutineScope(backgroundDispatcher + newTracingContext("UserSettingsProxy-G")).launch {
+ settingsScope.launch("registerContentObserverForUserAsync-E") {
registerContentObserverForUserSync(
uri,
notifyForDescendants,
@@ -385,7 +383,7 @@ interface UserSettingsProxy : SettingsProxy {
tag: String?,
makeDefault: Boolean,
@UserIdInt userHandle: Int,
- overrideableByRestore: Boolean
+ overrideableByRestore: Boolean,
): Boolean
override fun getInt(name: String, default: Int): Int {
diff --git a/packages/SystemUI/res/layout/activity_rear_display_front_screen_on.xml b/packages/SystemUI/res/layout/activity_rear_display_front_screen_on.xml
new file mode 100644
index 000000000000..a8d4d2ece07f
--- /dev/null
+++ b/packages/SystemUI/res/layout/activity_rear_display_front_screen_on.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2024 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.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:paddingStart="@dimen/dialog_side_padding"
+ android:paddingEnd="@dimen/dialog_side_padding"
+ android:paddingTop="@dimen/dialog_top_padding"
+ android:paddingBottom="@dimen/dialog_bottom_padding">
+
+ <androidx.cardview.widget.CardView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:cardElevation="0dp"
+ app:cardCornerRadius="28dp"
+ app:cardBackgroundColor="@color/rear_display_overlay_animation_background_color">
+
+ <com.android.systemui.reardisplay.RearDisplayEducationLottieViewWrapper
+ android:id="@+id/rear_display_folded_animation"
+ android:importantForAccessibility="no"
+ android:layout_width="@dimen/rear_display_animation_width_opened"
+ android:layout_height="@dimen/rear_display_animation_height_opened"
+ android:layout_gravity="center"
+ android:contentDescription="@string/rear_display_accessibility_unfolded_animation"
+ android:scaleType="fitXY"
+ app:lottie_rawRes="@raw/rear_display_turnaround"
+ app:lottie_autoPlay="true"
+ app:lottie_repeatMode="reverse"/>
+ </androidx.cardview.widget.CardView>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/rear_display_unfolded_front_screen_on"
+ android:textAppearance="@style/TextAppearance.Dialog.Title"
+ android:lineSpacingExtra="2sp"
+ android:translationY="-1.24sp"
+ android:gravity="center_horizontal" />
+
+ <!-- Buttons -->
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_marginTop="36dp">
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"/>
+ <TextView
+ android:id="@+id/button_cancel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:layout_gravity="start"
+ android:text="@string/cancel"
+ style="@style/Widget.Dialog.Button.BorderButton" />
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
index a313833e2a66..4b2f45f87290 100644
--- a/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
+++ b/packages/SystemUI/res/layout/hybrid_conversation_notification.xml
@@ -27,12 +27,13 @@
android:layout_height="@dimen/conversation_single_line_face_pile_size"
android:paddingHorizontal="16dp"
>
- <ImageView
+ <com.android.internal.widget.CachingIconView
android:id="@*android:id/conversation_icon"
android:layout_width="@dimen/conversation_single_line_avatar_size"
android:layout_height="@dimen/conversation_single_line_avatar_size"
android:layout_gravity="center_vertical|end"
- />
+ android:scaleType="centerCrop"
+ />
<ViewStub
android:id="@*android:id/conversation_face_pile"
diff --git a/packages/SystemUI/res/layout/notification_2025_hybrid.xml b/packages/SystemUI/res/layout/notification_2025_hybrid.xml
new file mode 100644
index 000000000000..8c34cd4165e0
--- /dev/null
+++ b/packages/SystemUI/res/layout/notification_2025_hybrid.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2024 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
+ -->
+
+<!-- extends LinearLayout -->
+<com.android.systemui.statusbar.notification.row.HybridNotificationView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="bottom|start"
+ android:paddingStart="@*android:dimen/notification_2025_content_margin_start"
+ android:paddingEnd="12dp">
+ <TextView
+ android:id="@+id/notification_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"
+ android:paddingEnd="4dp"
+ />
+ <TextView
+ android:id="@+id/notification_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:paddingEnd="4dp"
+ style="@*android:style/Widget.DeviceDefault.Notification.Text"
+ />
+</com.android.systemui.statusbar.notification.row.HybridNotificationView> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/notification_2025_hybrid_conversation.xml b/packages/SystemUI/res/layout/notification_2025_hybrid_conversation.xml
new file mode 100644
index 000000000000..ff5d9d3567f6
--- /dev/null
+++ b/packages/SystemUI/res/layout/notification_2025_hybrid_conversation.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2024 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.
+ -->
+
+<!-- extends LinearLayout -->
+<com.android.systemui.statusbar.notification.row.HybridConversationNotificationView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical|start"
+ android:paddingStart="@*android:dimen/notification_2025_content_margin_start"
+ android:paddingEnd="12dp">
+
+ <FrameLayout
+ android:layout_width="@dimen/notification_2025_single_line_face_pile_size"
+ android:layout_height="@dimen/notification_2025_single_line_face_pile_size"
+ android:layout_marginEnd="8dp"
+ >
+ <ImageView
+ android:id="@*android:id/conversation_icon"
+ android:layout_width="@dimen/notification_2025_single_line_avatar_size"
+ android:layout_height="@dimen/notification_2025_single_line_avatar_size"
+ android:layout_gravity="center_vertical|end"
+ />
+
+ <ViewStub
+ android:id="@*android:id/conversation_face_pile"
+ android:layout="@*android:layout/conversation_face_pile_layout"
+ android:layout_width="@dimen/notification_2025_single_line_face_pile_size"
+ android:layout_height="@dimen/notification_2025_single_line_face_pile_size"
+ android:layout_gravity="center_vertical|end"
+ />
+ </FrameLayout>
+
+ <TextView
+ android:id="@+id/notification_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:paddingEnd="4dp"
+ android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Notification.Title"
+ />
+
+ <TextView
+ android:id="@+id/conversation_notification_sender"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:paddingEnd="4dp"
+ style="@*android:style/Widget.DeviceDefault.Notification.Text"
+ />
+
+ <TextView
+ android:id="@+id/notification_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:paddingEnd="4dp"
+ style="@*android:style/Widget.DeviceDefault.Notification.Text"
+ />
+</com.android.systemui.statusbar.notification.row.HybridConversationNotificationView>
diff --git a/packages/SystemUI/res/layout/ongoing_activity_chip.xml b/packages/SystemUI/res/layout/ongoing_activity_chip.xml
index d0a1ce8ae629..215e4e457060 100644
--- a/packages/SystemUI/res/layout/ongoing_activity_chip.xml
+++ b/packages/SystemUI/res/layout/ongoing_activity_chip.xml
@@ -55,9 +55,14 @@
/>
<!-- Shows generic text. -->
+ <!-- Since there's so little room in the status bar chip area, don't ellipsize the text and
+ instead just fade it out a bit at the end. -->
<TextView
android:id="@+id/ongoing_activity_chip_text"
style="@style/StatusBar.Chip.Text"
+ android:ellipsize="none"
+ android:requiresFadingEdge="horizontal"
+ android:fadingEdgeLength="@dimen/ongoing_activity_chip_text_fading_edge_length"
android:visibility="gone"
/>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 4954f9122788..580f6d302b37 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -788,6 +788,18 @@
<!-- Size of an avatar shown on one-line (children of a group) conversation notifications -->
<dimen name="conversation_single_line_avatar_size">24dp</dimen>
+ <!-- Size of the face pile shown on one-line (children of a group) conversation notifications
+ (2025 redesign version) -->
+ <dimen name="notification_2025_single_line_face_pile_size">16dp</dimen>
+
+ <!-- Size of the avatars within a face pile shown on one-line (children of a group) conversation
+ notifications (2025 redesign version) -->
+ <dimen name="notification_2025_single_line_face_pile_avatar_size">11dp</dimen>
+
+ <!-- Size of an avatar shown on one-line (children of a group) conversation notifications
+ (2025 redesign version) -->
+ <dimen name="notification_2025_single_line_avatar_size">16dp</dimen>
+
<!-- Border width for avatars in the face pile shown on one-line (children of a group) conversation notifications -->
<dimen name="conversation_single_line_face_pile_protection_width">1dp</dimen>
@@ -1749,6 +1761,7 @@
<dimen name="ongoing_activity_chip_icon_text_padding">4dp</dimen>
<!-- The end padding for the timer text view. Only used if an embedded padding icon is used. -->
<dimen name="ongoing_activity_chip_text_end_padding_for_embedded_padding_icon">6dp</dimen>
+ <dimen name="ongoing_activity_chip_text_fading_edge_length">12dp</dimen>
<dimen name="ongoing_activity_chip_corner_radius">28dp</dimen>
<!-- Status bar user chip -->
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index b45aaddef183..245ba0aca876 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -3568,6 +3568,8 @@
<string name="rear_display_accessibility_folded_animation">Foldable device being unfolded</string>
<!-- Text for education page content description for unfolded animation. [CHAR_LIMIT=NONE] -->
<string name="rear_display_accessibility_unfolded_animation">Foldable device being flipped around</string>
+ <!-- Text for a dialog telling the user that the front screen is turned on. [CHAR_LIMIT=NONE] -->
+ <string name="rear_display_unfolded_front_screen_on">Front screen turned on</string>
<!-- QuickSettings: Additional label for the auto-rotation quicksettings tile indicating that the setting corresponds to the folded posture for a foldable device [CHAR LIMIT=32] -->
<string name="quick_settings_rotation_posture_folded">folded</string>
diff --git a/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt b/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt
index 589dbf92de38..e862525623fe 100644
--- a/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/DisplayModule.kt
@@ -30,6 +30,8 @@ import com.android.systemui.display.data.repository.FocusedDisplayRepository
import com.android.systemui.display.data.repository.FocusedDisplayRepositoryImpl
import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractor
import com.android.systemui.display.domain.interactor.ConnectedDisplayInteractorImpl
+import com.android.systemui.display.domain.interactor.RearDisplayStateInteractor
+import com.android.systemui.display.domain.interactor.RearDisplayStateInteractorImpl
import com.android.systemui.statusbar.core.StatusBarConnectedDisplays
import dagger.Binds
import dagger.Lazy
@@ -46,6 +48,11 @@ interface DisplayModule {
provider: ConnectedDisplayInteractorImpl
): ConnectedDisplayInteractor
+ @Binds
+ fun bindRearDisplayStateInteractor(
+ provider: RearDisplayStateInteractorImpl
+ ): RearDisplayStateInteractor
+
@Binds fun bindsDisplayRepository(displayRepository: DisplayRepositoryImpl): DisplayRepository
@Binds
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
index 1da5351ac2a3..29044d017d2d 100644
--- a/packages/SystemUI/src/com/android/systemui/display/data/repository/DeviceStateRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/data/repository/DeviceStateRepository.kt
@@ -20,6 +20,7 @@ import android.content.Context
import android.hardware.devicestate.DeviceState as PlatformDeviceState
import android.hardware.devicestate.DeviceState.PROPERTY_FEATURE_DUAL_DISPLAY_INTERNAL_DEFAULT
import android.hardware.devicestate.DeviceState.PROPERTY_FEATURE_REAR_DISPLAY
+import android.hardware.devicestate.DeviceState.PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT
import android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY
import android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY
import android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_HARDWARE_CONFIGURATION_FOLD_IN_HALF_OPEN
@@ -49,6 +50,15 @@ interface DeviceStateRepository {
UNFOLDED,
/** Device state that corresponds to the device being in rear display mode */
REAR_DISPLAY,
+ /**
+ * Device state that corresponds to the device being in rear display mode with the inner
+ * display showing a system-provided affordance to cancel the mode.
+ *
+ * TODO(b/371095273): This state will be removed after the RDM_V2 flag lifecycle is complete
+ * at which point the REAR_DISPLAY state will be the will be the new and only rear display
+ * mode.
+ */
+ REAR_DISPLAY_OUTER_DEFAULT,
/** Device state in that corresponds to the device being in concurrent display mode */
CONCURRENT_DISPLAY,
/** Device state in none of the other arrays. */
@@ -62,7 +72,7 @@ constructor(
val context: Context,
val deviceStateManager: DeviceStateManager,
@Background bgScope: CoroutineScope,
- @Background executor: Executor
+ @Background executor: Executor,
) : DeviceStateRepository {
override val state: StateFlow<DeviceState> =
@@ -105,6 +115,12 @@ constructor(
*/
private fun PlatformDeviceState.toDeviceStateEnum(): DeviceState {
return when {
+ hasProperties(
+ PROPERTY_FEATURE_REAR_DISPLAY,
+ PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT,
+ ) -> {
+ DeviceState.REAR_DISPLAY_OUTER_DEFAULT
+ }
hasProperty(PROPERTY_FEATURE_REAR_DISPLAY) -> DeviceState.REAR_DISPLAY
hasProperty(PROPERTY_FEATURE_DUAL_DISPLAY_INTERNAL_DEFAULT) -> {
DeviceState.CONCURRENT_DISPLAY
@@ -112,7 +128,7 @@ constructor(
hasProperty(PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY) -> DeviceState.FOLDED
hasProperties(
PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY,
- PROPERTY_FOLDABLE_HARDWARE_CONFIGURATION_FOLD_IN_HALF_OPEN
+ PROPERTY_FOLDABLE_HARDWARE_CONFIGURATION_FOLD_IN_HALF_OPEN,
) -> DeviceState.HALF_FOLDED
hasProperty(PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY) -> {
DeviceState.UNFOLDED
diff --git a/packages/SystemUI/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractor.kt b/packages/SystemUI/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractor.kt
new file mode 100644
index 000000000000..b743377881bf
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/display/domain/interactor/RearDisplayStateInteractor.kt
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2024 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.domain.interactor
+
+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 javax.inject.Inject
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.combineTransform
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.flowOn
+
+/** Provides information about the status of Rear Display Mode. */
+interface RearDisplayStateInteractor {
+
+ /** A flow notifying the subscriber of Rear Display state changes */
+ val state: Flow<State>
+
+ sealed class State {
+ /** Indicates that the rear display is disabled */
+ data object Disabled : State()
+
+ /**
+ * Indicates that the device is in Rear Display Mode, and that the inner display is ready to
+ * show a system-provided affordance allowing the user to cancel out of the Rear Display
+ * Mode.
+ */
+ data class Enabled(val innerDisplay: Display) : State()
+ }
+}
+
+@SysUISingleton
+class RearDisplayStateInteractorImpl
+@Inject
+constructor(
+ displayRepository: DisplayRepository,
+ deviceStateRepository: DeviceStateRepository,
+ @Background backgroundCoroutineDispatcher: CoroutineDispatcher,
+) : RearDisplayStateInteractor {
+
+ override val state: Flow<RearDisplayStateInteractor.State> =
+ deviceStateRepository.state
+ .combineTransform(displayRepository.displays) { state, displays ->
+ val innerDisplay = displays.find { it.flags and Display.FLAG_REAR != 0 }
+
+ if (state != DeviceStateRepository.DeviceState.REAR_DISPLAY_OUTER_DEFAULT) {
+ emit(RearDisplayStateInteractor.State.Disabled)
+ } else if (innerDisplay != null) {
+ emit(RearDisplayStateInteractor.State.Enabled(innerDisplay))
+ }
+ }
+ .distinctUntilChanged()
+ .flowOn(backgroundCoroutineDispatcher)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
index 89fce4a70c6c..abc810afca98 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
@@ -469,9 +469,8 @@ public class DozeScreenBrightness extends BroadcastReceiver implements DozeMachi
|| posture >= mLightSensorOptional.length) {
return;
}
-
- final Sensor oldSensor = mLightSensorOptional[mDevicePosture].get();
- final Sensor newSensor = mLightSensorOptional[posture].get();
+ Sensor oldSensor = mLightSensorOptional[mDevicePosture].orElse(null);
+ Sensor newSensor = mLightSensorOptional[posture].orElse(null);
if (Objects.equals(oldSensor, newSensor)) {
mDevicePosture = posture;
// uses the same sensor for the new posture
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt
index 7b3380a6a608..1af7340ad7b4 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt
@@ -18,6 +18,9 @@ package com.android.systemui.keyboard.shortcut
import com.android.systemui.CoreStartable
import com.android.systemui.Flags.keyboardShortcutHelperRewrite
+import com.android.systemui.keyboard.shortcut.data.repository.CustomShortcutCategoriesRepository
+import com.android.systemui.keyboard.shortcut.data.repository.DefaultShortcutCategoriesRepository
+import com.android.systemui.keyboard.shortcut.data.repository.ShortcutCategoriesRepository
import com.android.systemui.keyboard.shortcut.data.repository.ShortcutHelperStateRepository
import com.android.systemui.keyboard.shortcut.data.source.AppCategoriesShortcutsSource
import com.android.systemui.keyboard.shortcut.data.source.CurrentAppShortcutsSource
@@ -27,6 +30,8 @@ import com.android.systemui.keyboard.shortcut.data.source.MultitaskingShortcutsS
import com.android.systemui.keyboard.shortcut.data.source.SystemShortcutsSource
import com.android.systemui.keyboard.shortcut.qualifiers.AppCategoriesShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.CurrentAppShortcuts
+import com.android.systemui.keyboard.shortcut.qualifiers.CustomShortcutCategories
+import com.android.systemui.keyboard.shortcut.qualifiers.DefaultShortcutCategories
import com.android.systemui.keyboard.shortcut.qualifiers.InputShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.MultitaskingShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.SystemShortcuts
@@ -63,6 +68,18 @@ interface ShortcutHelperModule {
impl: AppCategoriesShortcutsSource
): KeyboardShortcutGroupsSource
+ @Binds
+ @DefaultShortcutCategories
+ fun defaultShortcutCategoriesRepository(
+ impl: DefaultShortcutCategoriesRepository
+ ): ShortcutCategoriesRepository
+
+ @Binds
+ @CustomShortcutCategories
+ fun customShortcutCategoriesRepository(
+ impl: CustomShortcutCategoriesRepository
+ ): ShortcutCategoriesRepository
+
companion object {
@Provides
@IntoMap
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepository.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepository.kt
index ec1d358b6bd2..da5590ae27fa 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/CustomShortcutCategoriesRepository.kt
@@ -23,19 +23,24 @@ import android.hardware.input.InputGestureData.KeyTrigger
import android.hardware.input.InputManager
import android.hardware.input.InputSettings
import android.hardware.input.KeyGestureEvent
+import com.android.systemui.Flags.shortcutHelperKeyGlyph
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyboard.shortcut.data.model.InternalKeyboardShortcutGroup
import com.android.systemui.keyboard.shortcut.data.model.InternalKeyboardShortcutInfo
+import com.android.systemui.keyboard.shortcut.shared.model.KeyCombination
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategory
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutHelperState.Active
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutKey
import com.android.systemui.settings.UserTracker
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.withContext
@@ -60,6 +65,8 @@ constructor(
private val inputManager: InputManager
get() = userContext.getSystemService(INPUT_SERVICE) as InputManager
+ private val _selectedKeyCombination = MutableStateFlow<KeyCombination?>(null)
+
private val activeInputDevice =
stateRepository.state.map {
if (it is Active) {
@@ -69,6 +76,41 @@ constructor(
}
}
+ val pressedKeys =
+ _selectedKeyCombination
+ .combine(activeInputDevice) { keyCombination, inputDevice ->
+ if (inputDevice == null || keyCombination == null) {
+ return@combine emptyList()
+ } else {
+ val keyGlyphMap =
+ if (shortcutHelperKeyGlyph()) {
+ inputManager.getKeyGlyphMap(inputDevice.id)
+ } else null
+ val modifiers =
+ shortcutCategoriesUtils.toShortcutModifierKeys(
+ keyCombination.modifiers,
+ keyGlyphMap,
+ )
+ val triggerKey =
+ keyCombination.keyCode?.let {
+ shortcutCategoriesUtils.toShortcutKey(
+ keyGlyphMap,
+ inputDevice.keyCharacterMap,
+ keyCode = it,
+ )
+ }
+ val keys = mutableListOf<ShortcutKey>()
+ modifiers?.let { keys += it }
+ triggerKey?.let { keys += it }
+ return@combine keys
+ }
+ }
+ .stateIn(
+ scope = backgroundScope,
+ started = SharingStarted.Lazily,
+ initialValue = emptyList(),
+ )
+
override val categories: Flow<List<ShortcutCategory>> =
activeInputDevice
.map { inputDevice ->
@@ -104,6 +146,10 @@ constructor(
started = SharingStarted.Lazily,
)
+ fun updateUserKeyCombination(keyCombination: KeyCombination?) {
+ _selectedKeyCombination.value = keyCombination
+ }
+
private fun toInternalGroupSources(
inputGestures: List<InputGestureData>
): List<InternalGroupsSource> {
@@ -148,7 +194,7 @@ constructor(
private fun fetchGroupLabelByGestureType(
@KeyGestureEvent.KeyGestureType keyGestureType: Int
): String? {
- InputGestures.gestureToInternalKeyboardShortcutGroupLabelMap[keyGestureType]?.let {
+ InputGestures.gestureToInternalKeyboardShortcutGroupLabelResIdMap[keyGestureType]?.let {
return context.getString(it)
} ?: return null
}
@@ -156,7 +202,7 @@ constructor(
private fun fetchShortcutInfoLabelByGestureType(
@KeyGestureEvent.KeyGestureType keyGestureType: Int
): String? {
- InputGestures.gestureToInternalKeyboardShortcutInfoLabelMap[keyGestureType]?.let {
+ InputGestures.gestureToInternalKeyboardShortcutInfoLabelResIdMap[keyGestureType]?.let {
return context.getString(it)
} ?: return null
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/InputGestures.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/InputGestures.kt
index 90be9888e622..7bb294df98cd 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/InputGestures.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/InputGestures.kt
@@ -81,7 +81,7 @@ object InputGestures {
KEY_GESTURE_TYPE_LAUNCH_DEFAULT_MESSAGING to AppCategories,
)
- val gestureToInternalKeyboardShortcutGroupLabelMap =
+ val gestureToInternalKeyboardShortcutGroupLabelResIdMap =
mapOf(
// System Category
KEY_GESTURE_TYPE_HOME to R.string.shortcut_helper_category_system_controls,
@@ -129,7 +129,7 @@ object InputGestures {
R.string.keyboard_shortcut_group_applications,
)
- val gestureToInternalKeyboardShortcutInfoLabelMap =
+ val gestureToInternalKeyboardShortcutInfoLabelResIdMap =
mapOf(
// System Category
KEY_GESTURE_TYPE_HOME to R.string.group_system_access_home_screen,
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutCategoriesUtils.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutCategoriesUtils.kt
index 899fd15d6115..3988d1f155bd 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutCategoriesUtils.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutCategoriesUtils.kt
@@ -24,6 +24,7 @@ import android.util.Log
import android.view.InputDevice
import android.view.KeyCharacterMap
import android.view.KeyEvent
+import android.view.KeyEvent.META_META_ON
import com.android.systemui.Flags.shortcutHelperKeyGlyph
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyboard.shortcut.data.model.InternalKeyboardShortcutGroup
@@ -92,7 +93,7 @@ constructor(
}
.filter { it.shortcuts.isNotEmpty() }
return if (subCategories.isEmpty()) {
- Log.wtf(TAG, "Empty sub categories after converting $shortcutGroups")
+ Log.w(TAG, "Empty sub categories after converting $shortcutGroups")
null
} else {
ShortcutCategory(type, subCategories)
@@ -161,7 +162,7 @@ constructor(
}
if (remainingModifiers != 0) {
// There is a remaining modifier we don't support
- Log.wtf(TAG, "Unsupported modifiers remaining: $remainingModifiers")
+ Log.w(TAG, "Unsupported modifiers remaining: $remainingModifiers")
return null
}
if (info.keycode != 0 || info.baseCharacter > Char.MIN_VALUE) {
@@ -170,21 +171,32 @@ constructor(
?: return null
}
if (keys.isEmpty()) {
- Log.wtf(TAG, "No keys for $info")
+ Log.w(TAG, "No keys for $info")
return null
}
return ShortcutCommand(keys = keys, isCustom = info.isCustomShortcut)
}
+ fun toShortcutModifierKeys(modifiers: Int, keyGlyphMap: KeyGlyphMap?): List<ShortcutKey>? {
+ val keys: MutableList<ShortcutKey> = mutableListOf()
+ var remainingModifiers = modifiers
+ SUPPORTED_MODIFIERS.forEach { supportedModifier ->
+ if ((supportedModifier and remainingModifiers) != 0) {
+ keys += toShortcutModifierKey(keyGlyphMap, supportedModifier) ?: return null
+ remainingModifiers = remainingModifiers and supportedModifier.inv()
+ }
+ }
+ return keys
+ }
+
private fun toShortcutModifierKey(keyGlyphMap: KeyGlyphMap?, modifierMask: Int): ShortcutKey? {
val modifierDrawable = keyGlyphMap?.getDrawableForModifierState(context, modifierMask)
if (modifierDrawable != null) {
return ShortcutKey.Icon.DrawableIcon(drawable = modifierDrawable)
}
- val iconResId = ShortcutHelperKeys.keyIcons[modifierMask]
- if (iconResId != null) {
- return ShortcutKey.Icon.ResIdIcon(iconResId)
+ if (modifierMask == META_META_ON) {
+ return ShortcutKey.Icon.ResIdIcon(ShortcutHelperKeys.metaModifierIconResId)
}
val modifierLabel = ShortcutHelperKeys.modifierLabels[modifierMask]
@@ -195,7 +207,7 @@ constructor(
return null
}
- private fun toShortcutKey(
+ fun toShortcutKey(
keyGlyphMap: KeyGlyphMap?,
keyCharacterMap: KeyCharacterMap,
keyCode: Int,
@@ -222,7 +234,7 @@ constructor(
if (displayLabelCharacter.code != 0) {
return ShortcutKey.Text(displayLabelCharacter.toString())
}
- Log.wtf(TAG, "Couldn't find label or icon for key: $keyCode")
+ Log.w(TAG, "Couldn't find label or icon for key: $keyCode")
return null
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt
index 288efa275219..e47b33f8c37c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt
@@ -116,9 +116,10 @@ import com.android.systemui.res.R
object ShortcutHelperKeys {
+ val metaModifierIconResId = R.drawable.ic_ksh_key_meta
+
val keyIcons =
mapOf(
- META_META_ON to R.drawable.ic_ksh_key_meta,
KEYCODE_BACK to R.drawable.ic_arrow_back_2,
KEYCODE_HOME to R.drawable.ic_radio_button_unchecked,
KEYCODE_RECENT_APPS to R.drawable.ic_check_box_outline_blank,
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutCustomizationInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutCustomizationInteractor.kt
index 85d22144f201..aad55dc11c16 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutCustomizationInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutCustomizationInteractor.kt
@@ -16,13 +16,22 @@
package com.android.systemui.keyboard.shortcut.domain.interactor
-import android.view.KeyEvent.META_META_ON
+import com.android.systemui.keyboard.shortcut.data.repository.CustomShortcutCategoriesRepository
import com.android.systemui.keyboard.shortcut.data.repository.ShortcutHelperKeys
+import com.android.systemui.keyboard.shortcut.shared.model.KeyCombination
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutKey
import javax.inject.Inject
-class ShortcutCustomizationInteractor @Inject constructor() {
+class ShortcutCustomizationInteractor
+@Inject
+constructor(private val customShortcutRepository: CustomShortcutCategoriesRepository) {
+ val pressedKeys = customShortcutRepository.pressedKeys
+
+ fun updateUserSelectedKeyCombination(keyCombination: KeyCombination?) {
+ customShortcutRepository.updateUserKeyCombination(keyCombination)
+ }
+
fun getDefaultCustomShortcutModifierKey(): ShortcutKey.Icon.ResIdIcon {
- return ShortcutKey.Icon.ResIdIcon(ShortcutHelperKeys.keyIcons[META_META_ON]!!)
+ return ShortcutKey.Icon.ResIdIcon(ShortcutHelperKeys.metaModifierIconResId)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractor.kt
index 39fc27d35082..0381eaec5026 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractor.kt
@@ -16,37 +16,66 @@
package com.android.systemui.keyboard.shortcut.domain.interactor
+import com.android.systemui.Flags.keyboardShortcutHelperShortcutCustomizer
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.keyboard.shortcut.data.repository.DefaultShortcutCategoriesRepository
+import com.android.systemui.keyboard.shortcut.data.repository.ShortcutCategoriesRepository
+import com.android.systemui.keyboard.shortcut.qualifiers.CustomShortcutCategories
+import com.android.systemui.keyboard.shortcut.qualifiers.DefaultShortcutCategories
import com.android.systemui.keyboard.shortcut.shared.model.Shortcut
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategory
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutSubCategory
+import dagger.Lazy
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.flowOf
@SysUISingleton
class ShortcutHelperCategoriesInteractor
@Inject
-constructor(categoriesRepository: DefaultShortcutCategoriesRepository) {
-
+constructor(
+ @DefaultShortcutCategories defaultCategoriesRepository: ShortcutCategoriesRepository,
+ @CustomShortcutCategories customCategoriesRepositoryLazy: Lazy<ShortcutCategoriesRepository>,
+) {
val shortcutCategories: Flow<List<ShortcutCategory>> =
- categoriesRepository.categories.map { categories ->
- categories.map { category -> groupSubCategoriesInCategory(category) }
+ defaultCategoriesRepository.categories.combine(
+ if (keyboardShortcutHelperShortcutCustomizer()) {
+ customCategoriesRepositoryLazy.get().categories
+ } else {
+ flowOf(emptyList())
+ }
+ ) { defaultShortcutCategories, customShortcutCategories ->
+ groupCategories(defaultShortcutCategories + customShortcutCategories)
}
- private fun groupSubCategoriesInCategory(shortcutCategory: ShortcutCategory): ShortcutCategory {
- val subCategoriesWithGroupedShortcuts =
- shortcutCategory.subCategories.map {
+ private fun groupCategories(
+ shortcutCategories: List<ShortcutCategory>
+ ): List<ShortcutCategory> {
+ return shortcutCategories
+ .groupBy { it.type }
+ .entries
+ .map { (categoryType, groupedCategories) ->
+ ShortcutCategory(
+ type = categoryType,
+ subCategories =
+ groupSubCategories(groupedCategories.flatMap { it.subCategories }),
+ )
+ }
+ }
+
+ private fun groupSubCategories(
+ subCategories: List<ShortcutSubCategory>
+ ): List<ShortcutSubCategory> {
+ return subCategories
+ .groupBy { it.label }
+ .entries
+ .map { (label, groupedSubcategories) ->
ShortcutSubCategory(
- label = it.label,
- shortcuts = groupShortcutsInSubcategory(it.shortcuts),
+ label = label,
+ shortcuts =
+ groupShortcutsInSubcategory(groupedSubcategories.flatMap { it.shortcuts }),
)
}
- return ShortcutCategory(
- type = shortcutCategory.type,
- subCategories = subCategoriesWithGroupedShortcuts,
- )
}
private fun groupShortcutsInSubcategory(shortcuts: List<Shortcut>) =
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CustomShortcutCategories.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CustomShortcutCategories.kt
new file mode 100644
index 000000000000..8acb9eebbd4d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CustomShortcutCategories.kt
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2024 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.keyboard.shortcut.qualifiers
+
+import javax.inject.Qualifier
+
+@Qualifier annotation class CustomShortcutCategories
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/DefaultShortcutCategories.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/DefaultShortcutCategories.kt
new file mode 100644
index 000000000000..f94e10d17964
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/DefaultShortcutCategories.kt
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2024 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.keyboard.shortcut.qualifiers
+
+import javax.inject.Qualifier
+
+@Qualifier annotation class DefaultShortcutCategories
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/KeyCombination.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/KeyCombination.kt
new file mode 100644
index 000000000000..5e4031b29502
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/KeyCombination.kt
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2024 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.keyboard.shortcut.shared.model
+
+data class KeyCombination(val modifiers: Int, val keyCode: Int?)
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelper.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelper.kt
index 41e69297f7c6..b6b5d1716c79 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelper.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelper.kt
@@ -72,6 +72,7 @@ import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -90,15 +91,18 @@ import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.key.onKeyEvent
import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
+import androidx.compose.ui.semantics.isTraversalGroup
import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.withStyle
+import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@@ -377,15 +381,19 @@ private fun ShortcutHelperTwoPane(
Column(modifier = modifier.fillMaxSize().padding(horizontal = 24.dp)) {
Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) {
- Box(modifier = Modifier.padding(start = 202.dp).width(412.dp)) {
- TitleBar(isCustomizing)
- }
- Spacer(modifier = Modifier.weight(1f))
- if (isShortcutCustomizerFlagEnabled) {
- if (isCustomizing) {
- DoneButton(onClick = { isCustomizing = false })
+ // Keep title centered whether customize button is visible or not.
+ Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterEnd) {
+ Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
+ TitleBar(isCustomizing)
+ }
+ if (isShortcutCustomizerFlagEnabled) {
+ if (isCustomizing) {
+ DoneButton(onClick = { isCustomizing = false })
+ } else {
+ CustomizeButton(onClick = { isCustomizing = true })
+ }
} else {
- CustomizeButton(onClick = { isCustomizing = true })
+ Spacer(modifier = Modifier.width(if (isCustomizing) 69.dp else 133.dp))
}
}
}
@@ -393,7 +401,7 @@ private fun ShortcutHelperTwoPane(
Row(Modifier.fillMaxWidth()) {
StartSidePanel(
onSearchQueryChanged = onSearchQueryChanged,
- modifier = Modifier.width(240.dp),
+ modifier = Modifier.width(240.dp).semantics { isTraversalGroup = true },
categories = categories,
onKeyboardSettingsClicked = onKeyboardSettingsClicked,
selectedCategory = selectedCategoryType,
@@ -402,7 +410,7 @@ private fun ShortcutHelperTwoPane(
Spacer(modifier = Modifier.width(24.dp))
EndSidePanel(
searchQuery,
- Modifier.fillMaxSize().padding(top = 8.dp),
+ Modifier.fillMaxSize().padding(top = 8.dp).semantics { isTraversalGroup = true },
selectedCategory,
isCustomizing = isCustomizing,
onCustomizationRequested = onCustomizationRequested,
@@ -550,7 +558,7 @@ private fun Shortcut(
.padding(8.dp)
) {
Row(
- modifier = Modifier.width(128.dp).align(Alignment.CenterVertically),
+ modifier = Modifier.width(128.dp).align(Alignment.CenterVertically).weight(0.333f),
horizontalArrangement = Arrangement.spacedBy(16.dp),
verticalAlignment = Alignment.CenterVertically,
) {
@@ -561,7 +569,7 @@ private fun Shortcut(
}
Spacer(modifier = Modifier.width(24.dp))
ShortcutKeyCombinations(
- modifier = Modifier.weight(1f),
+ modifier = Modifier.weight(.666f),
shortcut = shortcut,
isCustomizing = isCustomizing,
onAddShortcutRequested = { onCustomizationRequested(shortcut.label) },
@@ -791,16 +799,25 @@ private fun StartSidePanel(
selectedCategory: ShortcutCategoryType?,
onCategoryClicked: (ShortcutCategoryUi) -> Unit,
) {
- Column(modifier) {
- ShortcutsSearchBar(onSearchQueryChanged)
- Spacer(modifier = Modifier.heightIn(8.dp))
- CategoriesPanelTwoPane(categories, selectedCategory, onCategoryClicked)
- Spacer(modifier = Modifier.weight(1f))
- KeyboardSettings(
- horizontalPadding = 24.dp,
- verticalPadding = 24.dp,
- onKeyboardSettingsClicked,
- )
+ CompositionLocalProvider(
+ // Restrict system font scale increases up to a max so categories display correctly.
+ LocalDensity provides
+ Density(
+ density = LocalDensity.current.density,
+ fontScale = LocalDensity.current.fontScale.coerceIn(1f, 1.5f),
+ )
+ ) {
+ Column(modifier) {
+ ShortcutsSearchBar(onSearchQueryChanged)
+ Spacer(modifier = Modifier.heightIn(8.dp))
+ CategoriesPanelTwoPane(categories, selectedCategory, onCategoryClicked)
+ Spacer(modifier = Modifier.weight(1f))
+ KeyboardSettings(
+ horizontalPadding = 24.dp,
+ verticalPadding = 24.dp,
+ onKeyboardSettingsClicked,
+ )
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelperUtils.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelperUtils.kt
index e295564a740f..f9904f6f62bc 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelperUtils.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelperUtils.kt
@@ -49,5 +49,5 @@ fun getWidth(): Dp {
object ShortcutHelperBottomSheet {
val DefaultWidth = 412.dp
val LargeScreenWidthPortrait = 704.dp
- val LargeScreenWidthLandscape = 864.dp
+ val LargeScreenWidthLandscape = 960.dp
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModel.kt
index 912bfe99cea8..08fd0af81006 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModel.kt
@@ -123,7 +123,7 @@ constructor(
userContext.packageManager.getApplicationIcon(type.packageName)
IconSource(painter = DrawablePainter(drawable = iconDrawable))
} catch (e: NameNotFoundException) {
- Log.wtf(
+ Log.w(
"ShortcutHelperViewModel",
"Package not found when retrieving icon for ${type.packageName}",
)
@@ -153,7 +153,7 @@ constructor(
packageManagerForUser.getApplicationInfo(type.packageName, /* flags= */ 0)
return packageManagerForUser.getApplicationLabel(currentAppInfo).toString()
} catch (e: NameNotFoundException) {
- Log.wtf(
+ Log.w(
"ShortcutHelperViewModel",
"Package Not found when retrieving Label for ${type.packageName}",
)
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt
index 283651dd9db7..9718e7508df2 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt
@@ -144,7 +144,7 @@ constructor(
.stateIn(
scope = applicationScope,
started = SharingStarted.WhileSubscribed(),
- initialValue = clockRegistry.createCurrentClock(),
+ initialValue = null,
)
override val previewClock: Flow<ClockController> =
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt
index 7ad2ec5e3bf8..d54d411b7de6 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt
@@ -124,7 +124,7 @@ constructor(
ConstraintSet.START,
ConstraintSet.PARENT_ID,
ConstraintSet.START,
- horizontalPaddingStart
+ horizontalPaddingStart,
)
// migrate addSmartspaceView from KeyguardClockSwitchController
@@ -135,15 +135,15 @@ constructor(
ConstraintSet.START,
ConstraintSet.PARENT_ID,
ConstraintSet.START,
- horizontalPaddingStart
+ horizontalPaddingStart,
)
connect(
sharedR.id.bc_smartspace_view,
ConstraintSet.END,
- if (keyguardClockViewModel.clockShouldBeCentered.value) ConstraintSet.PARENT_ID
- else R.id.split_shade_guideline,
+ if (keyguardSmartspaceViewModel.isShadeLayoutWide.value) R.id.split_shade_guideline
+ else ConstraintSet.PARENT_ID,
ConstraintSet.END,
- horizontalPaddingEnd
+ horizontalPaddingEnd,
)
if (keyguardClockViewModel.hasCustomWeatherDataDisplay.value) {
@@ -152,7 +152,7 @@ constructor(
sharedR.id.date_smartspace_view,
ConstraintSet.BOTTOM,
sharedR.id.bc_smartspace_view,
- ConstraintSet.TOP
+ ConstraintSet.TOP,
)
} else {
clear(sharedR.id.date_smartspace_view, ConstraintSet.BOTTOM)
@@ -160,13 +160,13 @@ constructor(
sharedR.id.date_smartspace_view,
ConstraintSet.TOP,
customR.id.lockscreen_clock_view,
- ConstraintSet.BOTTOM
+ ConstraintSet.BOTTOM,
)
connect(
sharedR.id.bc_smartspace_view,
ConstraintSet.TOP,
sharedR.id.date_smartspace_view,
- ConstraintSet.BOTTOM
+ ConstraintSet.BOTTOM,
)
}
@@ -174,10 +174,7 @@ constructor(
R.id.smart_space_barrier_bottom,
Barrier.BOTTOM,
0,
- *intArrayOf(
- sharedR.id.bc_smartspace_view,
- sharedR.id.date_smartspace_view,
- )
+ *intArrayOf(sharedR.id.bc_smartspace_view, sharedR.id.date_smartspace_view),
)
}
updateVisibility(constraintSet)
@@ -212,7 +209,7 @@ constructor(
setVisibility(sharedR.id.weather_smartspace_view, weatherVisibility)
setAlpha(
sharedR.id.weather_smartspace_view,
- if (weatherVisibility == View.VISIBLE) 1f else 0f
+ if (weatherVisibility == View.VISIBLE) 1f else 0f,
)
val dateVisibility =
if (keyguardClockViewModel.hasCustomWeatherDataDisplay.value) ConstraintSet.GONE
@@ -220,7 +217,7 @@ constructor(
setVisibility(sharedR.id.date_smartspace_view, dateVisibility)
setAlpha(
sharedR.id.date_smartspace_view,
- if (dateVisibility == ConstraintSet.VISIBLE) 1f else 0f
+ if (dateVisibility == ConstraintSet.VISIBLE) 1f else 0f,
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModel.kt
index de0927ec27cb..3266dc45427a 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModel.kt
@@ -22,6 +22,7 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.keyguard.domain.interactor.KeyguardSmartspaceInteractor
import com.android.systemui.res.R
+import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -39,6 +40,7 @@ constructor(
smartspaceController: LockscreenSmartspaceController,
keyguardClockViewModel: KeyguardClockViewModel,
smartspaceInteractor: KeyguardSmartspaceInteractor,
+ shadeInteractor: ShadeInteractor,
) {
/** Whether the smartspace section is available in the build. */
val isSmartspaceEnabled: Boolean = smartspaceController.isEnabled
@@ -89,6 +91,8 @@ constructor(
/* trigger clock and smartspace constraints change when smartspace appears */
val bcSmartspaceVisibility: StateFlow<Int> = smartspaceInteractor.bcSmartspaceVisibility
+ val isShadeLayoutWide: StateFlow<Boolean> = shadeInteractor.isShadeLayoutWide
+
companion object {
fun getSmartspaceStartMargin(context: Context): Int {
return context.resources.getDimensionPixelSize(R.dimen.below_clock_padding_start) +
diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
index 4c21da52db3a..8097d9585fb5 100644
--- a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
@@ -32,8 +32,6 @@ import com.android.systemui.plugins.clocks.ClockMessageBuffers;
import com.android.systemui.qs.QSFragmentLegacy;
import com.android.systemui.qs.pipeline.shared.QSPipelineFlagsRepository;
import com.android.systemui.qs.pipeline.shared.TileSpec;
-import com.android.systemui.statusbar.notification.NotifPipelineFlags;
-import com.android.systemui.util.Compile;
import com.android.systemui.util.wakelock.WakeLockLog;
import dagger.Lazy;
@@ -56,61 +54,6 @@ public class LogModule {
return factory.create("DozeLog", 150);
}
- /** Provides a logging buffer for all logs related to the data layer of notifications. */
- @Provides
- @SysUISingleton
- @NotificationLog
- public static LogBuffer provideNotificationsLogBuffer(
- LogBufferFactory factory,
- NotifPipelineFlags notifPipelineFlags) {
- int maxSize = 1000;
- if (Compile.IS_DEBUG && notifPipelineFlags.isDevLoggingEnabled()) {
- maxSize *= 10;
- }
- return factory.create("NotifLog", maxSize, Compile.IS_DEBUG /* systrace */);
- }
-
- /** Provides a logging buffer for all logs related to notifications on the lockscreen. */
- @Provides
- @SysUISingleton
- @NotificationLockscreenLog
- public static LogBuffer provideNotificationLockScreenLogBuffer(
- LogBufferFactory factory) {
- return factory.create("NotifLockscreenLog", 50, false /* systrace */);
- }
-
- /** Provides a logging buffer for logs related to heads up presentation of notifications. */
- @Provides
- @SysUISingleton
- @NotificationHeadsUpLog
- public static LogBuffer provideNotificationHeadsUpLogBuffer(LogBufferFactory factory) {
- return factory.create("NotifHeadsUpLog", 1000);
- }
-
- /** Provides a logging buffer for logs related to inflation of notifications. */
- @Provides
- @SysUISingleton
- @NotifInflationLog
- public static LogBuffer provideNotifInflationLogBuffer(LogBufferFactory factory) {
- return factory.create("NotifInflationLog", 250);
- }
-
- /** Provides a logging buffer for notification interruption calculations. */
- @Provides
- @SysUISingleton
- @NotificationInterruptLog
- public static LogBuffer provideNotificationInterruptLogBuffer(LogBufferFactory factory) {
- return factory.create("NotifInterruptLog", 100);
- }
-
- /** Provides a logging buffer for notification rendering events. */
- @Provides
- @SysUISingleton
- @NotificationRenderLog
- public static LogBuffer provideNotificationRenderLogBuffer(LogBufferFactory factory) {
- return factory.create("NotifRenderLog", 100);
- }
-
/** Provides a logging buffer for all logs for lockscreen to shade transition events. */
@Provides
@SysUISingleton
@@ -119,16 +62,6 @@ public class LogModule {
return factory.create("LSShadeTransitionLog", 50);
}
- /** */
- @Provides
- @SysUISingleton
- @SensitiveNotificationProtectionLog
- public static LogBuffer provideSensitiveNotificationProtectionLogBuffer(
- LogBufferFactory factory
- ) {
- return factory.create("SensitiveNotificationProtectionLog", 10);
- }
-
/** Provides a logging buffer for shade window messages. */
@Provides
@SysUISingleton
@@ -153,30 +86,6 @@ public class LogModule {
return factory.create("ShadeTouchLog", 500, false);
}
- /** Provides a logging buffer for all logs related to managing notification sections. */
- @Provides
- @SysUISingleton
- @NotificationSectionLog
- public static LogBuffer provideNotificationSectionLogBuffer(LogBufferFactory factory) {
- return factory.create("NotifSectionLog", 1000 /* maxSize */, false /* systrace */);
- }
-
- /** Provides a logging buffer for all logs related to remote input controller. */
- @Provides
- @SysUISingleton
- @NotificationRemoteInputLog
- public static LogBuffer provideNotificationRemoteInputLogBuffer(LogBufferFactory factory) {
- return factory.create("NotifRemoteInputLog", 50 /* maxSize */, false /* systrace */);
- }
-
- /** Provides a logging buffer for all logs related to notification visual stability. */
- @Provides
- @SysUISingleton
- @VisualStabilityLog
- public static LogBuffer provideVisualStabilityLogBuffer(LogBufferFactory factory) {
- return factory.create("VisualStabilityLog", 50 /* maxSize */, false /* systrace */);
- }
-
/** Provides a logging buffer for all logs related to keyguard media controller. */
@Provides
@SysUISingleton
@@ -185,22 +94,6 @@ public class LogModule {
return factory.create("KeyguardMediaControllerLog", 50 /* maxSize */, false /* systrace */);
}
- /** Provides a logging buffer for all logs related to unseen notifications. */
- @Provides
- @SysUISingleton
- @UnseenNotificationLog
- public static LogBuffer provideUnseenNotificationLogBuffer(LogBufferFactory factory) {
- return factory.create("UnseenNotifLog", 20 /* maxSize */, false /* systrace */);
- }
-
- /** Provides a logging buffer for all logs related to the data layer of notifications. */
- @Provides
- @SysUISingleton
- @NotifInteractionLog
- public static LogBuffer provideNotifInteractionLogBuffer(LogBufferFactory factory) {
- return factory.create("NotifInteractionLog", 50);
- }
-
/** Provides a logging buffer for all logs related to Quick Settings. */
@Provides
@SysUISingleton
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSHostAdapter.kt b/packages/SystemUI/src/com/android/systemui/qs/QSHostAdapter.kt
index 8b0694219630..0d464f5a0936 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSHostAdapter.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSHostAdapter.kt
@@ -28,6 +28,7 @@ import com.android.systemui.qs.pipeline.data.repository.TileSpecRepository.Compa
import com.android.systemui.qs.pipeline.domain.interactor.CurrentTilesInteractor
import com.android.systemui.qs.pipeline.shared.QSPipelineFlagsRepository
import com.android.systemui.qs.pipeline.shared.TileSpec
+import com.android.systemui.shade.ShadeDisplayAware
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
@@ -48,7 +49,7 @@ class QSHostAdapter
@Inject
constructor(
private val interactor: CurrentTilesInteractor,
- private val context: Context,
+ @ShadeDisplayAware private val context: Context,
private val tileServiceRequestControllerBuilder: TileServiceRequestController.Builder,
@Application private val scope: CoroutineScope,
dumpManager: DumpManager,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
index 85bcc25e140c..afb852ae824c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelControllerBase.java
@@ -50,6 +50,7 @@ import com.android.systemui.util.kotlin.JavaAdapterKt;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
+import kotlinx.coroutines.DisposableHandle;
import kotlinx.coroutines.flow.StateFlow;
import java.io.PrintWriter;
@@ -107,6 +108,8 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
setLayoutForMediaInScene();
};
+ private DisposableHandle mJavaAdapterDisposableHandle;
+
private boolean mLastListening;
@VisibleForTesting
@@ -221,6 +224,9 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
mView.removeTile(record);
}
mRecords.clear();
+ if (mJavaAdapterDisposableHandle != null) {
+ mJavaAdapterDisposableHandle.dispose();
+ }
}
@Override
@@ -255,7 +261,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
}
private void registerForMediaInteractorChanges() {
- JavaAdapterKt.collectFlow(
+ mJavaAdapterDisposableHandle = JavaAdapterKt.collectFlow(
mView,
getMediaVisibleFlow(),
mMediaOrRecommendationVisibleConsumer
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooterUtils.java b/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooterUtils.java
index d38f8492c883..88f0318c2fbf 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooterUtils.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooterUtils.java
@@ -87,6 +87,7 @@ import com.android.systemui.qs.footer.domain.model.SecurityButtonConfig;
import com.android.systemui.res.R;
import com.android.systemui.security.data.model.SecurityModel;
import com.android.systemui.settings.UserTracker;
+import com.android.systemui.shade.ShadeDisplayAware;
import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.SecurityController;
@@ -177,7 +178,7 @@ public class QSSecurityFooterUtils implements DialogInterface.OnClickListener {
@Inject
QSSecurityFooterUtils(
- @Application Context context, DevicePolicyManager devicePolicyManager,
+ @ShadeDisplayAware Context context, DevicePolicyManager devicePolicyManager,
UserTracker userTracker, @Main Handler mainHandler, ActivityStarter activityStarter,
SecurityController securityController, @Background Looper bgLooper,
DialogTransitionAnimator dialogTransitionAnimator) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/composefragment/dagger/QSFragmentComposeModule.kt b/packages/SystemUI/src/com/android/systemui/qs/composefragment/dagger/QSFragmentComposeModule.kt
index 676f6a426264..2ec729223a8d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/composefragment/dagger/QSFragmentComposeModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/composefragment/dagger/QSFragmentComposeModule.kt
@@ -20,6 +20,7 @@ import android.content.Context
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.qs.flags.QSComposeFragment
+import com.android.systemui.shade.ShadeDisplayAware
import com.android.systemui.util.Utils
import dagger.Module
import dagger.Provides
@@ -34,7 +35,7 @@ interface QSFragmentComposeModule {
@Provides
@SysUISingleton
@Named(QS_USING_MEDIA_PLAYER)
- fun providesUsingMedia(@Application context: Context): Boolean {
+ fun providesUsingMedia(@ShadeDisplayAware context: Context): Boolean {
return QSComposeFragment.isEnabled && Utils.useQsMediaPlayer(context)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
index 89f85ab14dd6..15e34990e111 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -43,6 +43,7 @@ import com.android.systemui.qs.external.CustomTile;
import com.android.systemui.qs.tileimpl.QSTileImpl.DrawableIcon;
import com.android.systemui.res.R;
import com.android.systemui.settings.UserTracker;
+import com.android.systemui.shade.ShadeDisplayAware;
import java.util.ArrayList;
import java.util.Arrays;
@@ -69,7 +70,7 @@ public class TileQueryHelper {
@Inject
public TileQueryHelper(
- Context context,
+ @ShadeDisplayAware Context context,
UserTracker userTracker,
@Main Executor mainExecutor,
@Background Executor bgExecutor
diff --git a/packages/SystemUI/src/com/android/systemui/qs/footer/ui/viewmodel/FooterActionsViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/footer/ui/viewmodel/FooterActionsViewModel.kt
index 564bc78a3f98..8ef637545e69 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/footer/ui/viewmodel/FooterActionsViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/footer/ui/viewmodel/FooterActionsViewModel.kt
@@ -37,6 +37,7 @@ import com.android.systemui.qs.footer.data.model.UserSwitcherStatusModel
import com.android.systemui.qs.footer.domain.interactor.FooterActionsInteractor
import com.android.systemui.qs.footer.domain.model.SecurityButtonConfig
import com.android.systemui.res.R
+import com.android.systemui.shade.ShadeDisplayAware
import com.android.systemui.util.icuMessageFormat
import javax.inject.Inject
import javax.inject.Named
@@ -112,7 +113,7 @@ class FooterActionsViewModel(
class Factory
@Inject
constructor(
- @Application private val context: Context,
+ @ShadeDisplayAware private val context: Context,
private val falsingManager: FalsingManager,
private val footerActionsInteractor: FooterActionsInteractor,
private val globalActionsDialogLiteProvider: Provider<GlobalActionsDialogLite>,
@@ -175,7 +176,7 @@ class FooterActionsViewModel(
}
fun FooterActionsViewModel(
- @Application appContext: Context,
+ @ShadeDisplayAware appContext: Context,
footerActionsInteractor: FooterActionsInteractor,
falsingManager: FalsingManager,
globalActionsDialogLite: GlobalActionsDialogLite,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditModeViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditModeViewModel.kt
index 4e34e73654fc..faab6960a99c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditModeViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditModeViewModel.kt
@@ -56,7 +56,7 @@ constructor(
private val tilesAvailabilityInteractor: TilesAvailabilityInteractor,
private val minTilesInteractor: MinimumTilesInteractor,
@ShadeDisplayAware private val configurationInteractor: ConfigurationInteractor,
- @Application private val applicationContext: Context,
+ @ShadeDisplayAware private val context: Context,
@Named("Default") private val defaultGridLayout: GridLayout,
@Application private val applicationScope: CoroutineScope,
gridLayoutTypeInteractor: GridLayoutTypeInteractor,
@@ -140,7 +140,7 @@ constructor(
.combine(configurationInteractor.onAnyConfigurationChange.emitOnStart()) {
tiles,
_ ->
- tiles.fastMap { it.load(applicationContext) }
+ tiles.fastMap { it.load(context) }
}
} else {
emptyFlow()
diff --git a/packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepository.kt b/packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepository.kt
index c5b27376a82a..41cdefdb2396 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/InstalledTilesComponentRepository.kt
@@ -30,8 +30,8 @@ import androidx.annotation.GuardedBy
import com.android.systemui.common.data.repository.PackageChangeRepository
import com.android.systemui.common.shared.model.PackageChangeModel
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.shade.ShadeDisplayAware
import com.android.systemui.util.kotlin.isComponentActuallyEnabled
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -54,7 +54,7 @@ interface InstalledTilesComponentRepository {
class InstalledTilesComponentRepositoryImpl
@Inject
constructor(
- @Application private val applicationContext: Context,
+ @ShadeDisplayAware private val context: Context,
@Background private val backgroundScope: CoroutineScope,
private val packageChangeRepository: PackageChangeRepository
) : InstalledTilesComponentRepository {
@@ -77,10 +77,10 @@ constructor(
* context.
*/
val packageManager =
- if (applicationContext.userId == userId) {
- applicationContext.packageManager
+ if (context.userId == userId) {
+ context.packageManager
} else {
- applicationContext
+ context
.createContextAsUser(
UserHandle.of(userId),
/* flags */ 0,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddable.kt b/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddable.kt
index 31ea734fb842..e9c91ca0db12 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddable.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/NightDisplayAutoAddable.kt
@@ -27,6 +27,7 @@ import com.android.systemui.qs.pipeline.domain.model.AutoAddTracking
import com.android.systemui.qs.pipeline.domain.model.AutoAddable
import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.qs.tiles.NightDisplayTile
+import com.android.systemui.shade.ShadeDisplayAware
import javax.inject.Inject
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
@@ -42,7 +43,7 @@ class NightDisplayAutoAddable
@Inject
constructor(
private val nightDisplayListenerBuilder: NightDisplayListenerModule.Builder,
- context: Context,
+ @ShadeDisplayAware context: Context,
) : AutoAddable {
private val enabled = ColorDisplayManager.isNightDisplayAvailable(context)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
index 6b654beea149..fed8b60a653f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UserDetailView.java
@@ -39,6 +39,7 @@ import com.android.systemui.qs.PseudoGridView;
import com.android.systemui.qs.QSUserSwitcherEvent;
import com.android.systemui.qs.user.UserSwitchDialogController;
import com.android.systemui.res.R;
+import com.android.systemui.shade.ShadeDisplayAware;
import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.BaseUserSwitcherAdapter;
import com.android.systemui.statusbar.policy.UserSwitcherController;
@@ -95,7 +96,7 @@ public class UserDetailView extends PseudoGridView {
}
@Inject
- public Adapter(Context context, UserSwitcherController controller,
+ public Adapter(@ShadeDisplayAware Context context, UserSwitcherController controller,
UiEventLogger uiEventLogger, FalsingManager falsingManager) {
super(controller);
mContext = context;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/DisabledByPolicyInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/DisabledByPolicyInteractor.kt
index 87b89ea6810a..45775272e01f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/DisabledByPolicyInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/base/interactor/DisabledByPolicyInteractor.kt
@@ -27,6 +27,7 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.qs.tiles.base.interactor.DisabledByPolicyInteractor.PolicyResult
+import com.android.systemui.shade.ShadeDisplayAware
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
@@ -70,7 +71,7 @@ interface DisabledByPolicyInteractor {
class DisabledByPolicyInteractorImpl
@Inject
constructor(
- private val context: Context,
+ @ShadeDisplayAware private val context: Context,
private val activityStarter: ActivityStarter,
private val restrictedLockProxy: RestrictedLockProxy,
@Background private val backgroundDispatcher: CoroutineDispatcher,
@@ -105,7 +106,7 @@ constructor(
/** Mockable proxy for [RestrictedLockUtilsInternal] static methods. */
@VisibleForTesting
-class RestrictedLockProxy @Inject constructor(private val context: Context) {
+class RestrictedLockProxy @Inject constructor(@ShadeDisplayAware private val context: Context) {
@WorkerThread
fun hasBaseUserRestriction(userId: Int, userRestriction: String?): Boolean =
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/di/QSTilesModule.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/di/QSTilesModule.kt
index b766ee0d4333..222fa3efbe94 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/di/QSTilesModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/di/QSTilesModule.kt
@@ -28,6 +28,7 @@ import com.android.systemui.qs.tiles.viewmodel.QSTileConfig
import com.android.systemui.qs.tiles.viewmodel.QSTileConfigProvider
import com.android.systemui.qs.tiles.viewmodel.QSTileConfigProviderImpl
import com.android.systemui.qs.tiles.viewmodel.QSTileViewModel
+import com.android.systemui.shade.ShadeDisplayAware
import dagger.Binds
import dagger.Module
import dagger.Provides
@@ -66,6 +67,6 @@ interface QSTilesModule {
companion object {
- @Provides fun provideTilesTheme(context: Context): Theme = context.theme
+ @Provides fun provideTilesTheme(@ShadeDisplayAware context: Context): Theme = context.theme
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java
index 8f6c4e743269..244f024625db 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java
@@ -87,6 +87,7 @@ import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.res.R;
+import com.android.systemui.shade.ShadeDisplayAware;
import com.android.systemui.statusbar.connectivity.AccessPointController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.LocationController;
@@ -240,7 +241,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi
}
@Inject
- public InternetDialogController(@NonNull Context context, UiEventLogger uiEventLogger,
+ public InternetDialogController(@ShadeDisplayAware Context context, UiEventLogger uiEventLogger,
ActivityStarter starter, AccessPointController accessPointController,
SubscriptionManager subscriptionManager, TelephonyManager telephonyManager,
@Nullable WifiManager wifiManager, ConnectivityManager connectivityManager,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java
index 89b9eee52f2a..0ab533bb9838 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java
@@ -71,6 +71,7 @@ import com.android.systemui.animation.DialogTransitionAnimator;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.res.R;
+import com.android.systemui.shade.ShadeDisplayAware;
import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.wifitrackerlib.WifiEntry;
@@ -190,7 +191,7 @@ public class InternetDialogDelegate implements
@AssistedInject
public InternetDialogDelegate(
- Context context,
+ @ShadeDisplayAware Context context,
InternetDialogManager internetDialogManager,
InternetDialogController internetDialogController,
@Assisted(CAN_CONFIG_MOBILE_DATA) boolean canConfigMobileData,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTileDefaultsRepository.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTileDefaultsRepository.kt
index 1546ec2c54bd..32fb1d18724d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTileDefaultsRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTileDefaultsRepository.kt
@@ -26,6 +26,7 @@ import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.qs.tiles.impl.custom.data.entity.CustomTileDefaults
import com.android.systemui.qs.tiles.impl.di.QSTileScope
+import com.android.systemui.shade.ShadeDisplayAware
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
@@ -68,7 +69,7 @@ interface CustomTileDefaultsRepository {
class CustomTileDefaultsRepositoryImpl
@Inject
constructor(
- private val context: Context,
+ @ShadeDisplayAware private val context: Context,
@Application applicationScope: CoroutineScope,
@Background private val backgroundDispatcher: CoroutineDispatcher,
) : CustomTileDefaultsRepository {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTilePackageUpdatesRepository.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTilePackageUpdatesRepository.kt
index 0ebd6f2b4ac3..cd4938f01b63 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTilePackageUpdatesRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/data/repository/CustomTilePackageUpdatesRepository.kt
@@ -28,6 +28,7 @@ import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.qs.tiles.impl.di.QSTileScope
+import com.android.systemui.shade.ShadeDisplayAware
import javax.inject.Inject
import kotlin.coroutines.CoroutineContext
import kotlinx.coroutines.CoroutineScope
@@ -51,7 +52,7 @@ class CustomTilePackageUpdatesRepositoryImpl
@Inject
constructor(
private val tileSpec: TileSpec.CustomTileSpec,
- @Application private val context: Context,
+ @ShadeDisplayAware private val context: Context,
@QSTileScope private val tileScope: CoroutineScope,
@Background private val backgroundCoroutineContext: CoroutineContext,
) : CustomTilePackageUpdatesRepository {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/CustomTileMapper.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/CustomTileMapper.kt
index 60aa4ea4759f..c446865f31af 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/CustomTileMapper.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/CustomTileMapper.kt
@@ -30,12 +30,16 @@ import com.android.systemui.qs.tiles.base.interactor.QSTileDataToStateMapper
import com.android.systemui.qs.tiles.impl.custom.domain.entity.CustomTileDataModel
import com.android.systemui.qs.tiles.viewmodel.QSTileConfig
import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.shade.ShadeDisplayAware
import javax.inject.Inject
@SysUISingleton
class CustomTileMapper
@Inject
-constructor(private val context: Context, private val uriGrantsManager: IUriGrantsManager) :
+constructor(
+ @ShadeDisplayAware private val context: Context,
+ private val uriGrantsManager: IUriGrantsManager
+) :
QSTileDataToStateMapper<CustomTileDataModel> {
override fun map(config: QSTileConfig, data: CustomTileDataModel): QSTileState {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/interactor/CustomTileUserActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/interactor/CustomTileUserActionInteractor.kt
index af2bb9d0d2f7..1153b5c67261 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/interactor/CustomTileUserActionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/custom/domain/interactor/CustomTileUserActionInteractor.kt
@@ -42,6 +42,7 @@ import com.android.systemui.qs.tiles.impl.custom.domain.entity.CustomTileDataMod
import com.android.systemui.qs.tiles.impl.di.QSTileScope
import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
import com.android.systemui.settings.DisplayTracker
+import com.android.systemui.shade.ShadeDisplayAware
import java.util.concurrent.atomic.AtomicReference
import javax.inject.Inject
import kotlin.coroutines.CoroutineContext
@@ -51,7 +52,7 @@ import kotlinx.coroutines.withContext
class CustomTileUserActionInteractor
@Inject
constructor(
- private val context: Context,
+ @ShadeDisplayAware private val context: Context,
private val tileSpec: TileSpec,
private val qsTileLogger: QSTileLogger,
private val windowManager: IWindowManager,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/InternetTileMapper.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/InternetTileMapper.kt
index fc945851cdad..1a6876d0b765 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/InternetTileMapper.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/InternetTileMapper.kt
@@ -30,6 +30,7 @@ import com.android.systemui.qs.tiles.impl.internet.domain.model.InternetTileMode
import com.android.systemui.qs.tiles.viewmodel.QSTileConfig
import com.android.systemui.qs.tiles.viewmodel.QSTileState
import com.android.systemui.res.R
+import com.android.systemui.shade.ShadeDisplayAware
import com.android.systemui.statusbar.pipeline.shared.ui.model.InternetTileIconModel
import javax.inject.Inject
@@ -37,9 +38,9 @@ import javax.inject.Inject
class InternetTileMapper
@Inject
constructor(
- @Main private val resources: Resources,
+ @ShadeDisplayAware private val resources: Resources,
private val theme: Resources.Theme,
- private val context: Context,
+ @ShadeDisplayAware private val context: Context,
@Main private val handler: Handler,
) : QSTileDataToStateMapper<InternetTileModel> {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractor.kt
index 6fe3979fa446..6d10843decc0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractor.kt
@@ -28,6 +28,7 @@ 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.internet.domain.model.InternetTileModel
import com.android.systemui.res.R
+import com.android.systemui.shade.ShadeDisplayAware
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
@@ -54,7 +55,7 @@ import kotlinx.coroutines.flow.stateIn
class InternetTileDataInteractor
@Inject
constructor(
- private val context: Context,
+ @ShadeDisplayAware private val context: Context,
@Application private val scope: CoroutineScope,
airplaneModeRepository: AirplaneModeRepository,
private val connectivityRepository: ConnectivityRepository,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractor.kt
index 3e44258229f9..9b2880b6d47f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractor.kt
@@ -28,6 +28,7 @@ import com.android.systemui.qs.tiles.ModesTile
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.modes.domain.model.ModesTileModel
+import com.android.systemui.shade.ShadeDisplayAware
import com.android.systemui.statusbar.policy.domain.interactor.ZenModeInteractor
import com.android.systemui.statusbar.policy.domain.model.ActiveZenModes
import com.android.systemui.statusbar.policy.domain.model.ZenModeInfo
@@ -42,7 +43,7 @@ import kotlinx.coroutines.flow.map
class ModesTileDataInteractor
@Inject
constructor(
- val context: Context,
+ @ShadeDisplayAware val context: Context,
val zenModeInteractor: ZenModeInteractor,
@Background val bgDispatcher: CoroutineDispatcher,
) : QSTileDataInteractor<ModesTileModel> {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/saver/domain/interactor/DataSaverTileUserActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/saver/domain/interactor/DataSaverTileUserActionInteractor.kt
index 252e3f84df6c..05bdf0a92679 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/saver/domain/interactor/DataSaverTileUserActionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/saver/domain/interactor/DataSaverTileUserActionInteractor.kt
@@ -32,6 +32,7 @@ import com.android.systemui.qs.tiles.impl.saver.domain.DataSaverDialogDelegate
import com.android.systemui.qs.tiles.impl.saver.domain.model.DataSaverTileModel
import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
import com.android.systemui.settings.UserFileManager
+import com.android.systemui.shade.ShadeDisplayAware
import com.android.systemui.statusbar.phone.SystemUIDialog
import com.android.systemui.statusbar.policy.DataSaverController
import javax.inject.Inject
@@ -42,7 +43,7 @@ import kotlinx.coroutines.withContext
class DataSaverTileUserActionInteractor
@Inject
constructor(
- @Application private val context: Context,
+ @ShadeDisplayAware private val context: Context,
@Main private val coroutineContext: CoroutineContext,
@Background private val backgroundContext: CoroutineContext,
private val dataSaverController: DataSaverController,
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
index c928e8af17fc..7af3576d8cd9 100644
--- 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
@@ -25,6 +25,7 @@ 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.shade.ShadeDisplayAware
import com.android.systemui.statusbar.policy.BatteryController
import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.statusbar.policy.LocationController
@@ -38,7 +39,7 @@ import kotlinx.coroutines.flow.flowOf
class UiModeNightTileDataInteractor
@Inject
constructor(
- @Application private val context: Context,
+ @ShadeDisplayAware private val context: Context,
private val configurationController: ConfigurationController,
private val uiModeManager: UiModeManager,
private val batteryController: BatteryController,
diff --git a/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayCoreStartable.kt b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayCoreStartable.kt
new file mode 100644
index 000000000000..bc15bbb5e57d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayCoreStartable.kt
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2024 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.reardisplay
+
+import android.content.Context
+import android.hardware.devicestate.DeviceStateManager
+import android.hardware.devicestate.feature.flags.Flags
+import androidx.annotation.VisibleForTesting
+import com.android.systemui.CoreStartable
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.display.domain.interactor.RearDisplayStateInteractor
+import com.android.systemui.statusbar.phone.SystemUIDialog
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.flow.launchIn
+import kotlinx.coroutines.flow.map
+
+/**
+ * Provides a {@link com.android.systemui.statusbar.phone.SystemUIDialog} to be shown on the inner
+ * display when the device enters Rear Display Mode, containing an UI affordance to let the user
+ * know that the main content has moved to the outer display, as well as an UI affordance to cancel
+ * the Rear Display Mode.
+ */
+@SysUISingleton
+class RearDisplayCoreStartable
+@Inject
+internal constructor(
+ private val context: Context,
+ private val deviceStateManager: DeviceStateManager,
+ private val rearDisplayStateInteractor: RearDisplayStateInteractor,
+ private val rearDisplayInnerDialogDelegateFactory: RearDisplayInnerDialogDelegate.Factory,
+ @Application private val scope: CoroutineScope,
+) : CoreStartable, AutoCloseable {
+
+ companion object {
+ private const val TAG: String = "RearDisplayCoreStartable"
+ }
+
+ @VisibleForTesting var stateChangeListener: Job? = null
+
+ override fun close() {
+ stateChangeListener?.cancel()
+ }
+
+ override fun start() {
+ if (Flags.deviceStateRdmV2()) {
+ var dialog: SystemUIDialog? = null
+
+ stateChangeListener =
+ rearDisplayStateInteractor.state
+ .map {
+ when (it) {
+ is RearDisplayStateInteractor.State.Enabled -> {
+ val rearDisplayContext =
+ context.createDisplayContext(it.innerDisplay)
+ val delegate =
+ rearDisplayInnerDialogDelegateFactory.create(
+ rearDisplayContext,
+ deviceStateManager::cancelStateRequest,
+ )
+ dialog = delegate.createDialog().apply { show() }
+ }
+
+ is RearDisplayStateInteractor.State.Disabled -> {
+ dialog?.dismiss()
+ dialog = null
+ }
+ }
+ }
+ .launchIn(scope)
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegate.kt
new file mode 100644
index 000000000000..2d6181aa04af
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegate.kt
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2024 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.reardisplay
+
+import android.content.Context
+import android.os.Bundle
+import android.view.View
+import com.android.systemui.res.R
+import com.android.systemui.statusbar.phone.SystemUIDialog
+import dagger.assisted.Assisted
+import dagger.assisted.AssistedFactory
+import dagger.assisted.AssistedInject
+
+/**
+ * A {@link com.android.systemui.statusbar.phone.SystemUIDialog.Delegate} providing a dialog which
+ * lets the user know that the Rear Display Mode is active, and that the content has moved to the
+ * outer display.
+ */
+class RearDisplayInnerDialogDelegate
+@AssistedInject
+internal constructor(
+ private val systemUIDialogFactory: SystemUIDialog.Factory,
+ @Assisted private val rearDisplayContext: Context,
+ @Assisted private val onCanceledRunnable: Runnable,
+) : SystemUIDialog.Delegate {
+
+ @AssistedFactory
+ interface Factory {
+ fun create(
+ rearDisplayContext: Context,
+ onCanceledRunnable: Runnable,
+ ): RearDisplayInnerDialogDelegate
+ }
+
+ override fun createDialog(): SystemUIDialog {
+ return systemUIDialogFactory.create(this, rearDisplayContext)
+ }
+
+ override fun onCreate(dialog: SystemUIDialog, savedInstanceState: Bundle?) {
+ dialog.apply {
+ setContentView(R.layout.activity_rear_display_front_screen_on)
+ setCanceledOnTouchOutside(false)
+ requireViewById<View>(R.id.button_cancel).setOnClickListener {
+ onCanceledRunnable.run()
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayModule.kt b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayModule.kt
index 6ab294dd9818..5fb9cb27f90f 100644
--- a/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayModule.kt
@@ -41,4 +41,10 @@ interface RearDisplayModule {
fun bindRearDisplayDialogControllerConfigChanges(
impl: RearDisplayDialogController
): ConfigurationListener
+
+ /** Start RearDisplayCoreStartable. */
+ @Binds
+ @IntoMap
+ @ClassKey(RearDisplayCoreStartable::class)
+ abstract fun bindRearDisplayCoreStartable(impl: RearDisplayCoreStartable): CoreStartable
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
index 684ce48d9c7f..42aadd132cd8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
@@ -76,6 +76,7 @@ import com.android.systemui.statusbar.notification.interruption.VisualInterrupti
import com.android.systemui.statusbar.notification.interruption.VisualInterruptionRefactor;
import com.android.systemui.statusbar.notification.logging.NotificationPanelLogger;
import com.android.systemui.statusbar.notification.logging.NotificationPanelLoggerImpl;
+import com.android.systemui.statusbar.notification.logging.dagger.NotificationsLogModule;
import com.android.systemui.statusbar.notification.row.NotificationEntryProcessorFactory;
import com.android.systemui.statusbar.notification.row.NotificationEntryProcessorFactoryLooperImpl;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
@@ -116,6 +117,7 @@ import javax.inject.Provider;
ActivatableNotificationViewModelModule.class,
NotificationMemoryModule.class,
NotificationStatsLoggerModule.class,
+ NotificationsLogModule.class,
})
public interface NotificationsModule {
@Binds
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
new file mode 100644
index 000000000000..d3359d39e959
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2024 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.logging.dagger
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.LogBufferFactory
+import com.android.systemui.log.dagger.NotifInflationLog
+import com.android.systemui.log.dagger.NotifInteractionLog
+import com.android.systemui.log.dagger.NotificationHeadsUpLog
+import com.android.systemui.log.dagger.NotificationInterruptLog
+import com.android.systemui.log.dagger.NotificationLockscreenLog
+import com.android.systemui.log.dagger.NotificationLog
+import com.android.systemui.log.dagger.NotificationRemoteInputLog
+import com.android.systemui.log.dagger.NotificationRenderLog
+import com.android.systemui.log.dagger.NotificationSectionLog
+import com.android.systemui.log.dagger.SensitiveNotificationProtectionLog
+import com.android.systemui.log.dagger.UnseenNotificationLog
+import com.android.systemui.log.dagger.VisualStabilityLog
+import com.android.systemui.statusbar.notification.NotifPipelineFlags
+import com.android.systemui.statusbar.notification.promoted.PromotedNotificationLog
+import com.android.systemui.util.Compile
+import dagger.Module
+import dagger.Provides
+
+@Module
+object NotificationsLogModule {
+ /** Provides a logging buffer for logs related to heads up presentation of notifications. */
+ @Provides
+ @SysUISingleton
+ @NotificationHeadsUpLog
+ fun provideNotificationHeadsUpLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifHeadsUpLog", 1000)
+ }
+
+ /** Provides a logging buffer for logs related to inflation of notifications. */
+ @Provides
+ @SysUISingleton
+ @NotifInflationLog
+ fun provideNotifInflationLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifInflationLog", 250)
+ }
+
+ /** Provides a logging buffer for all logs related to the data layer of notifications. */
+ @Provides
+ @SysUISingleton
+ @NotifInteractionLog
+ fun provideNotifInteractionLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifInteractionLog", 50)
+ }
+
+ /** Provides a logging buffer for notification interruption calculations. */
+ @Provides
+ @SysUISingleton
+ @NotificationInterruptLog
+ fun provideNotificationInterruptLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifInterruptLog", 100)
+ }
+
+ /** Provides a logging buffer for all logs related to notifications on the lockscreen. */
+ @Provides
+ @SysUISingleton
+ @NotificationLockscreenLog
+ fun provideNotificationLockScreenLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifLockscreenLog", 50, false /* systrace */)
+ }
+
+ /** Provides a logging buffer for all logs related to the data layer of notifications. */
+ @Provides
+ @SysUISingleton
+ @NotificationLog
+ fun provideNotificationsLogBuffer(
+ factory: LogBufferFactory,
+ notifPipelineFlags: NotifPipelineFlags,
+ ): LogBuffer {
+ var maxSize = 1000
+ if (Compile.IS_DEBUG && notifPipelineFlags.isDevLoggingEnabled()) {
+ maxSize *= 10
+ }
+ return factory.create("NotifLog", maxSize, Compile.IS_DEBUG /* systrace */)
+ }
+
+ /** Provides a logging buffer for all logs related to remote input controller. */
+ @Provides
+ @SysUISingleton
+ @NotificationRemoteInputLog
+ fun provideNotificationRemoteInputLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifRemoteInputLog", 50, /* maxSize */ false /* systrace */)
+ }
+
+ /** Provides a logging buffer for notification rendering events. */
+ @Provides
+ @SysUISingleton
+ @NotificationRenderLog
+ fun provideNotificationRenderLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifRenderLog", 100)
+ }
+
+ /** Provides a logging buffer for all logs related to managing notification sections. */
+ @Provides
+ @SysUISingleton
+ @NotificationSectionLog
+ fun provideNotificationSectionLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("NotifSectionLog", 1000, /* maxSize */ false /* systrace */)
+ }
+
+ /** Provides a [LogBuffer] for use by promoted notifications. */
+ @Provides
+ @SysUISingleton
+ @PromotedNotificationLog
+ fun providesPromotedNotificationLog(factory: LogBufferFactory): LogBuffer {
+ return factory.create("PromotedNotifLog", 50)
+ }
+
+ /** */
+ @Provides
+ @SysUISingleton
+ @SensitiveNotificationProtectionLog
+ fun provideSensitiveNotificationProtectionLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("SensitiveNotificationProtectionLog", 10)
+ }
+
+ /** Provides a logging buffer for all logs related to unseen notifications. */
+ @Provides
+ @SysUISingleton
+ @UnseenNotificationLog
+ fun provideUnseenNotificationLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("UnseenNotifLog", 20, /* maxSize */ false /* systrace */)
+ }
+
+ /** Provides a logging buffer for all logs related to notification visual stability. */
+ @Provides
+ @SysUISingleton
+ @VisualStabilityLog
+ fun provideVisualStabilityLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("VisualStabilityLog", 50, /* maxSize */ false /* systrace */)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt
new file mode 100644
index 000000000000..f9d9c9771e67
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 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.promoted
+
+import javax.inject.Qualifier
+
+/** A [com.android.systemui.log.LogBuffer] for use by promoted notifications. */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class PromotedNotificationLog
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridConversationNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridConversationNotificationView.java
index 0738a03f8237..1ff0d9262476 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridConversationNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridConversationNotificationView.java
@@ -18,6 +18,7 @@ package com.android.systemui.statusbar.notification.row;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.Flags;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Icon;
@@ -93,12 +94,22 @@ public class HybridConversationNotificationView extends HybridNotificationView {
}
mConversationSenderName = requireViewById(R.id.conversation_notification_sender);
applyTextColor(mConversationSenderName, mSecondaryTextColor);
- mFacePileSize = getResources()
- .getDimensionPixelSize(R.dimen.conversation_single_line_face_pile_size);
- mFacePileAvatarSize = getResources()
- .getDimensionPixelSize(R.dimen.conversation_single_line_face_pile_avatar_size);
- mSingleAvatarSize = getResources()
- .getDimensionPixelSize(R.dimen.conversation_single_line_avatar_size);
+ if (Flags.notificationsRedesignTemplates()) {
+ mFacePileSize = getResources()
+ .getDimensionPixelSize(R.dimen.notification_2025_single_line_face_pile_size);
+ mFacePileAvatarSize = getResources()
+ .getDimensionPixelSize(
+ R.dimen.notification_2025_single_line_face_pile_avatar_size);
+ mSingleAvatarSize = getResources()
+ .getDimensionPixelSize(R.dimen.notification_2025_single_line_avatar_size);
+ } else {
+ mFacePileSize = getResources()
+ .getDimensionPixelSize(R.dimen.conversation_single_line_face_pile_size);
+ mFacePileAvatarSize = getResources()
+ .getDimensionPixelSize(R.dimen.conversation_single_line_face_pile_avatar_size);
+ mSingleAvatarSize = getResources()
+ .getDimensionPixelSize(R.dimen.conversation_single_line_avatar_size);
+ }
mFacePileProtectionWidth = getResources().getDimensionPixelSize(
R.dimen.conversation_single_line_face_pile_protection_width);
mTransformationHelper.setCustomTransformation(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridGroupManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridGroupManager.java
index 09c034978977..e5e559f1a5da 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridGroupManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridGroupManager.java
@@ -63,9 +63,8 @@ public class HybridGroupManager {
private HybridNotificationView inflateHybridView(View contentView, ViewGroup parent) {
Trace.beginSection("HybridGroupManager#inflateHybridView");
LayoutInflater inflater = LayoutInflater.from(mContext);
- int layout = contentView instanceof ConversationLayout
- ? R.layout.hybrid_conversation_notification
- : R.layout.hybrid_notification;
+ int layout = HybridNotificationView.getLayoutResource(
+ /* isConversation = */ contentView instanceof ConversationLayout);
HybridNotificationView hybrid = (HybridNotificationView)
inflater.inflate(layout, parent, false);
parent.addView(hybrid);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridNotificationView.java
index da8c4dc08bf0..61f4e96bf99a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/HybridNotificationView.java
@@ -19,6 +19,7 @@ package com.android.systemui.statusbar.notification.row;
import static android.app.Notification.COLOR_INVALID;
import android.annotation.Nullable;
+import android.app.Flags;
import android.content.Context;
import android.content.res.TypedArray;
import android.text.TextUtils;
@@ -73,6 +74,25 @@ public class HybridNotificationView extends AlphaOptimizedLinearLayout
return mTextView;
}
+ /**
+ * Get layout resource for this view based on {@param isConversation}.
+ */
+ public static int getLayoutResource(boolean isConversation) {
+ if (Flags.notificationsRedesignTemplates()) {
+ if (isConversation) {
+ return R.layout.notification_2025_hybrid_conversation;
+ } else {
+ return R.layout.notification_2025_hybrid;
+ }
+ } else {
+ if (isConversation) {
+ return R.layout.hybrid_conversation_notification;
+ } else {
+ return R.layout.hybrid_notification;
+ }
+ }
+ }
+
@Override
protected void onFinishInflate() {
super.onFinishInflate();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/SingleLineViewInflater.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/SingleLineViewInflater.kt
index 4e26ae85100c..e702f10d7f50 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/SingleLineViewInflater.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/SingleLineViewInflater.kt
@@ -412,10 +412,7 @@ internal object SingleLineViewInflater {
traceSection("SingleLineViewInflater#inflateSingleLineView") {
val inflater = LayoutInflater.from(context)
- val layoutRes: Int =
- if (isConversation)
- com.android.systemui.res.R.layout.hybrid_conversation_notification
- else com.android.systemui.res.R.layout.hybrid_notification
+ val layoutRes: Int = HybridNotificationView.getLayoutResource(isConversation)
view = inflater.inflate(layoutRes, /* root= */ null) as HybridNotificationView
if (view == null) {
Log.wtf(TAG, "Single-line view inflation result is null for entry: ${entry.logKey}")
diff --git a/packages/SystemUI/src/com/android/systemui/util/kotlin/JavaAdapter.kt b/packages/SystemUI/src/com/android/systemui/util/kotlin/JavaAdapter.kt
index 63a5b3f1e6f6..fb09ab4462ed 100644
--- a/packages/SystemUI/src/com/android/systemui/util/kotlin/JavaAdapter.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/kotlin/JavaAdapter.kt
@@ -28,6 +28,7 @@ import java.util.function.Consumer
import javax.inject.Inject
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
+import kotlin.coroutines.cancellation.CancellationException
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DisposableHandle
import kotlinx.coroutines.Job
@@ -64,6 +65,28 @@ class JavaAdapter @Inject constructor(@Application private val scope: CoroutineS
): StateFlow<T> {
return flow.stateIn(scope, started, initialValue)
}
+
+ /** Call suspend functions from Java */
+ fun <T, R> callSuspend(
+ suspendFunction: suspend (T) -> R,
+ arg: T,
+ onSuccess: (R) -> Unit,
+ onCancel: (CancellationException) -> Unit,
+ onFailure: (Throwable) -> Unit,
+ ): Job =
+ scope.launch {
+ val result =
+ try {
+ suspendFunction(arg)
+ } catch (ex: CancellationException) {
+ onCancel(ex)
+ return@launch
+ } catch (ex: Throwable) {
+ onFailure(ex)
+ return@launch
+ }
+ onSuccess(result)
+ }
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/util/kotlin/SysUICoroutinesModule.kt b/packages/SystemUI/src/com/android/systemui/util/kotlin/SysUICoroutinesModule.kt
index 2a9b1b97b48f..e5c1e7daa25a 100644
--- a/packages/SystemUI/src/com/android/systemui/util/kotlin/SysUICoroutinesModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/kotlin/SysUICoroutinesModule.kt
@@ -17,14 +17,16 @@
package com.android.systemui.util.kotlin
import android.os.Handler
+import com.android.systemui.coroutines.newTracingContext
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
-import com.android.systemui.dagger.qualifiers.Tracing
import com.android.systemui.dagger.qualifiers.UiBackground
import com.android.systemui.util.settings.SettingsSingleThreadBackground
import dagger.Module
import dagger.Provides
+import java.util.concurrent.Executor
+import kotlin.coroutines.CoroutineContext
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
@@ -33,8 +35,6 @@ import kotlinx.coroutines.android.asCoroutineDispatcher
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.newFixedThreadPoolContext
import kotlinx.coroutines.plus
-import java.util.concurrent.Executor
-import kotlin.coroutines.CoroutineContext
private const val LIMIT_BACKGROUND_DISPATCHER_THREADS = true
@@ -62,7 +62,7 @@ class SysUICoroutinesModule {
@Background
@Deprecated(
"Use @Background CoroutineContext instead",
- ReplaceWith("bgCoroutineContext()", "kotlin.coroutines.CoroutineContext")
+ ReplaceWith("bgCoroutineContext()", "kotlin.coroutines.CoroutineContext"),
)
fun bgDispatcher(): CoroutineDispatcher {
return if (LIMIT_BACKGROUND_DISPATCHER_THREADS) {
@@ -73,7 +73,7 @@ class SysUICoroutinesModule {
// code on those.
newFixedThreadPoolContext(
nThreads = Runtime.getRuntime().availableProcessors(),
- name = "SystemUIBg"
+ name = "SystemUIBg",
)
} else {
Dispatchers.IO
@@ -89,10 +89,17 @@ class SysUICoroutinesModule {
}
@Provides
+ @SysUISingleton
+ @SettingsSingleThreadBackground
+ fun settingsScope(@Background bgDispatcher: CoroutineDispatcher): CoroutineScope {
+ return CoroutineScope(bgDispatcher + newTracingContext("SettingsProxy"))
+ }
+
+ @Provides
@Background
@SysUISingleton
fun bgCoroutineContext(
- @Background bgCoroutineDispatcher: CoroutineDispatcher,
+ @Background bgCoroutineDispatcher: CoroutineDispatcher
): CoroutineContext {
return bgCoroutineDispatcher
}
@@ -103,7 +110,7 @@ class SysUICoroutinesModule {
@UiBackground
@Deprecated(
"Use @UiBackground CoroutineContext instead",
- ReplaceWith("uiBgCoroutineContext()", "kotlin.coroutines.CoroutineContext")
+ ReplaceWith("uiBgCoroutineContext()", "kotlin.coroutines.CoroutineContext"),
)
fun uiBgDispatcher(@UiBackground uiBgExecutor: Executor): CoroutineDispatcher =
uiBgExecutor.asCoroutineDispatcher()
@@ -112,7 +119,7 @@ class SysUICoroutinesModule {
@UiBackground
@SysUISingleton
fun uiBgCoroutineContext(
- @UiBackground uiBgCoroutineDispatcher: CoroutineDispatcher,
+ @UiBackground uiBgCoroutineDispatcher: CoroutineDispatcher
): CoroutineContext {
return uiBgCoroutineDispatcher
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
index b7058722e2b3..68bffeefb0f0 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
@@ -18,8 +18,6 @@ package com.android.systemui.volume;
import static android.media.AudioManager.RINGER_MODE_NORMAL;
-import static com.android.settingslib.flags.Flags.volumeDialogAudioSharingFix;
-
import android.app.ActivityManager;
import android.app.KeyguardManager;
import android.app.NotificationManager;
@@ -79,9 +77,13 @@ import com.android.systemui.util.RingerModeTracker;
import com.android.systemui.util.concurrency.ThreadFactory;
import com.android.systemui.util.kotlin.JavaAdapter;
import com.android.systemui.volume.domain.interactor.AudioSharingInteractor;
+import com.android.systemui.volume.shared.VolumeLogger;
import dalvik.annotation.optimization.NeverCompile;
+import kotlin.Unit;
+import kotlin.jvm.functions.Function1;
+
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
@@ -155,6 +157,7 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
private final VibratorHelper mVibrator;
private final AudioSharingInteractor mAudioSharingInteractor;
private final JavaAdapter mJavaAdapter;
+ private final VolumeLogger mVolumeLogger;
private final boolean mHasVibrator;
private boolean mShowA11yStream;
private boolean mShowVolumeDialog;
@@ -202,7 +205,8 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
UserTracker userTracker,
DumpManager dumpManager,
AudioSharingInteractor audioSharingInteractor,
- JavaAdapter javaAdapter
+ JavaAdapter javaAdapter,
+ VolumeLogger volumeLogger
) {
mContext = context.getApplicationContext();
mPackageManager = packageManager;
@@ -216,6 +220,7 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
mMediaSessions = createMediaSessions(mContext, mWorkerLooper, mMediaSessionsCallbacksW);
mAudioSharingInteractor = audioSharingInteractor;
mJavaAdapter = javaAdapter;
+ mVolumeLogger = volumeLogger;
mAudio = audioManager;
mNoMan = notificationManager;
mObserver = new SettingObserver(mWorker);
@@ -293,15 +298,28 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
} catch (SecurityException e) {
Log.w(TAG, "No access to media sessions", e);
}
- if (volumeDialogAudioSharingFix()) {
- Slog.d(TAG, "Start collect volume changes in audio sharing");
- mJavaAdapter.alwaysCollectFlow(
- mAudioSharingInteractor.getVolume(),
- this::handleAudioSharingStreamVolumeChanges);
- mJavaAdapter.alwaysCollectFlow(
- mAudioSharingInteractor.isInAudioSharing(),
- inSharing -> mInAudioSharing = inSharing);
- }
+ Function1<Throwable, Unit> errorCallback = (ex) -> {
+ mVolumeLogger.onAudioSharingAvailabilityRequestedError("register()",
+ ex.getMessage());
+ return null;
+ };
+ var unused =
+ mJavaAdapter.<Context, Boolean>callSuspend(
+ mAudioSharingInteractor::audioSharingVolumeBarAvailable, mContext,
+ result -> {
+ if (result) {
+ Slog.d(TAG, "Start collect volume changes in audio sharing");
+ mJavaAdapter.alwaysCollectFlow(
+ mAudioSharingInteractor.getVolume(),
+ volume -> handleAudioSharingStreamVolumeChanges(volume));
+ mJavaAdapter.alwaysCollectFlow(
+ mAudioSharingInteractor.isInAudioSharing(),
+ inSharing -> mInAudioSharing = inSharing);
+ }
+ return null;
+ },
+ errorCallback,
+ errorCallback);
}
public void setVolumePolicy(VolumePolicy policy) {
@@ -588,18 +606,34 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
mState.activeStream = activeStream;
Events.writeEvent(Events.EVENT_ACTIVE_STREAM_CHANGED, activeStream);
if (D.BUG) Log.d(TAG, "updateActiveStreamW " + activeStream);
- final int s =
- activeStream
- < (volumeDialogAudioSharingFix()
- ? DYNAMIC_STREAM_BROADCAST
- : DYNAMIC_STREAM_REMOTE_START_INDEX)
- ? activeStream
- : -1;
- if (D.BUG) Log.d(TAG, "forceVolumeControlStream " + s);
- mAudio.forceVolumeControlStream(s);
+ Function1<Throwable, Unit> errorCallback = (ex) -> {
+ mVolumeLogger.onAudioSharingAvailabilityRequestedError(
+ "updateActiveStreamW",
+ ex.getMessage());
+ forceVolumeControlStreamW(activeStream, false);
+ return null;
+ };
+ var unused =
+ mJavaAdapter.<Context, Boolean>callSuspend(
+ mAudioSharingInteractor::audioSharingVolumeBarAvailable, mContext,
+ result -> {
+ forceVolumeControlStreamW(activeStream, result);
+ return null;
+ },
+ errorCallback,
+ errorCallback);
return true;
}
+ private void forceVolumeControlStreamW(int activeStream,
+ boolean audioSharingVolumeBarAvailable) {
+ final int dynamicStartIdx = audioSharingVolumeBarAvailable ? DYNAMIC_STREAM_BROADCAST
+ : DYNAMIC_STREAM_REMOTE_START_INDEX;
+ final int s = activeStream < dynamicStartIdx ? activeStream : -1;
+ if (D.BUG) Log.d(TAG, "forceVolumeControlStream " + s);
+ mWorker.post(() -> mAudio.forceVolumeControlStream(s));
+ }
+
private StreamState streamStateW(int stream) {
StreamState ss = mState.states.get(stream);
if (ss == null) {
@@ -773,10 +807,26 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
}
private void onSetStreamVolumeW(int stream, int level) {
- if (D.BUG) Log.d(TAG, "onSetStreamVolume " + stream + " level=" + level);
- if (volumeDialogAudioSharingFix() && stream == DYNAMIC_STREAM_BROADCAST) {
- Slog.d(TAG, "onSetStreamVolumeW set broadcast stream level = " + level);
- mAudioSharingInteractor.setStreamVolume(level);
+ if (D.BUG) Log.d(TAG, "onSetStreamVolumeW " + stream + " level=" + level);
+
+ if (stream == DYNAMIC_STREAM_BROADCAST) {
+ Function1<Throwable, Unit> errorCallback = (ex) -> {
+ mVolumeLogger.onAudioSharingAvailabilityRequestedError(
+ "onSetStreamVolumeW",
+ ex.getMessage());
+ return null;
+ };
+ var unused =
+ mJavaAdapter.<Context, Boolean>callSuspend(
+ mAudioSharingInteractor::audioSharingVolumeBarAvailable, mContext,
+ result -> {
+ if (result) {
+ mAudioSharingInteractor.setStreamVolume(level);
+ }
+ return null;
+ },
+ errorCallback,
+ errorCallback);
return;
}
if (stream >= DYNAMIC_STREAM_REMOTE_START_INDEX) {
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index bd4c4639e57a..a4e46f667329 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -34,6 +34,7 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_VOLUME_CONTROL;
import static com.android.internal.jank.InteractionJankMonitor.Configuration.Builder;
+import static com.android.settingslib.flags.Flags.audioSharingDeveloperOption;
import static com.android.settingslib.flags.Flags.volumeDialogAudioSharingFix;
import static com.android.systemui.volume.Events.DISMISS_REASON_POSTURE_CHANGED;
import static com.android.systemui.volume.Events.DISMISS_REASON_SETTINGS_CLICKED;
@@ -121,9 +122,9 @@ import com.android.systemui.Flags;
import com.android.systemui.Prefs;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.haptics.slider.HapticSlider;
+import com.android.systemui.haptics.slider.HapticSliderPlugin;
import com.android.systemui.haptics.slider.HapticSliderViewBinder;
import com.android.systemui.haptics.slider.SeekableSliderTrackerConfig;
-import com.android.systemui.haptics.slider.HapticSliderPlugin;
import com.android.systemui.haptics.slider.SliderHapticFeedbackConfig;
import com.android.systemui.media.dialog.MediaOutputDialogManager;
import com.android.systemui.plugins.VolumeDialog;
@@ -1685,10 +1686,10 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
}
// Always show the stream for audio sharing if it exists.
- if (volumeDialogAudioSharingFix()
+ if ((volumeDialogAudioSharingFix() || audioSharingDeveloperOption())
&& row.ss != null
&& mContext.getString(R.string.audio_sharing_description)
- .equals(row.ss.remoteLabel)) {
+ .equals(row.ss.remoteLabel)) {
return true;
}
@@ -1894,9 +1895,9 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
if (!ss.dynamic) continue;
mDynamic.put(stream, true);
if (findRow(stream) == null) {
- if (volumeDialogAudioSharingFix()
- && mContext.getString(R.string.audio_sharing_description)
- .equals(ss.remoteLabel)) {
+ if ((volumeDialogAudioSharingFix() || audioSharingDeveloperOption())
+ && (mContext.getString(R.string.audio_sharing_description)
+ .equals(ss.remoteLabel))) {
addRow(
stream,
R.drawable.ic_volume_media_bt,
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
index 536403ca970e..3ce1bde16afd 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
@@ -16,8 +16,6 @@
package com.android.systemui.volume;
-import static com.android.settingslib.flags.Flags.volumeDialogAudioSharingFix;
-
import android.content.Context;
import android.content.res.Configuration;
import android.util.Log;
@@ -28,7 +26,12 @@ import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.qs.tiles.DndTile;
import com.android.systemui.res.R;
import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.util.kotlin.JavaAdapter;
import com.android.systemui.volume.domain.interactor.AudioSharingInteractor;
+import com.android.systemui.volume.shared.VolumeLogger;
+
+import kotlin.Unit;
+import kotlin.jvm.functions.Function1;
import java.io.PrintWriter;
@@ -44,16 +47,22 @@ public class VolumeUI implements CoreStartable, ConfigurationController.Configur
private VolumeDialogComponent mVolumeComponent;
private AudioSharingInteractor mAudioSharingInteractor;
private AudioRepository mAudioRepository;
+ private JavaAdapter mJavaAdapter;
+ private VolumeLogger mVolumeLogger;
@Inject
public VolumeUI(Context context,
VolumeDialogComponent volumeDialogComponent,
AudioRepository audioRepository,
- AudioSharingInteractor audioSharingInteractor) {
+ AudioSharingInteractor audioSharingInteractor,
+ JavaAdapter javaAdapter,
+ VolumeLogger volumeLogger) {
mContext = context;
mVolumeComponent = volumeDialogComponent;
mAudioRepository = audioRepository;
mAudioSharingInteractor = audioSharingInteractor;
+ mJavaAdapter = javaAdapter;
+ mVolumeLogger = volumeLogger;
}
@Override
@@ -67,9 +76,22 @@ public class VolumeUI implements CoreStartable, ConfigurationController.Configur
mVolumeComponent.setEnableDialogs(enableVolumeUi, enableSafetyWarning);
setDefaultVolumeController();
- if (volumeDialogAudioSharingFix()) {
- mAudioSharingInteractor.handlePrimaryGroupChange();
- }
+ Function1<Throwable, Unit> errorCallback = (ex) -> {
+ mVolumeLogger.onAudioSharingAvailabilityRequestedError("start()",
+ ex.getMessage());
+ return null;
+ };
+ var unused =
+ mJavaAdapter.<Context, Boolean>callSuspend(
+ mAudioSharingInteractor::audioSharingVolumeBarAvailable, mContext,
+ result -> {
+ if (result) {
+ mAudioSharingInteractor.handlePrimaryGroupChange();
+ }
+ return null;
+ },
+ errorCallback,
+ errorCallback);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt
index d5b8597e36ed..d71ddb380843 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt
@@ -86,7 +86,10 @@ interface AudioModule {
@Background coroutineContext: CoroutineContext,
volumeLogger: VolumeLogger,
): AudioSharingRepository =
- if (Flags.enableLeAudioSharing() && localBluetoothManager != null) {
+ if (
+ (Flags.enableLeAudioSharing() || Flags.audioSharingDeveloperOption()) &&
+ localBluetoothManager != null
+ ) {
AudioSharingRepositoryImpl(
contentResolver,
localBluetoothManager,
diff --git a/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt
index 1c80887dd3e8..f6f1e8d22133 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt
@@ -36,7 +36,7 @@ interface AudioSharingModule {
impl: Lazy<AudioSharingInteractorImpl>,
emptyImpl: Lazy<AudioSharingInteractorEmptyImpl>,
): AudioSharingInteractor =
- if (Flags.volumeDialogAudioSharingFix()) {
+ if (Flags.volumeDialogAudioSharingFix() || Flags.audioSharingDeveloperOption()) {
impl.get()
} else {
emptyImpl.get()
diff --git a/packages/SystemUI/src/com/android/systemui/volume/dialog/sliders/domain/interactor/VolumeDialogSlidersInteractor.kt b/packages/SystemUI/src/com/android/systemui/volume/dialog/sliders/domain/interactor/VolumeDialogSlidersInteractor.kt
index 7af4258930cb..66a598b7cf1b 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/dialog/sliders/domain/interactor/VolumeDialogSlidersInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/dialog/sliders/domain/interactor/VolumeDialogSlidersInteractor.kt
@@ -84,7 +84,7 @@ constructor(
// Always show the stream for audio sharing if it exists.
if (
- Flags.volumeDialogAudioSharingFix() &&
+ (Flags.volumeDialogAudioSharingFix() || Flags.audioSharingDeveloperOption()) &&
streamModel.stream == VolumeDialogControllerImpl.DYNAMIC_STREAM_BROADCAST
) {
return true
diff --git a/packages/SystemUI/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractor.kt b/packages/SystemUI/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractor.kt
index 293be94638db..7da041e7ef19 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractor.kt
@@ -17,8 +17,12 @@
package com.android.systemui.volume.domain.interactor
import android.bluetooth.BluetoothCsipSetCoordinator
+import android.content.Context
import android.media.AudioManager.STREAM_MUSIC
import androidx.annotation.IntRange
+import com.android.app.tracing.coroutines.launchTraced as launch
+import com.android.settingslib.bluetooth.BluetoothUtils
+import com.android.settingslib.flags.Flags
import com.android.settingslib.volume.data.repository.AudioSharingRepository
import com.android.settingslib.volume.data.repository.AudioSharingRepository.Companion.AUDIO_SHARING_VOLUME_MAX
import com.android.settingslib.volume.data.repository.AudioSharingRepository.Companion.AUDIO_SHARING_VOLUME_MIN
@@ -38,7 +42,6 @@ import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
-import com.android.app.tracing.coroutines.launchTraced as launch
import kotlinx.coroutines.withContext
interface AudioSharingInteractor {
@@ -54,6 +57,8 @@ interface AudioSharingInteractor {
/** Audio sharing secondary headset max volume. */
val volumeMax: Int
+ suspend fun audioSharingVolumeBarAvailable(@Application context: Context): Boolean
+
/** Set the volume of the secondary headset in audio sharing. */
fun setStreamVolume(
@IntRange(from = AUDIO_SHARING_VOLUME_MIN.toLong(), to = AUDIO_SHARING_VOLUME_MAX.toLong())
@@ -78,7 +83,7 @@ constructor(
@Application private val coroutineScope: CoroutineScope,
@Background private val backgroundCoroutineContext: CoroutineContext,
private val audioVolumeInteractor: AudioVolumeInteractor,
- private val audioSharingRepository: AudioSharingRepository
+ private val audioSharingRepository: AudioSharingRepository,
) : AudioSharingInteractor {
override val isInAudioSharing: Flow<Boolean> = audioSharingRepository.inAudioSharing
@@ -95,6 +100,12 @@ constructor(
override val volumeMax: Int = AUDIO_SHARING_VOLUME_MAX
+ override suspend fun audioSharingVolumeBarAvailable(@Application context: Context): Boolean =
+ withContext(backgroundCoroutineContext) {
+ (Flags.volumeDialogAudioSharingFix() && BluetoothUtils.isAudioSharingEnabled()) ||
+ BluetoothUtils.isAudioSharingPreviewEnabled(context.contentResolver)
+ }
+
override fun setStreamVolume(
@IntRange(from = AUDIO_SHARING_VOLUME_MIN.toLong(), to = AUDIO_SHARING_VOLUME_MAX.toLong())
level: Int
@@ -141,6 +152,9 @@ class AudioSharingInteractorEmptyImpl @Inject constructor() : AudioSharingIntera
override val volumeMin: Int = EMPTY_VOLUME
override val volumeMax: Int = EMPTY_VOLUME
+ override suspend fun audioSharingVolumeBarAvailable(@Application context: Context): Boolean =
+ false
+
override fun setStreamVolume(
@IntRange(from = AUDIO_SHARING_VOLUME_MIN.toLong(), to = AUDIO_SHARING_VOLUME_MAX.toLong())
level: Int
diff --git a/packages/SystemUI/src/com/android/systemui/volume/shared/VolumeLogger.kt b/packages/SystemUI/src/com/android/systemui/volume/shared/VolumeLogger.kt
index d6b159e9b13a..3847df66c7f7 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/shared/VolumeLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/shared/VolumeLogger.kt
@@ -41,7 +41,7 @@ class VolumeLogger @Inject constructor(@VolumeLog private val logBuffer: LogBuff
str1 = audioStream.toString()
int1 = volume
},
- { "Set volume: stream=$str1 volume=$int1" }
+ { "Set volume: stream=$str1 volume=$int1" },
)
}
@@ -53,7 +53,7 @@ class VolumeLogger @Inject constructor(@VolumeLog private val logBuffer: LogBuff
str1 = audioStream.toString()
int1 = model.volume
},
- { "Volume update received: stream=$str1 volume=$int1" }
+ { "Volume update received: stream=$str1 volume=$int1" },
)
}
@@ -62,7 +62,7 @@ class VolumeLogger @Inject constructor(@VolumeLog private val logBuffer: LogBuff
TAG,
LogLevel.DEBUG,
{ bool1 = state },
- { "Audio sharing state update: state=$bool1" }
+ { "Audio sharing state update: state=$bool1" },
)
}
@@ -71,7 +71,7 @@ class VolumeLogger @Inject constructor(@VolumeLog private val logBuffer: LogBuff
TAG,
LogLevel.DEBUG,
{ int1 = groupId },
- { "Secondary group id in audio sharing update: groupId=$int1" }
+ { "Secondary group id in audio sharing update: groupId=$int1" },
)
}
@@ -80,11 +80,23 @@ class VolumeLogger @Inject constructor(@VolumeLog private val logBuffer: LogBuff
TAG,
LogLevel.DEBUG,
{ str1 = map.toString() },
- { "Volume map update: map=$str1" }
+ { "Volume map update: map=$str1" },
)
}
override fun onSetDeviceVolumeRequested(volume: Int) {
logBuffer.log(TAG, LogLevel.DEBUG, { int1 = volume }, { "Set device volume: volume=$int1" })
}
+
+ override fun onAudioSharingAvailabilityRequestedError(requestFrom: String, e: String) {
+ logBuffer.log(
+ TAG,
+ LogLevel.WARNING,
+ {
+ str1 = requestFrom
+ str1 = e
+ },
+ { "$str1, fail to check audio sharing availability: e=$str2" },
+ )
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutCustomizationViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutCustomizationViewModelTest.kt
index f8d848139039..a9b6dd16cd95 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutCustomizationViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutCustomizationViewModelTest.kt
@@ -26,6 +26,7 @@ import com.android.systemui.keyboard.shortcut.shared.model.ShortcutKey
import com.android.systemui.keyboard.shortcut.shortcutCustomizationViewModelFactory
import com.android.systemui.keyboard.shortcut.ui.model.ShortcutCustomizationUiState
import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.testCase
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
import com.google.common.truth.Truth.assertThat
@@ -37,7 +38,7 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class ShortcutCustomizationViewModelTest : SysuiTestCase() {
- private val kosmos = Kosmos()
+ private val kosmos = Kosmos().also { it.testCase = this }
private val testScope = kosmos.testScope
private val viewModel = kosmos.shortcutCustomizationViewModelFactory.create()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModelTest.kt
index 7383faf2fd78..feae901114e5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModelTest.kt
@@ -278,7 +278,11 @@ class ShortcutHelperViewModelTest : SysuiTestCase() {
testScope.runTest {
fakeSystemSource.setGroups(
groupWithShortcutLabels("first Foo shortcut1", "first bar shortcut1"),
- groupWithShortcutLabels("second foO shortcut2", "second bar shortcut2"),
+ groupWithShortcutLabels(
+ "second foO shortcut2",
+ "second bar shortcut2",
+ groupLabel = SECOND_SIMPLE_GROUP_LABEL,
+ ),
)
fakeMultiTaskingSource.setGroups(
groupWithShortcutLabels("third FoO shortcut1", "third bar shortcut1")
@@ -298,7 +302,10 @@ class ShortcutHelperViewModelTest : SysuiTestCase() {
ShortcutCategory(
System,
subCategoryWithShortcutLabels("first Foo shortcut1"),
- subCategoryWithShortcutLabels("second foO shortcut2"),
+ subCategoryWithShortcutLabels(
+ "second foO shortcut2",
+ subCategoryLabel = SECOND_SIMPLE_GROUP_LABEL,
+ ),
),
),
ShortcutCategoryUi(
@@ -380,16 +387,23 @@ class ShortcutHelperViewModelTest : SysuiTestCase() {
assertThat(activeUiState.defaultSelectedCategory).isInstanceOf(CurrentApp::class.java)
}
- private fun groupWithShortcutLabels(vararg shortcutLabels: String) =
- KeyboardShortcutGroup(SIMPLE_GROUP_LABEL, shortcutLabels.map { simpleShortcutInfo(it) })
- .apply { packageName = "test.package.name" }
+ private fun groupWithShortcutLabels(
+ vararg shortcutLabels: String,
+ groupLabel: String = FIRST_SIMPLE_GROUP_LABEL,
+ ) =
+ KeyboardShortcutGroup(groupLabel, shortcutLabels.map { simpleShortcutInfo(it) }).apply {
+ packageName = "test.package.name"
+ }
private fun simpleShortcutInfo(label: String) =
KeyboardShortcutInfo(label, KeyEvent.KEYCODE_A, KeyEvent.META_CTRL_ON)
- private fun subCategoryWithShortcutLabels(vararg shortcutLabels: String) =
+ private fun subCategoryWithShortcutLabels(
+ vararg shortcutLabels: String,
+ subCategoryLabel: String = FIRST_SIMPLE_GROUP_LABEL,
+ ) =
ShortcutSubCategory(
- label = SIMPLE_GROUP_LABEL,
+ label = subCategoryLabel,
shortcuts = shortcutLabels.map { simpleShortcut(it) },
)
@@ -402,6 +416,7 @@ class ShortcutHelperViewModelTest : SysuiTestCase() {
}
companion object {
- private const val SIMPLE_GROUP_LABEL = "simple group"
+ private const val FIRST_SIMPLE_GROUP_LABEL = "simple group 1"
+ private const val SECOND_SIMPLE_GROUP_LABEL = "simple group 2"
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayCoreStartableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayCoreStartableTest.kt
new file mode 100644
index 000000000000..c8faa81adffa
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayCoreStartableTest.kt
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2024 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.reardisplay
+
+import android.hardware.devicestate.feature.flags.Flags.FLAG_DEVICE_STATE_RDM_V2
+import android.hardware.display.rearDisplay
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
+import android.view.Display
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.deviceStateManager
+import com.android.systemui.display.domain.interactor.RearDisplayStateInteractor
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.runTest
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.kosmos.useUnconfinedTestDispatcher
+import com.android.systemui.rearDisplayInnerDialogDelegateFactory
+import com.android.systemui.statusbar.phone.SystemUIDialog
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
+import org.junit.Before
+import org.junit.Test
+import org.mockito.kotlin.any
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+
+/** atest SystemUITests:com.android.systemui.reardisplay.RearDisplayCoreStartableTest */
+@SmallTest
+@kotlinx.coroutines.ExperimentalCoroutinesApi
+class RearDisplayCoreStartableTest : SysuiTestCase() {
+
+ private val kosmos = testKosmos().useUnconfinedTestDispatcher()
+ private val mockDelegate: RearDisplayInnerDialogDelegate = mock()
+ private val mockDialog: SystemUIDialog = mock()
+
+ private val fakeRearDisplayStateInteractor = FakeRearDisplayStateInteractor(kosmos)
+ private val impl =
+ RearDisplayCoreStartable(
+ mContext,
+ kosmos.deviceStateManager,
+ fakeRearDisplayStateInteractor,
+ kosmos.rearDisplayInnerDialogDelegateFactory,
+ kosmos.testScope,
+ )
+
+ @Before
+ fun setup() {
+ whenever(kosmos.rearDisplay.flags).thenReturn(Display.FLAG_REAR)
+ whenever(kosmos.rearDisplay.displayAdjustments)
+ .thenReturn(mContext.display.displayAdjustments)
+ whenever(kosmos.rearDisplayInnerDialogDelegateFactory.create(any(), any()))
+ .thenReturn(mockDelegate)
+ whenever(mockDelegate.createDialog()).thenReturn(mockDialog)
+ }
+
+ @Test
+ @DisableFlags(FLAG_DEVICE_STATE_RDM_V2)
+ fun testWhenFlagDisabled() =
+ kosmos.runTest {
+ impl.use {
+ it.start()
+ assertThat(impl.stateChangeListener).isNull()
+ }
+ }
+
+ @Test
+ @EnableFlags(FLAG_DEVICE_STATE_RDM_V2)
+ fun testShowAndDismissDialog() =
+ kosmos.runTest {
+ impl.use {
+ it.start()
+ fakeRearDisplayStateInteractor.emitRearDisplay()
+ verify(mockDialog).show()
+ verify(mockDialog, never()).dismiss()
+
+ fakeRearDisplayStateInteractor.emitDisabled()
+ verify(mockDialog).dismiss()
+ }
+ }
+
+ private class FakeRearDisplayStateInteractor(private val kosmos: Kosmos) :
+ RearDisplayStateInteractor {
+ private val stateFlow = MutableSharedFlow<RearDisplayStateInteractor.State>()
+
+ suspend fun emitRearDisplay() =
+ stateFlow.emit(RearDisplayStateInteractor.State.Enabled(kosmos.rearDisplay))
+
+ suspend fun emitDisabled() = stateFlow.emit(RearDisplayStateInteractor.State.Disabled)
+
+ override val state: Flow<RearDisplayStateInteractor.State>
+ get() = stateFlow
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegateTest.kt b/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegateTest.kt
new file mode 100644
index 000000000000..60588802ffa9
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayInnerDialogDelegateTest.kt
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2024 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.reardisplay
+
+import android.testing.TestableLooper
+import android.view.View
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.res.R
+import com.android.systemui.statusbar.phone.systemUIDialogDotFactory
+import com.android.systemui.testKosmos
+import junit.framework.Assert.assertFalse
+import junit.framework.Assert.assertTrue
+import org.junit.Test
+import org.mockito.Mockito.verify
+import org.mockito.kotlin.mock
+
+/** atest SystemUITests:com.android.systemui.reardisplay.RearDisplayInnerDialogDelegateTest */
+@SmallTest
+@TestableLooper.RunWithLooper
+class RearDisplayInnerDialogDelegateTest : SysuiTestCase() {
+
+ private val kosmos = testKosmos()
+
+ @Test
+ fun testShowAndDismissDialog() {
+ val dialogDelegate =
+ RearDisplayInnerDialogDelegate(kosmos.systemUIDialogDotFactory, mContext) {}
+
+ val dialog = dialogDelegate.createDialog()
+ dialog.show()
+ assertTrue(dialog.isShowing)
+
+ dialog.dismiss()
+ assertFalse(dialog.isShowing)
+ }
+
+ @Test
+ fun testCancel() {
+ val mockCallback = mock<Runnable>()
+ RearDisplayInnerDialogDelegate(kosmos.systemUIDialogDotFactory, mContext) {
+ mockCallback.run()
+ }
+ .createDialog()
+ .apply {
+ show()
+ findViewById<View>(R.id.button_cancel).performClick()
+ verify(mockCallback).run()
+ }
+ }
+}
diff --git a/packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt b/packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt
index 796ec9400249..45dcb28b23ee 100644
--- a/packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt
@@ -16,7 +16,12 @@
package android.hardware.display
+import android.view.Display
import com.android.systemui.kosmos.Kosmos
-import com.android.systemui.util.mockito.mock
+import org.mockito.kotlin.mock
val Kosmos.displayManager by Kosmos.Fixture { mock<DisplayManager>() }
+
+val Kosmos.defaultDisplay: Display by Kosmos.Fixture { mock<Display>() }
+
+val Kosmos.rearDisplay: Display by Kosmos.Fixture { mock<Display>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/DeviceStateManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/DeviceStateManagerKosmos.kt
index 9c55820b797c..b8a095eae23e 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/DeviceStateManagerKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/DeviceStateManagerKosmos.kt
@@ -18,6 +18,7 @@ package com.android.systemui
import android.hardware.devicestate.DeviceState
import android.hardware.devicestate.DeviceState.PROPERTY_FEATURE_REAR_DISPLAY
+import android.hardware.devicestate.DeviceState.PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT
import android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY
import android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY
import android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_HARDWARE_CONFIGURATION_FOLD_IN_CLOSED
@@ -44,7 +45,7 @@ val Kosmos.foldedDeviceStateList by
.setSystemProperties(
setOf(
PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY,
- PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP
+ PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP,
)
)
.setPhysicalProperties(
@@ -57,7 +58,7 @@ val Kosmos.foldedDeviceStateList by
.setSystemProperties(
setOf(
PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY,
- PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP
+ PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP,
)
)
.setPhysicalProperties(
@@ -70,14 +71,14 @@ val Kosmos.foldedDeviceStateList by
.setSystemProperties(
setOf(
PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY,
- PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP
+ PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP,
)
)
.setPhysicalProperties(
setOf(PROPERTY_FOLDABLE_HARDWARE_CONFIGURATION_FOLD_IN_CLOSED)
)
.build()
- )
+ ),
)
}
@@ -88,7 +89,7 @@ val Kosmos.halfFoldedDeviceState by
.setSystemProperties(
setOf(
PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY,
- PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE
+ PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE,
)
)
.setPhysicalProperties(
@@ -105,7 +106,7 @@ val Kosmos.unfoldedDeviceState by
.setSystemProperties(
setOf(
PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY,
- PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE
+ PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE,
)
)
.setPhysicalProperties(setOf(PROPERTY_FOLDABLE_HARDWARE_CONFIGURATION_FOLD_IN_OPEN))
@@ -120,7 +121,22 @@ val Kosmos.rearDisplayDeviceState by
.setSystemProperties(
setOf(
PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY,
- PROPERTY_FEATURE_REAR_DISPLAY
+ PROPERTY_FEATURE_REAR_DISPLAY,
+ )
+ )
+ .build()
+ )
+ }
+
+val Kosmos.rearDisplayOuterDefaultDeviceState by
+ Kosmos.Fixture {
+ DeviceState(
+ DeviceState.Configuration.Builder(5 /* identifier */, "REAR_DISPLAY")
+ .setSystemProperties(
+ setOf(
+ PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY,
+ PROPERTY_FEATURE_REAR_DISPLAY,
+ PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT,
)
)
.build()
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/RearDisplayInnerDialogDelegateKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/RearDisplayInnerDialogDelegateKosmos.kt
new file mode 100644
index 000000000000..6f5985536fe7
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/RearDisplayInnerDialogDelegateKosmos.kt
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2024 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
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.reardisplay.RearDisplayInnerDialogDelegate
+import org.mockito.kotlin.mock
+
+val Kosmos.rearDisplayInnerDialogDelegateFactory by
+ Kosmos.Fixture { mock<RearDisplayInnerDialogDelegate.Factory>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelKosmos.kt
index 2198e04eaf8a..e36ad427b43e 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelKosmos.kt
@@ -21,7 +21,7 @@ import com.android.systemui.brightness.domain.interactor.screenBrightnessInterac
import com.android.systemui.haptics.slider.sliderHapticsViewModelFactory
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.settings.brightness.domain.interactor.brightnessMirrorShowingInteractor
-import com.android.systemui.kosmos.brightnessWarningToast
+import com.android.systemui.settings.brightness.ui.brightnessWarningToast
val Kosmos.brightnessSliderViewModelFactory: BrightnessSliderViewModel.Factory by
Kosmos.Fixture {
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/KeyboardShortcutHelperKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/KeyboardShortcutHelperKosmos.kt
index 903bc8ebf42d..9cb15c5b816d 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/KeyboardShortcutHelperKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/KeyboardShortcutHelperKosmos.kt
@@ -136,7 +136,11 @@ val Kosmos.shortcutHelperStateInteractor by
}
val Kosmos.shortcutHelperCategoriesInteractor by
- Kosmos.Fixture { ShortcutHelperCategoriesInteractor(defaultShortcutCategoriesRepository) }
+ Kosmos.Fixture {
+ ShortcutHelperCategoriesInteractor(defaultShortcutCategoriesRepository) {
+ customShortcutCategoriesRepository
+ }
+ }
val Kosmos.shortcutHelperViewModel by
Kosmos.Fixture {
@@ -162,7 +166,8 @@ val Kosmos.shortcutCustomizationDialogStarterFactory by
}
}
-val Kosmos.shortcutCustomizationInteractor by Kosmos.Fixture { ShortcutCustomizationInteractor() }
+val Kosmos.shortcutCustomizationInteractor by
+ Kosmos.Fixture { ShortcutCustomizationInteractor(customShortcutCategoriesRepository) }
val Kosmos.shortcutCustomizationViewModelFactory by
Kosmos.Fixture {
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelKosmos.kt
index d33d594d9e8a..76e2cc8b7bd0 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardSmartspaceViewModelKosmos.kt
@@ -19,6 +19,7 @@ package com.android.systemui.keyguard.ui.viewmodel
import com.android.systemui.keyguard.domain.interactor.keyguardSmartspaceInteractor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.shade.domain.interactor.shadeInteractor
import com.android.systemui.util.mockito.mock
val Kosmos.keyguardSmartspaceViewModel by
@@ -28,5 +29,6 @@ val Kosmos.keyguardSmartspaceViewModel by
smartspaceController = mock(),
keyguardClockViewModel = keyguardClockViewModel,
smartspaceInteractor = keyguardSmartspaceInteractor,
+ shadeInteractor = shadeInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt
index f43841b31c2e..72cb1dfe38db 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt
@@ -3,9 +3,6 @@ package com.android.systemui.kosmos
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.Kosmos.Fixture
-import com.android.systemui.settings.brightness.ui.BrightnessWarningToast
-
-import com.android.systemui.util.mockito.mock
import kotlin.coroutines.CoroutineContext
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.test.StandardTestDispatcher
@@ -41,9 +38,6 @@ var Kosmos.backgroundCoroutineContext: CoroutineContext by Fixture {
testScope.backgroundScope.coroutineContext
}
var Kosmos.mainCoroutineContext: CoroutineContext by Fixture { testScope.coroutineContext }
-var Kosmos.brightnessWarningToast: BrightnessWarningToast by Kosmos.Fixture {
- mock<BrightnessWarningToast>()
-}
/**
* Run this test body with a [Kosmos] as receiver, and using the [testScope] currently installed in
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/settings/BrightnessSliderControllerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/settings/BrightnessSliderControllerKosmos.kt
index aac122c6610c..5d146fbffaca 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/settings/BrightnessSliderControllerKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/settings/BrightnessSliderControllerKosmos.kt
@@ -21,9 +21,9 @@ import com.android.systemui.classifier.falsingManager
import com.android.systemui.haptics.msdl.msdlPlayer
import com.android.systemui.haptics.vibratorHelper
import com.android.systemui.kosmos.Kosmos
-import com.android.systemui.kosmos.brightnessWarningToast
import com.android.systemui.plugins.activityStarter
import com.android.systemui.settings.brightness.BrightnessSliderController
+import com.android.systemui.settings.brightness.ui.brightnessWarningToast
import com.android.systemui.util.time.systemClock
/** This factory creates empty mocks. */
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/settings/brightness/ui/BrightnessWarningToastKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/settings/brightness/ui/BrightnessWarningToastKosmos.kt
new file mode 100644
index 000000000000..d9acb527522a
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/settings/brightness/ui/BrightnessWarningToastKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2024 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.settings.brightness.ui
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.util.mockito.mock
+
+var Kosmos.brightnessWarningToast: BrightnessWarningToast by
+ Kosmos.Fixture { mock<BrightnessWarningToast>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java
index 65f4122f773e..21a910b67dff 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java
@@ -16,6 +16,8 @@
package com.android.systemui.util.settings;
+import static com.android.systemui.util.settings.JavaAdapter.newCoroutineScope;
+
import static kotlinx.coroutines.test.TestCoroutineDispatchersKt.StandardTestDispatcher;
import android.annotation.NonNull;
@@ -25,6 +27,7 @@ import android.database.ContentObserver;
import android.net.Uri;
import kotlinx.coroutines.CoroutineDispatcher;
+import kotlinx.coroutines.CoroutineScope;
import java.util.ArrayList;
import java.util.HashMap;
@@ -34,7 +37,7 @@ import java.util.Map;
public class FakeGlobalSettings implements GlobalSettings {
private final Map<String, String> mValues = new HashMap<>();
private final Map<String, List<ContentObserver>> mContentObserversAllUsers = new HashMap<>();
- private final CoroutineDispatcher mDispatcher;
+ private final CoroutineScope mSettingsScope;
public static final Uri CONTENT_URI = Uri.parse("content://settings/fake_global");
@@ -44,11 +47,15 @@ public class FakeGlobalSettings implements GlobalSettings {
*/
@Deprecated
public FakeGlobalSettings() {
- mDispatcher = StandardTestDispatcher(/* scheduler = */ null, /* name = */ null);
+ CoroutineDispatcher dispatcher = StandardTestDispatcher(
+ /* scheduler = */ null,
+ /* name = */ null
+ );
+ mSettingsScope = newCoroutineScope(dispatcher);
}
public FakeGlobalSettings(CoroutineDispatcher dispatcher) {
- mDispatcher = dispatcher;
+ mSettingsScope = newCoroutineScope(dispatcher);
}
@NonNull
@@ -61,8 +68,8 @@ public class FakeGlobalSettings implements GlobalSettings {
@NonNull
@Override
- public CoroutineDispatcher getBackgroundDispatcher() {
- return mDispatcher;
+ public CoroutineScope getSettingsScope() {
+ return mSettingsScope;
}
@Override
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettingsKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettingsKosmos.kt
index 35fa2af7639f..78b78ca86a8d 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettingsKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettingsKosmos.kt
@@ -19,5 +19,14 @@ package com.android.systemui.util.settings
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.Kosmos.Fixture
import com.android.systemui.kosmos.testDispatcher
+import kotlin.coroutines.CoroutineContext
+import kotlinx.coroutines.CoroutineScope
val Kosmos.fakeGlobalSettings: FakeGlobalSettings by Fixture { FakeGlobalSettings(testDispatcher) }
+
+object JavaAdapter {
+ @JvmStatic
+ fun newCoroutineScope(context: CoroutineContext): CoroutineScope {
+ return CoroutineScope(context)
+ }
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettings.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettings.kt
index e5d113be7ca2..a3572754ab19 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettings.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettings.kt
@@ -24,6 +24,7 @@ import android.util.Pair
import androidx.annotation.VisibleForTesting
import com.android.systemui.util.settings.SettingsProxy.CurrentUserIdProvider
import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestDispatcher
@@ -33,7 +34,7 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
private val contentObservers = mutableMapOf<SettingsKey, MutableList<ContentObserver>>()
private val contentObserversAllUsers = mutableMapOf<String, MutableList<ContentObserver>>()
- override val backgroundDispatcher: CoroutineDispatcher
+ override val settingsScope: CoroutineScope
@UserIdInt override var userId = UserHandle.USER_CURRENT
override val currentUserProvider: CurrentUserIdProvider
@@ -43,17 +44,17 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
by main test scope."""
)
constructor() {
- backgroundDispatcher = StandardTestDispatcher(scheduler = null, name = null)
+ settingsScope = CoroutineScope(StandardTestDispatcher(scheduler = null, name = null))
currentUserProvider = CurrentUserIdProvider { userId }
}
constructor(dispatcher: CoroutineDispatcher) {
- backgroundDispatcher = dispatcher
+ settingsScope = CoroutineScope(dispatcher)
currentUserProvider = CurrentUserIdProvider { userId }
}
constructor(dispatcher: CoroutineDispatcher, currentUserProvider: CurrentUserIdProvider) {
- backgroundDispatcher = dispatcher
+ settingsScope = CoroutineScope(dispatcher)
this.currentUserProvider = currentUserProvider
}
@@ -77,7 +78,7 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
uri: Uri,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) {
if (userHandle == UserHandle.USER_ALL) {
contentObserversAllUsers
@@ -107,31 +108,31 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
override suspend fun registerContentObserver(
uri: Uri,
notifyForDescendants: Boolean,
- settingsObserver: ContentObserver
+ settingsObserver: ContentObserver,
) = suspendAdvanceDispatcher {
super<UserSettingsProxy>.registerContentObserver(
uri,
notifyForDescendants,
- settingsObserver
+ settingsObserver,
)
}
override fun registerContentObserverAsync(
uri: Uri,
notifyForDescendants: Boolean,
- settingsObserver: ContentObserver
+ settingsObserver: ContentObserver,
): Job = advanceDispatcher {
super<UserSettingsProxy>.registerContentObserverAsync(
uri,
notifyForDescendants,
- settingsObserver
+ settingsObserver,
)
}
override suspend fun registerContentObserverForUser(
name: String,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) = suspendAdvanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUser(name, settingsObserver, userHandle)
}
@@ -139,12 +140,12 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
override fun registerContentObserverForUserAsync(
name: String,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
): Job = advanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUserAsync(
name,
settingsObserver,
- userHandle
+ userHandle,
)
}
@@ -156,7 +157,7 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
override suspend fun registerContentObserverForUser(
uri: Uri,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) = suspendAdvanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUser(uri, settingsObserver, userHandle)
}
@@ -164,12 +165,12 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
override fun registerContentObserverForUserAsync(
uri: Uri,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
): Job = advanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUserAsync(
uri,
settingsObserver,
- userHandle
+ userHandle,
)
}
@@ -177,13 +178,13 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
uri: Uri,
settingsObserver: ContentObserver,
userHandle: Int,
- registered: Runnable
+ registered: Runnable,
): Job = advanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUserAsync(
uri,
settingsObserver,
userHandle,
- registered
+ registered,
)
}
@@ -191,13 +192,13 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
name: String,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) = suspendAdvanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUser(
name,
notifyForDescendants,
settingsObserver,
- userHandle
+ userHandle,
)
}
@@ -205,13 +206,13 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
name: String,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
) = advanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUserAsync(
name,
notifyForDescendants,
settingsObserver,
- userHandle
+ userHandle,
)
}
@@ -219,13 +220,13 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
uri: Uri,
notifyForDescendants: Boolean,
settingsObserver: ContentObserver,
- userHandle: Int
+ userHandle: Int,
): Job = advanceDispatcher {
super<UserSettingsProxy>.registerContentObserverForUserAsync(
uri,
notifyForDescendants,
settingsObserver,
- userHandle
+ userHandle,
)
}
@@ -259,7 +260,7 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
tag: String?,
makeDefault: Boolean,
userHandle: Int,
- overrideableByRestore: Boolean
+ overrideableByRestore: Boolean,
): Boolean {
val key = SettingsKey(userHandle, getUriFor(name).toString())
values[key] = value
@@ -275,7 +276,7 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
name: String,
value: String?,
tag: String?,
- makeDefault: Boolean
+ makeDefault: Boolean,
): Boolean {
return putString(name, value)
}
@@ -293,8 +294,9 @@ class FakeSettings : SecureSettings, SystemSettings, UserSettingsProxy {
return result
}
+ @OptIn(ExperimentalStdlibApi::class)
private fun testDispatcherRunCurrent() {
- val testDispatcher = backgroundDispatcher as? TestDispatcher
+ val testDispatcher = settingsScope.coroutineContext[CoroutineDispatcher] as? TestDispatcher
testDispatcher?.scheduler?.runCurrent()
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/FakeAudioSharingInteractor.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/FakeAudioSharingInteractor.kt
new file mode 100644
index 000000000000..1fb5e77a3210
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/FakeAudioSharingInteractor.kt
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2024 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.volume.domain.interactor
+
+import android.content.Context
+import androidx.annotation.IntRange
+import com.android.dream.lowlight.dagger.qualifiers.Application
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
+
+class FakeAudioSharingInteractor : AudioSharingInteractor {
+ private val mutableInAudioSharing: MutableStateFlow<Boolean> = MutableStateFlow(false)
+ private val mutableVolume: MutableStateFlow<Int?> = MutableStateFlow(null)
+ private var audioSharingVolumeBarAvailable = false
+
+ override val isInAudioSharing: Flow<Boolean> = mutableInAudioSharing
+ override val volume: Flow<Int?> = mutableVolume
+ override val volumeMin: Int = AUDIO_SHARING_VOLUME_MIN
+ override val volumeMax: Int = AUDIO_SHARING_VOLUME_MAX
+
+ override suspend fun audioSharingVolumeBarAvailable(@Application context: Context): Boolean =
+ audioSharingVolumeBarAvailable
+
+ override fun setStreamVolume(
+ @IntRange(from = AUDIO_SHARING_VOLUME_MIN.toLong(), to = AUDIO_SHARING_VOLUME_MAX.toLong())
+ level: Int
+ ) {}
+
+ override fun handlePrimaryGroupChange() {}
+
+ fun setInAudioSharing(state: Boolean) {
+ mutableInAudioSharing.value = state
+ }
+
+ fun setVolume(volume: Int?) {
+ mutableVolume.value = volume
+ }
+
+ fun setAudioSharingVolumeBarAvailable(available: Boolean) {
+ audioSharingVolumeBarAvailable = available
+ }
+
+ companion object {
+ const val AUDIO_SHARING_VOLUME_MIN = 0
+ const val AUDIO_SHARING_VOLUME_MAX = 255
+ }
+}
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodAwareTestRunner.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodAwareTestRunner.java
index 869d854f7b23..9b71f8050c80 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodAwareTestRunner.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodAwareTestRunner.java
@@ -30,6 +30,8 @@ import android.util.Log;
import androidx.test.platform.app.InstrumentationRegistry;
+import com.android.ravenwood.common.RavenwoodCommonUtils;
+
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runner.Runner;
@@ -229,7 +231,9 @@ public final class RavenwoodAwareTestRunner extends RavenwoodAwareTestRunnerBase
s.evaluate();
onAfter(description, scope, order, null);
} catch (Throwable t) {
- if (onAfter(description, scope, order, t)) {
+ var shouldReportFailure = RavenwoodCommonUtils.runIgnoringException(
+ () -> onAfter(description, scope, order, t));
+ if (shouldReportFailure == null || shouldReportFailure) {
throw t;
}
}
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
index 678a97be60a2..1c1f15761329 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
@@ -22,6 +22,8 @@ import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_INST_R
import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_RESOURCE_APK;
import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_VERBOSE_LOGGING;
import static com.android.ravenwood.common.RavenwoodCommonUtils.RAVENWOOD_VERSION_JAVA_SYSPROP;
+import static com.android.ravenwood.common.RavenwoodCommonUtils.parseNullableInt;
+import static com.android.ravenwood.common.RavenwoodCommonUtils.withDefault;
import static org.junit.Assert.assertThrows;
import static org.mockito.ArgumentMatchers.any;
@@ -39,6 +41,7 @@ import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.os.Binder;
import android.os.Build;
+import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.os.HandlerThread;
import android.os.Looper;
@@ -154,6 +157,13 @@ public class RavenwoodRuntimeEnvironmentController {
private static RavenwoodAwareTestRunner sRunner;
private static RavenwoodSystemProperties sProps;
+ private static final int DEFAULT_TARGET_SDK_LEVEL = VERSION_CODES.CUR_DEVELOPMENT;
+ private static final String DEFAULT_PACKAGE_NAME = "com.android.ravenwoodtests.defaultname";
+
+ private static int sTargetSdkLevel;
+ private static String sTestPackageName;
+ private static String sTargetPackageName;
+
/**
* Initialize the global environment.
*/
@@ -235,9 +245,22 @@ public class RavenwoodRuntimeEnvironmentController {
System.setProperty("android.junit.runner",
"androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner");
+ loadRavenwoodProperties();
+
assertMockitoVersion();
}
+ private static void loadRavenwoodProperties() {
+ var props = RavenwoodSystemProperties.readProperties("ravenwood.properties");
+
+ sTargetSdkLevel = withDefault(
+ parseNullableInt(props.get("targetSdkVersionInt")), DEFAULT_TARGET_SDK_LEVEL);
+ sTargetPackageName = withDefault(props.get("packageName"), DEFAULT_PACKAGE_NAME);
+ sTestPackageName = withDefault(props.get("instPackageName"), sTargetPackageName);
+
+ // TODO(b/377765941) Read them from the manifest too?
+ }
+
/**
* Initialize the environment.
*/
@@ -256,7 +279,9 @@ public class RavenwoodRuntimeEnvironmentController {
initInner(runner.mState.getConfig());
} catch (Exception th) {
Log.e(TAG, "init() failed", th);
- reset();
+
+ RavenwoodCommonUtils.runIgnoringException(()-> reset());
+
SneakyThrow.sneakyThrow(th);
}
}
@@ -267,6 +292,14 @@ public class RavenwoodRuntimeEnvironmentController {
Thread.setDefaultUncaughtExceptionHandler(sUncaughtExceptionHandler);
}
+ config.mTargetPackageName = sTargetPackageName;
+ config.mTestPackageName = sTestPackageName;
+ config.mTargetSdkLevel = sTargetSdkLevel;
+
+ Log.i(TAG, "TargetPackageName=" + sTargetPackageName);
+ Log.i(TAG, "TestPackageName=" + sTestPackageName);
+ Log.i(TAG, "TargetSdkLevel=" + sTargetSdkLevel);
+
RavenwoodRuntimeState.sUid = config.mUid;
RavenwoodRuntimeState.sPid = config.mPid;
RavenwoodRuntimeState.sTargetSdkLevel = config.mTargetSdkLevel;
@@ -349,8 +382,11 @@ public class RavenwoodRuntimeEnvironmentController {
* Partially re-initialize after each test method invocation
*/
public static void reinit() {
- var config = sRunner.mState.getConfig();
- Binder.restoreCallingIdentity(packBinderIdentityToken(false, config.mUid, config.mPid));
+ // sRunner could be null, if there was a failure in the initialization.
+ if (sRunner != null) {
+ var config = sRunner.mState.getConfig();
+ Binder.restoreCallingIdentity(packBinderIdentityToken(false, config.mUid, config.mPid));
+ }
}
private static void initializeCompatIds(RavenwoodConfig config) {
@@ -380,6 +416,9 @@ public class RavenwoodRuntimeEnvironmentController {
/**
* De-initialize.
+ *
+ * Note, we call this method when init() fails too, so this method should deal with
+ * any partially-initialized states.
*/
public static void reset() {
if (RAVENWOOD_VERBOSE_LOGGING) {
@@ -411,7 +450,9 @@ public class RavenwoodRuntimeEnvironmentController {
config.mState.mSystemServerContext.cleanUp();
}
- Looper.getMainLooper().quit();
+ if (Looper.getMainLooper() != null) {
+ Looper.getMainLooper().quit();
+ }
Looper.clearMainLooperForTest();
ActivityManager.reset$ravenwood();
diff --git a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodConfig.java b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodConfig.java
index 3ed8b0a748e1..619c8e30c78e 100644
--- a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodConfig.java
+++ b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodConfig.java
@@ -22,7 +22,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.Instrumentation;
import android.content.Context;
-import android.os.Build;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -30,16 +29,12 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.ArrayList;
import java.util.List;
-import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
/**
- * Represents how to configure the ravenwood environment for a test class.
- *
- * If a ravenwood test class has a public static field with the {@link Config} annotation,
- * Ravenwood will extract the config from it and initializes the environment. The type of the
- * field must be of {@link RavenwoodConfig}.
+ * @deprecated This class will be removed. Reach out to g/ravenwood if you need any features in it.
*/
+@Deprecated
public final class RavenwoodConfig {
/**
* Use this to mark a field as the configuration.
@@ -66,7 +61,7 @@ public final class RavenwoodConfig {
String mTestPackageName;
String mTargetPackageName;
- int mTargetSdkLevel = Build.VERSION_CODES.CUR_DEVELOPMENT;
+ int mTargetSdkLevel;
final RavenwoodSystemProperties mSystemProperties = new RavenwoodSystemProperties();
@@ -91,12 +86,6 @@ public final class RavenwoodConfig {
return RavenwoodRule.isOnRavenwood();
}
- private void setDefaults() {
- if (mTargetPackageName == null) {
- mTargetPackageName = mTestPackageName;
- }
- }
-
public static class Builder {
private final RavenwoodConfig mConfig = new RavenwoodConfig();
@@ -120,28 +109,27 @@ public final class RavenwoodConfig {
}
/**
- * Configure the package name of the test, which corresponds to
- * {@link Instrumentation#getContext()}.
+ * @deprecated no longer used. Package name is set in the build file. (for now)
*/
+ @Deprecated
public Builder setPackageName(@NonNull String packageName) {
- mConfig.mTestPackageName = Objects.requireNonNull(packageName);
return this;
}
/**
- * Configure the package name of the target app, which corresponds to
- * {@link Instrumentation#getTargetContext()}. Defaults to {@link #setPackageName}.
+ * @deprecated no longer used. Package name is set in the build file. (for now)
*/
+ @Deprecated
public Builder setTargetPackageName(@NonNull String packageName) {
- mConfig.mTargetPackageName = Objects.requireNonNull(packageName);
return this;
}
+
/**
- * Configure the target SDK level of the test.
+ * @deprecated no longer used. Target SDK level is set in the build file. (for now)
*/
+ @Deprecated
public Builder setTargetSdkLevel(int sdkLevel) {
- mConfig.mTargetSdkLevel = sdkLevel;
return this;
}
@@ -205,7 +193,6 @@ public final class RavenwoodConfig {
}
public RavenwoodConfig build() {
- mConfig.setDefaults();
return mConfig;
}
}
diff --git a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
index bfa3802ce583..f7acd9022300 100644
--- a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
+++ b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
@@ -36,10 +36,8 @@ import java.util.Objects;
import java.util.regex.Pattern;
/**
- * @deprecated Use {@link RavenwoodConfig} to configure the ravenwood environment instead.
- * A {@link RavenwoodRule} is no longer needed for {@link DisabledOnRavenwood}. To get the
- * {@link Context} and {@link Instrumentation}, use
- * {@link androidx.test.platform.app.InstrumentationRegistry} instead.
+ * @deprecated This class is undergoing a major change. Reach out to g/ravenwood if you need
+ * any featues in it.
*/
@Deprecated
public final class RavenwoodRule implements TestRule {
@@ -128,11 +126,10 @@ public final class RavenwoodRule implements TestRule {
}
/**
- * Configure the identity of this process to be the given package name for the duration
- * of the test. Has no effect on non-Ravenwood environments.
+ * @deprecated no longer used.
*/
+ @Deprecated
public Builder setPackageName(@NonNull String packageName) {
- mBuilder.setPackageName(packageName);
return this;
}
diff --git a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodSystemProperties.java b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodSystemProperties.java
index 3e4619f55c6d..9bd376a76f77 100644
--- a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodSystemProperties.java
+++ b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodSystemProperties.java
@@ -52,7 +52,7 @@ public class RavenwoodSystemProperties {
"vendor_dlkm",
};
- private static Map<String, String> readProperties(String propFile) {
+ static Map<String, String> readProperties(String propFile) {
// Use an ordered map just for cleaner dump log.
final Map<String, String> ret = new LinkedHashMap<>();
try {
@@ -60,7 +60,7 @@ public class RavenwoodSystemProperties {
.map(String::trim)
.filter(s -> !s.startsWith("#"))
.map(s -> s.split("\\s*=\\s*", 2))
- .filter(a -> a.length == 2)
+ .filter(a -> a.length == 2 && a[1].length() > 0)
.forEach(a -> ret.put(a[0], a[1]));
} catch (IOException e) {
throw new RuntimeException(e);
diff --git a/ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodCommonUtils.java b/ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodCommonUtils.java
index 520f050f0655..2a04d4469ef4 100644
--- a/ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodCommonUtils.java
+++ b/ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodCommonUtils.java
@@ -30,6 +30,7 @@ import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Arrays;
+import java.util.function.Supplier;
public class RavenwoodCommonUtils {
private static final String TAG = "RavenwoodCommonUtils";
@@ -277,11 +278,55 @@ public class RavenwoodCommonUtils {
(isStatic ? "static" : "")));
}
+ /**
+ * Run a supplier and swallow the exception, if any.
+ *
+ * It's a dangerous function. Only use it in an exception handler where we don't want to crash.
+ */
+ @Nullable
+ public static <T> T runIgnoringException(@NonNull Supplier<T> s) {
+ try {
+ return s.get();
+ } catch (Throwable th) {
+ log(TAG, "Warning: Exception detected! " + getStackTraceString(th));
+ }
+ return null;
+ }
+
+ /**
+ * Run a runnable and swallow the exception, if any.
+ *
+ * It's a dangerous function. Only use it in an exception handler where we don't want to crash.
+ */
+ public static void runIgnoringException(@NonNull Runnable r) {
+ runIgnoringException(() -> {
+ r.run();
+ return null;
+ });
+ }
+
@NonNull
- public static String getStackTraceString(@Nullable Throwable th) {
+ public static String getStackTraceString(@NonNull Throwable th) {
StringWriter stringWriter = new StringWriter();
PrintWriter writer = new PrintWriter(stringWriter);
th.printStackTrace(writer);
return stringWriter.toString();
}
+
+ /** Same as {@link Integer#parseInt(String)} but accepts null and returns null. */
+ @Nullable
+ public static Integer parseNullableInt(@Nullable String value) {
+ if (value == null) {
+ return null;
+ }
+ return Integer.parseInt(value);
+ }
+
+ /**
+ * @return {@code value} if it's non-null. Otherwise, returns {@code def}.
+ */
+ @Nullable
+ public static <T> T withDefault(@Nullable T value, @Nullable T def) {
+ return value != null ? value : def;
+ }
}
diff --git a/ravenwood/tests/bivalentinst/Android.bp b/ravenwood/tests/bivalentinst/Android.bp
index 41e45e5a6d95..31e3bcc3634f 100644
--- a/ravenwood/tests/bivalentinst/Android.bp
+++ b/ravenwood/tests/bivalentinst/Android.bp
@@ -27,6 +27,9 @@ android_ravenwood_test {
"junit",
"truth",
],
+
+ package_name: "com.android.ravenwood.bivalentinsttest_self_inst",
+
resource_apk: "RavenwoodBivalentInstTest_self_inst_device",
auto_gen_config: true,
}
@@ -53,6 +56,10 @@ android_ravenwood_test {
"truth",
],
resource_apk: "RavenwoodBivalentInstTestTarget",
+
+ package_name: "com.android.ravenwood.bivalentinst_target_app",
+ inst_package_name: "com.android.ravenwood.bivalentinsttest_nonself_inst",
+
inst_resource_apk: "RavenwoodBivalentInstTest_nonself_inst_device",
auto_gen_config: true,
}
diff --git a/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_nonself.java b/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_nonself.java
index 92d43d714e14..db252d87c784 100644
--- a/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_nonself.java
+++ b/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_nonself.java
@@ -19,8 +19,6 @@ import static com.google.common.truth.Truth.assertThat;
import android.app.Instrumentation;
import android.content.Context;
-import android.platform.test.ravenwood.RavenwoodConfig;
-import android.platform.test.ravenwood.RavenwoodConfig.Config;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -39,11 +37,6 @@ public class RavenwoodInstrumentationTest_nonself {
private static final String TEST_PACKAGE_NAME =
"com.android.ravenwood.bivalentinsttest_nonself_inst";
- @Config
- public static final RavenwoodConfig sConfig = new RavenwoodConfig.Builder()
- .setPackageName(TEST_PACKAGE_NAME)
- .setTargetPackageName(TARGET_PACKAGE_NAME)
- .build();
private static Instrumentation sInstrumentation;
private static Context sTestContext;
diff --git a/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_self.java b/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_self.java
index 2f35923dead2..94b18619efcd 100644
--- a/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_self.java
+++ b/ravenwood/tests/bivalentinst/test/com/android/ravenwoodtest/bivalentinst/RavenwoodInstrumentationTest_self.java
@@ -19,8 +19,6 @@ import static com.google.common.truth.Truth.assertThat;
import android.app.Instrumentation;
import android.content.Context;
-import android.platform.test.ravenwood.RavenwoodConfig;
-import android.platform.test.ravenwood.RavenwoodConfig.Config;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -40,13 +38,6 @@ public class RavenwoodInstrumentationTest_self {
private static final String TEST_PACKAGE_NAME =
"com.android.ravenwood.bivalentinsttest_self_inst";
- @Config
- public static final RavenwoodConfig sConfig = new RavenwoodConfig.Builder()
- .setPackageName(TEST_PACKAGE_NAME)
- .setTargetPackageName(TARGET_PACKAGE_NAME)
- .build();
-
-
private static Instrumentation sInstrumentation;
private static Context sTestContext;
private static Context sTargetContext;
diff --git a/ravenwood/tests/bivalenttest/Android.bp b/ravenwood/tests/bivalenttest/Android.bp
index 40e6672a3c63..ac545dfb06cc 100644
--- a/ravenwood/tests/bivalenttest/Android.bp
+++ b/ravenwood/tests/bivalenttest/Android.bp
@@ -84,6 +84,8 @@ java_defaults {
android_ravenwood_test {
name: "RavenwoodBivalentTest",
defaults: ["ravenwood-bivalent-defaults"],
+ target_sdk_version: "34",
+ package_name: "com.android.ravenwoodtest.bivalenttest",
auto_gen_config: true,
}
diff --git a/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/RavenwoodConfigTest.java b/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/RavenwoodConfigTest.java
index a5a16c14600b..306c2b39c70d 100644
--- a/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/RavenwoodConfigTest.java
+++ b/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/RavenwoodConfigTest.java
@@ -20,8 +20,6 @@ import static android.platform.test.ravenwood.RavenwoodConfig.isOnRavenwood;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;
-import android.platform.test.ravenwood.RavenwoodConfig;
-
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -33,13 +31,7 @@ import org.junit.runner.RunWith;
*/
@RunWith(AndroidJUnit4.class)
public class RavenwoodConfigTest {
- private static final String PACKAGE_NAME = "com.test";
-
- @RavenwoodConfig.Config
- public static RavenwoodConfig sConfig =
- new RavenwoodConfig.Builder()
- .setPackageName(PACKAGE_NAME)
- .build();
+ private static final String PACKAGE_NAME = "com.android.ravenwoodtest.bivalenttest";
@Test
public void testConfig() {
diff --git a/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/compat/RavenwoodCompatFrameworkTest.kt b/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/compat/RavenwoodCompatFrameworkTest.kt
index a95760db1a61..882c91c43ee9 100644
--- a/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/compat/RavenwoodCompatFrameworkTest.kt
+++ b/ravenwood/tests/bivalenttest/test/com/android/ravenwoodtest/bivalenttest/compat/RavenwoodCompatFrameworkTest.kt
@@ -16,8 +16,6 @@
package com.android.ravenwoodtest.bivalenttest.compat
import android.app.compat.CompatChanges
-import android.os.Build
-import android.platform.test.ravenwood.RavenwoodConfig
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.internal.ravenwood.RavenwoodEnvironment.CompatIdsForTest
import org.junit.Assert
@@ -26,14 +24,6 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class RavenwoodCompatFrameworkTest {
- companion object {
- @JvmField // Expose as a raw field, not as a property.
- @RavenwoodConfig.Config
- val config = RavenwoodConfig.Builder()
- .setTargetSdkLevel(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
- .build()
- }
-
@Test
fun testEnabled() {
Assert.assertTrue(CompatChanges.isChangeEnabled(CompatIdsForTest.TEST_COMPAT_ID_1))
@@ -53,4 +43,4 @@ class RavenwoodCompatFrameworkTest {
fun testEnabledAfterUForUApps() {
Assert.assertFalse(CompatChanges.isChangeEnabled(CompatIdsForTest.TEST_COMPAT_ID_4))
}
-} \ No newline at end of file
+}
diff --git a/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerConfigValidationTest.java b/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerConfigValidationTest.java
index 02d10732245d..f94b98bc1fb8 100644
--- a/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerConfigValidationTest.java
+++ b/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerConfigValidationTest.java
@@ -24,6 +24,7 @@ import android.platform.test.ravenwood.RavenwoodRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestRule;
@@ -32,6 +33,10 @@ import org.junit.runner.RunWith;
/**
* Test for @Config field extraction and validation.
+ *
+ * TODO(b/377765941) Most of the tests here will be obsolete and deleted with b/377765941, but
+ * some of the tests may need to be re-implemented one way or another. (e.g. the package name
+ * test.) Until that happens, we'll keep all tests here but add an {@code @Ignore} instead.
*/
@NoRavenizer // This class shouldn't be executed with RavenwoodAwareTestRunner.
public class RavenwoodRunnerConfigValidationTest extends RavenwoodRunnerTestBase {
@@ -59,6 +64,7 @@ public class RavenwoodRunnerConfigValidationTest extends RavenwoodRunnerTestBase
testRunFinished: 1,0,0,0
""")
// CHECKSTYLE:ON
+ @Ignore // Package name is no longer set via config.
public static class ConfigInBaseClassTest extends ConfigInBaseClass {
@Test
public void test() {
@@ -83,6 +89,7 @@ public class RavenwoodRunnerConfigValidationTest extends RavenwoodRunnerTestBase
testRunFinished: 1,0,0,0
""")
// CHECKSTYLE:ON
+ @Ignore // Package name is no longer set via config.
public static class ConfigOverridingTest extends ConfigInBaseClass {
static String PACKAGE_NAME_OVERRIDE = "com.ConfigOverridingTest";
@@ -376,6 +383,7 @@ public class RavenwoodRunnerConfigValidationTest extends RavenwoodRunnerTestBase
testRunFinished: 1,0,0,0
""")
// CHECKSTYLE:ON
+ @Ignore // Package name is no longer set via config.
public static class RuleInBaseClassSuccessTest extends RuleInBaseClass {
@Test
@@ -437,6 +445,7 @@ public class RavenwoodRunnerConfigValidationTest extends RavenwoodRunnerTestBase
testRunFinished: 1,1,0,0
""")
// CHECKSTYLE:ON
+ @Ignore // Package name is no longer set via config.
public static class RuleWithDifferentTypeInBaseClassSuccessTest extends RuleWithDifferentTypeInBaseClass {
@Test
diff --git a/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerTestBase.java b/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerTestBase.java
index f7a2198a9bc4..0e3d053e90b1 100644
--- a/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerTestBase.java
+++ b/ravenwood/tests/coretest/test/com/android/ravenwoodtest/runnercallbacktests/RavenwoodRunnerTestBase.java
@@ -25,6 +25,8 @@ import android.util.Log;
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
+
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.Description;
import org.junit.runner.JUnitCore;
@@ -103,6 +105,7 @@ public abstract class RavenwoodRunnerTestBase {
var thisClass = this.getClass();
var ret = Arrays.stream(thisClass.getNestMembers())
.filter((c) -> c.getAnnotation(Expected.class) != null)
+ .filter((c) -> c.getAnnotation(Ignore.class) == null)
.toArray(Class[]::new);
assertThat(ret.length).isGreaterThan(0);
diff --git a/ravenwood/tests/runtime-test/Android.bp b/ravenwood/tests/runtime-test/Android.bp
index 0c0df1f993aa..c3520031ea7d 100644
--- a/ravenwood/tests/runtime-test/Android.bp
+++ b/ravenwood/tests/runtime-test/Android.bp
@@ -9,7 +9,7 @@ package {
android_ravenwood_test {
name: "RavenwoodRuntimeTest",
-
+ target_sdk_version: "34",
libs: [
"ravenwood-helper-runtime",
],
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 827e3effcf32..762665c00e05 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -16,6 +16,7 @@
package com.android.server.appwidget;
+import static android.appwidget.flags.Flags.checkRemoteViewsUriPermission;
import static android.appwidget.flags.Flags.remoteAdapterConversion;
import static android.appwidget.flags.Flags.remoteViewsProto;
import static android.appwidget.flags.Flags.removeAppWidgetServiceIoFromCriticalPath;
@@ -62,6 +63,7 @@ import android.appwidget.AppWidgetProviderInfo;
import android.appwidget.PendingHostUpdate;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.Intent.FilterComparison;
@@ -150,6 +152,8 @@ import com.android.modules.utils.TypedXmlSerializer;
import com.android.server.LocalServices;
import com.android.server.ServiceThread;
import com.android.server.WidgetBackupProvider;
+import com.android.server.uri.GrantUri;
+import com.android.server.uri.UriGrantsManagerInternal;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -2548,6 +2552,10 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
// Make sure the package runs under the caller uid.
mSecurityPolicy.enforceCallFromPackage(callingPackage);
+ // Make sure RemoteViews do not contain URIs that the caller cannot access.
+ if (checkRemoteViewsUriPermission()) {
+ checkRemoteViewsUris(views);
+ }
synchronized (mLock) {
ensureGroupStateLoadedLocked(userId);
@@ -2568,6 +2576,39 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
/**
+ * Checks that all of the Uris in the given RemoteViews are accessible to the caller.
+ */
+ private void checkRemoteViewsUris(RemoteViews views) {
+ UriGrantsManagerInternal uriGrantsManager = LocalServices.getService(
+ UriGrantsManagerInternal.class);
+ int callingUid = Binder.getCallingUid();
+ int callingUser = UserHandle.getCallingUserId();
+ views.visitUris(uri -> {
+ switch (uri.getScheme()) {
+ // Check that content:// URIs are accessible to the caller.
+ case ContentResolver.SCHEME_CONTENT:
+ boolean canAccessUri = uriGrantsManager.checkUriPermission(
+ GrantUri.resolve(callingUser, uri,
+ Intent.FLAG_GRANT_READ_URI_PERMISSION), callingUid,
+ Intent.FLAG_GRANT_READ_URI_PERMISSION,
+ /* isFullAccessForContentUri= */ true);
+ if (!canAccessUri) {
+ throw new SecurityException(
+ "Provider uid " + callingUid + " cannot access URI " + uri);
+ }
+ break;
+ // android.resource:// URIs are always allowed.
+ case ContentResolver.SCHEME_ANDROID_RESOURCE:
+ break;
+ // file:// and any other schemes are disallowed.
+ case ContentResolver.SCHEME_FILE:
+ default:
+ throw new SecurityException("Disallowed URI " + uri + " in RemoteViews.");
+ }
+ });
+ }
+
+ /**
* Increment the counter of widget ids and return the new id.
*
* Typically called by {@link #allocateAppWidgetId} when a instance of widget is created,
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index fa228627c255..e57b00944f7c 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -65,6 +65,7 @@ import android.telephony.CellSignalStrengthLte;
import android.telephony.CellSignalStrengthNr;
import android.telephony.CellSignalStrengthTdscdma;
import android.telephony.CellSignalStrengthWcdma;
+import android.telephony.CellularIdentifierDisclosure;
import android.telephony.DisconnectCause;
import android.telephony.LinkCapacityEstimate;
import android.telephony.LocationAccessPolicy;
@@ -76,6 +77,7 @@ import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.PreciseDisconnectCause;
import android.telephony.Rlog;
+import android.telephony.SecurityAlgorithmUpdate;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.SubscriptionInfo;
@@ -590,7 +592,9 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|| events.contains(TelephonyCallback.EVENT_ALLOWED_NETWORK_TYPE_LIST_CHANGED)
|| events.contains(TelephonyCallback.EVENT_EMERGENCY_CALLBACK_MODE_CHANGED)
|| events.contains(TelephonyCallback
- .EVENT_SIMULTANEOUS_CELLULAR_CALLING_SUBSCRIPTIONS_CHANGED);
+ .EVENT_SIMULTANEOUS_CELLULAR_CALLING_SUBSCRIPTIONS_CHANGED)
+ || events.contains(TelephonyCallback.EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED)
+ || events.contains(TelephonyCallback.EVENT_SECURITY_ALGORITHMS_CHANGED);
}
private static final int MSG_USER_SWITCHED = 1;
@@ -897,7 +901,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
mIsSatelliteEnabled = new AtomicBoolean();
mWasSatelliteEnabledNotified = new AtomicBoolean();
-
for (int i = 0; i < numPhones; i++) {
mCallState[i] = TelephonyManager.CALL_STATE_IDLE;
mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE;
@@ -3825,7 +3828,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
}
}
-
/**
* Notify external listeners that carrier roaming non-terrestrial network
* signal strength changed.
@@ -3835,7 +3837,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
public void notifyCarrierRoamingNtnSignalStrengthChanged(int subId,
@NonNull NtnSignalStrength ntnSignalStrength) {
if (!checkNotifyPermission("notifyCarrierRoamingNtnSignalStrengthChanged")) {
- log("nnotifyCarrierRoamingNtnSignalStrengthChanged: caller does not have required "
+ log("notifyCarrierRoamingNtnSignalStrengthChanged: caller does not have required "
+ "permissions.");
return;
}
@@ -3863,6 +3865,98 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
}
}
+ /**
+ * Notify that the radio security algorithms have changed.
+ *
+ * @param phoneId the phone id.
+ * @param subId the subId.
+ * @param update the security algorithm update.
+ */
+ public void notifySecurityAlgorithmsChanged(int phoneId, int subId,
+ SecurityAlgorithmUpdate update) {
+ if (!Flags.securityAlgorithmsUpdateIndications()) {
+ log("Not available due to securityAlgorithmsUpdateIndications() flag");
+ return;
+ }
+ if (!checkNotifyPermission("notifySecurityAlgorithmChanged()")) {
+ return;
+ }
+
+ synchronized (mRecords) {
+ if (validatePhoneId(phoneId)) {
+ if (update == null) {
+ loge("SecurityAlgorithmUpdate is null, subId=" + subId
+ + ", phoneId=" + phoneId);
+ // Listeners shouldn't be updated for null updates.
+ return;
+ }
+
+ for (Record r : mRecords) {
+ if (r.matchTelephonyCallbackEvent(
+ TelephonyCallback.EVENT_SECURITY_ALGORITHMS_CHANGED)
+ && idMatch(r, subId, phoneId)) {
+ try {
+ if (VDBG) {
+ log("notifySecurityAlgorithmsChanged: securityAlgorithmUpdate= "
+ + update);
+ }
+ r.callback.onSecurityAlgorithmsChanged(update);
+ } catch (RemoteException ex) {
+ mRemoveList.add(r.binder);
+ }
+ }
+ }
+ }
+ handleRemoveListLocked();
+ }
+ }
+
+ /**
+ * Notify of a cellular identifier disclosure.
+ *
+ * @param phoneId the phone id.
+ * @param subId the subId.
+ * @param disclosure the cellular identifier disclosure.
+ */
+ public void notifyCellularIdentifierDisclosedChanged(int phoneId, int subId,
+ @NonNull CellularIdentifierDisclosure disclosure) {
+ if (!Flags.cellularIdentifierDisclosureIndications()) {
+ log("Not available due to cellularIdentifierDisclosureIndications() flag");
+ return;
+ }
+ if (!checkNotifyPermission("notifyCellularIdentifierDisclosedChanged()")) {
+ return;
+ }
+
+ synchronized (mRecords) {
+ if (validatePhoneId(phoneId)) {
+ if (disclosure == null) {
+ loge("CellularIdentifierDisclosure is null, subId=" + subId
+ + ", phoneId=" + phoneId);
+ // Listeners shouldn't be updated for null disclosures.
+ return;
+ }
+
+ for (Record r : mRecords) {
+ if (r.matchTelephonyCallbackEvent(
+ TelephonyCallback.EVENT_CELLULAR_IDENTIFIER_DISCLOSED_CHANGED)
+ && idMatch(r, subId, phoneId)) {
+ try {
+ if (VDBG) {
+ log("notifyCellularIdentifierDisclosedChanged: disclosure= "
+ + disclosure);
+ }
+ r.callback.onCellularIdentifierDisclosedChanged(disclosure);
+ } catch (RemoteException ex) {
+ mRemoveList.add(r.binder);
+ }
+ }
+ }
+ }
+ handleRemoveListLocked();
+ }
+ }
+
@NeverCompile // Avoid size overhead of debugging code.
@Override
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index d880bce921aa..e166807083ff 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -19070,8 +19070,13 @@ public class ActivityManagerService extends IActivityManager.Stub
*/
@Override
public boolean enableFgsNotificationRateLimit(boolean enable) {
- enforceCallingPermission(permission.WRITE_DEVICE_CONFIG,
- "enableFgsNotificationRateLimit");
+ if (android.security.Flags.protectDeviceConfigFlags()) {
+ enforceCallingHasAtLeastOnePermission("enableFgsNotificationRateLimit",
+ permission.WRITE_DEVICE_CONFIG, permission.WRITE_ALLOWLISTED_DEVICE_CONFIG);
+ } else {
+ enforceCallingPermission(permission.WRITE_DEVICE_CONFIG,
+ "enableFgsNotificationRateLimit");
+ }
synchronized (this) {
return mServices.enableFgsNotificationRateLimitLocked(enable);
}
diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java
index 5e74d67905a6..06c586f5e9c2 100644
--- a/services/core/java/com/android/server/appop/AppOpsService.java
+++ b/services/core/java/com/android/server/appop/AppOpsService.java
@@ -2876,7 +2876,8 @@ public class AppOpsService extends IAppOpsService.Stub {
}
@Override
- public int checkOperationForDevice(int code, int uid, String packageName, int virtualDeviceId) {
+ public int checkOperationForDevice(int code, int uid, String packageName,
+ @Nullable String attributionTag, int virtualDeviceId) {
if (Binder.getCallingPid() != Process.myPid()
&& Flags.appopAccessTrackingLoggingEnabled()) {
FrameworkStatsLog.write(
@@ -2884,7 +2885,7 @@ public class AppOpsService extends IAppOpsService.Stub {
APP_OP_NOTE_OP_OR_CHECK_OP_BINDER_API_CALLED__BINDER_API__CHECK_OPERATION,
false);
}
- return mCheckOpsDelegateDispatcher.checkOperation(code, uid, packageName, null,
+ return mCheckOpsDelegateDispatcher.checkOperation(code, uid, packageName, attributionTag,
virtualDeviceId, false /*raw*/);
}
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 5f716605e8cd..6e6bf80e8c09 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -14166,10 +14166,10 @@ public class AudioService extends IAudioService.Stub
* Update player event
* @param piid Player id to update
* @param event The new player event
- * @param eventValue The value associated with this event
+ * @param eventValues The values associated with this event
*/
- public void playerEvent(int piid, int event, int eventValue) {
- mPlaybackMonitor.playerEvent(piid, event, eventValue, Binder.getCallingUid());
+ public void playerEvent(int piid, int event, int[] eventValues) {
+ mPlaybackMonitor.playerEvent(piid, event, eventValues, Binder.getCallingUid());
}
/**
diff --git a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java
index e92b5188652b..a62ac82f27eb 100644
--- a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java
+++ b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java
@@ -365,10 +365,11 @@ public final class PlaybackActivityMonitor
* @param eventValue The value associated with this event
* @param binderUid Calling binder uid
*/
- public void playerEvent(int piid, int event, int eventValue, int binderUid) {
+ public void playerEvent(int piid, int event, int[] eventValues, int binderUid) {
if (DEBUG) {
- Log.v(TAG, TextUtils.formatSimple("playerEvent(piid=%d, event=%s, eventValue=%d)",
- piid, AudioPlaybackConfiguration.playerStateToString(event), eventValue));
+ Log.v(TAG, TextUtils.formatSimple("playerEvent(piid=%d, event=%s, eventValues=%d)",
+ piid, AudioPlaybackConfiguration.playerStateToString(event),
+ Arrays.toString(eventValues)));
}
boolean change;
synchronized(mPlayerLock) {
@@ -382,13 +383,13 @@ public final class PlaybackActivityMonitor
// do not log nor dispatch events for "ignored" players other than the release
return;
}
- sEventLogger.enqueue(new PlayerEvent(piid, event, eventValue));
+ sEventLogger.enqueue(new PlayerEvent(piid, event, eventValues));
if (event == AudioPlaybackConfiguration.PLAYER_UPDATE_PORT_ID) {
if (portToPiidSimplification()) {
- mPiidToPortId.put(piid, eventValue);
+ mPiidToPortId.put(piid, eventValues[0]);
} else {
- mPortIdToPiid.put(eventValue, piid);
+ mPortIdToPiid.put(eventValues[0], piid);
}
return;
} else if (event == AudioPlaybackConfiguration.PLAYER_STATE_STARTED) {
@@ -409,7 +410,7 @@ public final class PlaybackActivityMonitor
if (checkConfigurationCaller(piid, apc, binderUid)) {
//TODO add generation counter to only update to the latest state
checkVolumeForPrivilegedAlarm(apc, event);
- change = apc.handleStateEvent(event, eventValue);
+ change = apc.handleStateEvent(event, eventValues);
} else {
Log.e(TAG, "Error handling event " + event);
change = false;
@@ -517,7 +518,7 @@ public final class PlaybackActivityMonitor
mMutedPlayersAwaitingConnection.remove(Integer.valueOf(piid));
checkVolumeForPrivilegedAlarm(apc, AudioPlaybackConfiguration.PLAYER_STATE_RELEASED);
change = apc.handleStateEvent(AudioPlaybackConfiguration.PLAYER_STATE_RELEASED,
- AudioPlaybackConfiguration.PLAYER_DEVICEID_INVALID);
+ AudioPlaybackConfiguration.PLAYER_DEVICEIDS_INVALID);
if (portToPiidSimplification()) {
mPiidToPortId.delete(piid);
@@ -1336,12 +1337,12 @@ public final class PlaybackActivityMonitor
// only keeping the player interface ID as it uniquely identifies the player in the event
final int mPlayerIId;
final int mEvent;
- final int mEventValue;
+ final int[] mEventValues;
- PlayerEvent(int piid, int event, int eventValue) {
+ PlayerEvent(int piid, int event, int[] eventValues) {
mPlayerIId = piid;
mEvent = event;
- mEventValue = eventValue;
+ mEventValues = eventValues;
}
@Override
@@ -1353,36 +1354,38 @@ public final class PlaybackActivityMonitor
switch (mEvent) {
case AudioPlaybackConfiguration.PLAYER_UPDATE_PORT_ID:
return AudioPlaybackConfiguration.toLogFriendlyPlayerState(mEvent) + " portId:"
- + mEventValue + " mapped to player piid:" + mPlayerIId;
+ + Arrays.toString(mEventValues) + " mapped to player piid:"
+ + mPlayerIId;
case AudioPlaybackConfiguration.PLAYER_UPDATE_DEVICE_ID:
- if (mEventValue != 0) {
- builder.append(" deviceId:").append(mEventValue);
+ if ((mEventValues.length > 0) && (mEventValues[0] != 0)) {
+ builder.append(" deviceIds:").append(Arrays.toString(mEventValues));
}
return builder.toString();
case AudioPlaybackConfiguration.PLAYER_UPDATE_MUTED:
builder.append(" source:");
- if (mEventValue <= 0) {
+ int eventValue = mEventValues[0];
+ if (eventValue <= 0) {
builder.append("none ");
} else {
- if ((mEventValue & MUTED_BY_MASTER) != 0) {
+ if ((eventValue & MUTED_BY_MASTER) != 0) {
builder.append("masterMute ");
}
- if ((mEventValue & MUTED_BY_STREAM_VOLUME) != 0) {
+ if ((eventValue & MUTED_BY_STREAM_VOLUME) != 0) {
builder.append("streamVolume ");
}
- if ((mEventValue & MUTED_BY_STREAM_MUTED) != 0) {
+ if ((eventValue & MUTED_BY_STREAM_MUTED) != 0) {
builder.append("streamMute ");
}
- if ((mEventValue & MUTED_BY_APP_OPS) != 0) {
+ if ((eventValue & MUTED_BY_APP_OPS) != 0) {
builder.append("appOps ");
}
- if ((mEventValue & MUTED_BY_CLIENT_VOLUME) != 0) {
+ if ((eventValue & MUTED_BY_CLIENT_VOLUME) != 0) {
builder.append("clientVolume ");
}
- if ((mEventValue & MUTED_BY_VOLUME_SHAPER) != 0) {
+ if ((eventValue & MUTED_BY_VOLUME_SHAPER) != 0) {
builder.append("volumeShaper ");
}
- if ((mEventValue & MUTED_BY_PORT_VOLUME) != 0) {
+ if ((eventValue & MUTED_BY_PORT_VOLUME) != 0) {
builder.append("portVolume ");
}
}
@@ -1732,8 +1735,11 @@ public final class PlaybackActivityMonitor
synchronized (mPlayerLock) {
int piid = msg.arg1;
+
+ int[] eventValues = new int[1];
+ eventValues[0] = eventValue;
sEventLogger.enqueue(
- new PlayerEvent(piid, PLAYER_UPDATE_MUTED, eventValue));
+ new PlayerEvent(piid, PLAYER_UPDATE_MUTED, eventValues));
final AudioPlaybackConfiguration apc = mPlayers.get(piid);
if (apc == null || !apc.handleMutedEvent(eventValue)) {
diff --git a/services/core/java/com/android/server/biometrics/BiometricService.java b/services/core/java/com/android/server/biometrics/BiometricService.java
index 65780238ede4..97a88542f0a4 100644
--- a/services/core/java/com/android/server/biometrics/BiometricService.java
+++ b/services/core/java/com/android/server/biometrics/BiometricService.java
@@ -101,6 +101,7 @@ import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Supplier;
/**
@@ -132,7 +133,7 @@ public class BiometricService extends SystemService {
IGateKeeperService mGateKeeper;
// Get and cache the available biometric authenticators and their associated info.
- final ArrayList<BiometricSensor> mSensors = new ArrayList<>();
+ final CopyOnWriteArrayList<BiometricSensor> mSensors = new CopyOnWriteArrayList<>();
@VisibleForTesting
BiometricStrengthController mBiometricStrengthController;
@@ -156,13 +157,13 @@ public class BiometricService extends SystemService {
@NonNull private final Set<Integer> mSensorsPendingInvalidation;
public static InvalidationTracker start(@NonNull Context context,
- @NonNull ArrayList<BiometricSensor> sensors,
- int userId, int fromSensorId, @NonNull IInvalidationCallback clientCallback) {
+ @NonNull List<BiometricSensor> sensors, int userId,
+ int fromSensorId, @NonNull IInvalidationCallback clientCallback) {
return new InvalidationTracker(context, sensors, userId, fromSensorId, clientCallback);
}
private InvalidationTracker(@NonNull Context context,
- @NonNull ArrayList<BiometricSensor> sensors, int userId,
+ @NonNull List<BiometricSensor> sensors, int userId,
int fromSensorId, @NonNull IInvalidationCallback clientCallback) {
mClientCallback = clientCallback;
mSensorsPendingInvalidation = new ArraySet<>();
@@ -879,7 +880,7 @@ public class BiometricService extends SystemService {
@android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
@Override
- public synchronized void registerAuthenticator(int id, int modality,
+ public void registerAuthenticator(int id, int modality,
@Authenticators.Types int strength,
@NonNull IBiometricAuthenticator authenticator) {
diff --git a/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java b/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java
index 82d5d4d8141d..e8786be4d8e6 100644
--- a/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java
+++ b/services/core/java/com/android/server/biometrics/sensors/BiometricScheduler.java
@@ -677,10 +677,11 @@ public class BiometricScheduler<T, U> {
* Start the timeout for the watchdog.
*/
public void startWatchdog() {
- if (mCurrentOperation == null) {
+ final BiometricSchedulerOperation operation = mCurrentOperation;
+ if (operation == null) {
+ Slog.e(TAG, "Current operation is null,no need to start watchdog");
return;
}
- final BiometricSchedulerOperation operation = mCurrentOperation;
mHandler.postDelayed(() -> {
if (operation == mCurrentOperation && !operation.isFinished()) {
Counter.logIncrement("biometric.value_scheduler_watchdog_triggered_count");
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index abb756b294a3..62fcccf13da9 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -5283,6 +5283,23 @@ public final class DisplayManagerService extends SystemService {
}
@Override
+ public void setScreenBrightnessOverrideFromWindowManager(
+ SparseArray<DisplayBrightnessOverrideRequest> brightnessOverrides) {
+ SparseArray<DisplayPowerController> dpcs = new SparseArray<>();
+ synchronized (mSyncRoot) {
+ for (int i = 0; i < mDisplayPowerControllers.size(); i++) {
+ dpcs.put(mDisplayPowerControllers.keyAt(i),
+ mDisplayPowerControllers.valueAt(i));
+ }
+ }
+ for (int i = 0; i < dpcs.size(); ++i) {
+ final int displayId = dpcs.keyAt(i);
+ final DisplayPowerController dpc = dpcs.valueAt(i);
+ dpc.setBrightnessOverrideRequest(brightnessOverrides.get(displayId));
+ }
+ }
+
+ @Override
public boolean requestPowerState(int groupId, DisplayPowerRequest request,
boolean waitForNegativeProximity) {
synchronized (mSyncRoot) {
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index c90dfbf5456e..2948ae4d83fa 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -42,6 +42,7 @@ import android.hardware.display.AmbientBrightnessDayStats;
import android.hardware.display.BrightnessChangeEvent;
import android.hardware.display.BrightnessConfiguration;
import android.hardware.display.BrightnessInfo;
+import android.hardware.display.DisplayManagerInternal;
import android.hardware.display.DisplayManagerInternal.DisplayOffloadSession;
import android.hardware.display.DisplayManagerInternal.DisplayPowerCallbacks;
import android.hardware.display.DisplayManagerInternal.DisplayPowerRequest;
@@ -170,6 +171,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
private static final int MSG_OFFLOADING_SCREEN_ON_UNBLOCKED = 18;
private static final int MSG_SET_STYLUS_BEING_USED = 19;
private static final int MSG_SET_STYLUS_USE_ENDED = 20;
+ private static final int MSG_SET_WINDOW_MANAGER_BRIGHTNESS_OVERRIDE = 21;
private static final int BRIGHTNESS_CHANGE_STATSD_REPORT_INTERVAL_MS = 500;
@@ -850,6 +852,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
}
}
+ public void setBrightnessOverrideRequest(
+ DisplayManagerInternal.DisplayBrightnessOverrideRequest request) {
+ Message msg = mHandler.obtainMessage(MSG_SET_WINDOW_MANAGER_BRIGHTNESS_OVERRIDE, request);
+ mHandler.sendMessageAtTime(msg, mClock.uptimeMillis());
+ }
+
public void setDisplayOffloadSession(DisplayOffloadSession session) {
if (session == mDisplayOffloadSession) {
return;
@@ -3100,6 +3108,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
updatePowerState();
break;
+ case MSG_SET_WINDOW_MANAGER_BRIGHTNESS_OVERRIDE:
+ if (mDisplayBrightnessController.updateWindowManagerBrightnessOverride(
+ (DisplayManagerInternal.DisplayBrightnessOverrideRequest) msg.obj)) {
+ updatePowerState();
+ }
+ break;
+
case MSG_STOP:
cleanupHandlerThreadAfterStop();
break;
diff --git a/services/core/java/com/android/server/display/brightness/DisplayBrightnessController.java b/services/core/java/com/android/server/display/brightness/DisplayBrightnessController.java
index 5b12dfb951d5..35f6fd047ec6 100644
--- a/services/core/java/com/android/server/display/brightness/DisplayBrightnessController.java
+++ b/services/core/java/com/android/server/display/brightness/DisplayBrightnessController.java
@@ -180,6 +180,20 @@ public final class DisplayBrightnessController {
}
/**
+ * Updates the brightness override from WindowManager.
+ *
+ * @param request The request to override the brightness
+ * @return whether this request will result in a change of the brightness
+ */
+ public boolean updateWindowManagerBrightnessOverride(
+ DisplayManagerInternal.DisplayBrightnessOverrideRequest request) {
+ synchronized (mLock) {
+ return mDisplayBrightnessStrategySelector.getOverrideBrightnessStrategy()
+ .updateWindowManagerBrightnessOverride(request);
+ }
+ }
+
+ /**
* Sets the brightness to follow
*/
public void setBrightnessToFollow(float brightnessToFollow, boolean slowChange) {
diff --git a/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java b/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java
index 60c1b8ff4db9..a0ad49dd9f24 100644
--- a/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java
+++ b/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java
@@ -180,8 +180,10 @@ public class DisplayBrightnessStrategySelector {
displayBrightnessStrategy = mFollowerBrightnessStrategy;
} else if (displayPowerRequest.boostScreenBrightness) {
displayBrightnessStrategy = mBoostBrightnessStrategy;
- } else if (BrightnessUtils
- .isValidBrightnessValue(displayPowerRequest.screenBrightnessOverride)) {
+ } else if (BrightnessUtils.isValidBrightnessValue(
+ displayPowerRequest.screenBrightnessOverride)
+ || BrightnessUtils.isValidBrightnessValue(
+ mOverrideBrightnessStrategy.getWindowManagerBrightnessOverride())) {
displayBrightnessStrategy = mOverrideBrightnessStrategy;
} else if (BrightnessUtils.isValidBrightnessValue(
mTemporaryBrightnessStrategy.getTemporaryScreenBrightness())) {
@@ -256,6 +258,10 @@ public class DisplayBrightnessStrategySelector {
return mAutoBrightnessFallbackStrategy;
}
+ public OverrideBrightnessStrategy getOverrideBrightnessStrategy() {
+ return mOverrideBrightnessStrategy;
+ }
+
/**
* Dumps the state of this class.
*/
diff --git a/services/core/java/com/android/server/display/brightness/strategy/OverrideBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/OverrideBrightnessStrategy.java
index 3fc15d120434..649f9dacf8ab 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/OverrideBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/OverrideBrightnessStrategy.java
@@ -16,10 +16,13 @@
package com.android.server.display.brightness.strategy;
+import android.hardware.display.DisplayManagerInternal;
import android.hardware.display.DisplayManagerInternal.DisplayPowerRequest;
+import android.os.PowerManager;
import com.android.server.display.DisplayBrightnessState;
import com.android.server.display.brightness.BrightnessReason;
+import com.android.server.display.brightness.BrightnessUtils;
import com.android.server.display.brightness.StrategyExecutionRequest;
import com.android.server.display.brightness.StrategySelectionNotifyRequest;
@@ -29,6 +32,10 @@ import java.io.PrintWriter;
* Manages the brightness of the display when the system brightness is overridden
*/
public class OverrideBrightnessStrategy implements DisplayBrightnessStrategy {
+
+ private float mWindowManagerBrightnessOverride = PowerManager.BRIGHTNESS_INVALID_FLOAT;
+ private CharSequence mWindowManagerBrightnessOverrideTag = null;
+
@Override
public DisplayBrightnessState updateBrightness(
StrategyExecutionRequest strategyExecutionRequest) {
@@ -36,9 +43,18 @@ public class OverrideBrightnessStrategy implements DisplayBrightnessStrategy {
// the brightness
DisplayPowerRequest dpr = strategyExecutionRequest.getDisplayPowerRequest();
BrightnessReason reason = new BrightnessReason(BrightnessReason.REASON_OVERRIDE);
- reason.setTag(dpr.screenBrightnessOverrideTag);
+
+ float brightness = dpr.screenBrightnessOverride;
+ if (BrightnessUtils.isValidBrightnessValue(dpr.screenBrightnessOverride)) {
+ brightness = dpr.screenBrightnessOverride;
+ reason.setTag(dpr.screenBrightnessOverrideTag);
+ } else if (BrightnessUtils.isValidBrightnessValue(mWindowManagerBrightnessOverride)) {
+ brightness = mWindowManagerBrightnessOverride;
+ reason.setTag(mWindowManagerBrightnessOverrideTag);
+ }
+
return new DisplayBrightnessState.Builder()
- .setBrightness(dpr.screenBrightnessOverride)
+ .setBrightness(brightness)
.setBrightnessReason(reason)
.setDisplayBrightnessStrategyName(getName())
.build();
@@ -50,7 +66,12 @@ public class OverrideBrightnessStrategy implements DisplayBrightnessStrategy {
}
@Override
- public void dump(PrintWriter writer) {}
+ public void dump(PrintWriter writer) {
+ writer.println("OverrideBrightnessStrategy:");
+ writer.println(" mWindowManagerBrightnessOverride=" + mWindowManagerBrightnessOverride);
+ writer.println(" mWindowManagerBrightnessOverrideTag="
+ + mWindowManagerBrightnessOverrideTag);
+ }
@Override
public void strategySelectionPostProcessor(
@@ -58,6 +79,37 @@ public class OverrideBrightnessStrategy implements DisplayBrightnessStrategy {
// DO NOTHING
}
+ /**
+ * Updates the brightness override from WindowManager.
+ *
+ * @param request The request to override the brightness
+ * @return whether this request will result in a change of the brightness
+ */
+ public boolean updateWindowManagerBrightnessOverride(
+ DisplayManagerInternal.DisplayBrightnessOverrideRequest request) {
+ float newBrightness = request == null
+ ? PowerManager.BRIGHTNESS_INVALID_FLOAT : request.brightness;
+ mWindowManagerBrightnessOverrideTag = request == null ? null : request.tag;
+
+ if (floatEquals(newBrightness, mWindowManagerBrightnessOverride)) {
+ return false;
+ }
+
+ mWindowManagerBrightnessOverride = newBrightness;
+ return true;
+ }
+
+ /**
+ * Returns the current brightness override from WindowManager.
+ */
+ public float getWindowManagerBrightnessOverride() {
+ return mWindowManagerBrightnessOverride;
+ }
+
+ private boolean floatEquals(float f1, float f2) {
+ return f1 == f2 || (Float.isNaN(f1) && Float.isNaN(f2));
+ }
+
@Override
public int getReason() {
return BrightnessReason.REASON_OVERRIDE;
diff --git a/services/core/java/com/android/server/display/mode/SystemRequestObserver.java b/services/core/java/com/android/server/display/mode/SystemRequestObserver.java
index 15f19cca99db..4a4c8da1a335 100644
--- a/services/core/java/com/android/server/display/mode/SystemRequestObserver.java
+++ b/services/core/java/com/android/server/display/mode/SystemRequestObserver.java
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.IBinder;
import android.os.RemoteException;
+import android.util.Slog;
import android.util.SparseArray;
import com.android.internal.annotations.GuardedBy;
@@ -28,12 +29,15 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.NoSuchElementException;
/**
* SystemRequestObserver responsible for handling system requests to filter allowable display
* modes
*/
class SystemRequestObserver {
+ private static final String TAG = "SystemRequestObserver";
+
private final VotesStorage mVotesStorage;
private final IBinder.DeathRecipient mDeathRecipient = new IBinder.DeathRecipient() {
@@ -43,6 +47,7 @@ class SystemRequestObserver {
}
@Override
public void binderDied(@NonNull IBinder who) {
+ Slog.d(TAG, "binder died: " + who);
removeSystemRequestedVotes(who);
who.unlinkToDeath(mDeathRecipient, 0);
}
@@ -83,9 +88,11 @@ class SystemRequestObserver {
updateStorageLocked(displayId);
}
if (needLinkToDeath) {
+ Slog.d(TAG, "binder linking to death: " + token);
token.linkToDeath(mDeathRecipient, 0);
}
} catch (RemoteException re) {
+ Slog.d(TAG, "linking to death failed: " + token, re);
removeSystemRequestedVotes(token);
}
}
@@ -94,14 +101,19 @@ class SystemRequestObserver {
boolean needToUnlink = false;
synchronized (mLock) {
SparseArray<List<Integer>> modesByDisplay = mDisplaysRestrictions.get(token);
- if (modesByDisplay != null) {
+ if (modesByDisplay != null && modesByDisplay.size() > 0) {
modesByDisplay.remove(displayId);
needToUnlink = modesByDisplay.size() == 0;
updateStorageLocked(displayId);
}
}
if (needToUnlink) {
- token.unlinkToDeath(mDeathRecipient, 0);
+ try {
+ Slog.d(TAG, "binder unlinking to death: " + token);
+ token.unlinkToDeath(mDeathRecipient, 0);
+ } catch (NoSuchElementException e) {
+ Slog.d(TAG, "unlinking to death failed: " + token, e);
+ }
}
}
diff --git a/services/core/java/com/android/server/input/InputGestureManager.java b/services/core/java/com/android/server/input/InputGestureManager.java
index 6f3540221b63..73d563069632 100644
--- a/services/core/java/com/android/server/input/InputGestureManager.java
+++ b/services/core/java/com/android/server/input/InputGestureManager.java
@@ -228,6 +228,28 @@ final class InputGestureManager {
KeyEvent.META_META_ON | KeyEvent.META_ALT_ON,
KeyGestureEvent.KEY_GESTURE_TYPE_ACTIVATE_SELECT_TO_SPEAK));
}
+ if (enableTaskResizingKeyboardShortcuts()) {
+ systemShortcuts.add(createKeyGesture(
+ KeyEvent.KEYCODE_LEFT_BRACKET,
+ KeyEvent.META_META_ON,
+ KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW
+ ));
+ systemShortcuts.add(createKeyGesture(
+ KeyEvent.KEYCODE_RIGHT_BRACKET,
+ KeyEvent.META_META_ON,
+ KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW
+ ));
+ systemShortcuts.add(createKeyGesture(
+ KeyEvent.KEYCODE_EQUALS,
+ KeyEvent.META_META_ON,
+ KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW
+ ));
+ systemShortcuts.add(createKeyGesture(
+ KeyEvent.KEYCODE_MINUS,
+ KeyEvent.META_META_ON,
+ KeyGestureEvent.KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW
+ ));
+ }
if (keyboardA11yShortcutControl()) {
if (InputSettings.isAccessibilityBounceKeysFeatureEnabled()) {
systemShortcuts.add(createKeyGesture(
@@ -257,28 +279,6 @@ final class InputGestureManager {
KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_SLOW_KEYS
));
}
- if (enableTaskResizingKeyboardShortcuts()) {
- systemShortcuts.add(createKeyGesture(
- KeyEvent.KEYCODE_LEFT_BRACKET,
- KeyEvent.META_ALT_ON,
- KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW
- ));
- systemShortcuts.add(createKeyGesture(
- KeyEvent.KEYCODE_RIGHT_BRACKET,
- KeyEvent.META_ALT_ON,
- KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW
- ));
- systemShortcuts.add(createKeyGesture(
- KeyEvent.KEYCODE_EQUALS,
- KeyEvent.META_ALT_ON,
- KeyGestureEvent.KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW
- ));
- systemShortcuts.add(createKeyGesture(
- KeyEvent.KEYCODE_MINUS,
- KeyEvent.META_ALT_ON,
- KeyGestureEvent.KEY_GESTURE_TYPE_RESTORE_FREEFORM_WINDOW_SIZE
- ));
- }
}
synchronized (mGestureLock) {
for (InputGestureData systemShortcut : systemShortcuts) {
diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubService.java b/services/core/java/com/android/server/location/contexthub/ContextHubService.java
index 8cf0578523ad..946e89604553 100644
--- a/services/core/java/com/android/server/location/contexthub/ContextHubService.java
+++ b/services/core/java/com/android/server/location/contexthub/ContextHubService.java
@@ -768,6 +768,16 @@ public class ContextHubService extends IContextHubService.Stub {
@android.annotation.EnforcePermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
@Override
+ public List<HubEndpointInfo> findEndpointsWithService(String serviceDescriptor) {
+ super.findEndpointsWithService_enforcePermission();
+ if (mHubInfoRegistry == null) {
+ return Collections.emptyList();
+ }
+ return mHubInfoRegistry.findEndpointsWithService(serviceDescriptor);
+ }
+
+ @android.annotation.EnforcePermission(android.Manifest.permission.ACCESS_CONTEXT_HUB)
+ @Override
public IContextHubEndpoint registerEndpoint(
HubEndpointInfo pendingHubEndpointInfo, IContextHubEndpointCallback callback)
throws RemoteException {
diff --git a/services/core/java/com/android/server/location/contexthub/HubInfoRegistry.java b/services/core/java/com/android/server/location/contexthub/HubInfoRegistry.java
index 4d1000f3e0e5..d2b2331d54f3 100644
--- a/services/core/java/com/android/server/location/contexthub/HubInfoRegistry.java
+++ b/services/core/java/com/android/server/location/contexthub/HubInfoRegistry.java
@@ -17,6 +17,7 @@
package com.android.server.location.contexthub;
import android.hardware.contexthub.HubEndpointInfo;
+import android.hardware.contexthub.HubServiceInfo;
import android.hardware.location.HubInfo;
import android.os.RemoteException;
import android.util.ArrayMap;
@@ -127,6 +128,23 @@ class HubInfoRegistry implements ContextHubHalEndpointCallback.IEndpointLifecycl
return searchResult;
}
+ /**
+ * Return a list of {@link HubEndpointInfo} that represents endpoints with the matching service.
+ */
+ public List<HubEndpointInfo> findEndpointsWithService(String serviceDescriptor) {
+ List<HubEndpointInfo> searchResult = new ArrayList<>();
+ synchronized (mLock) {
+ for (HubEndpointInfo endpointInfo : mHubEndpointInfos.values()) {
+ for (HubServiceInfo serviceInfo : endpointInfo.getServiceInfoCollection()) {
+ if (serviceDescriptor.equals(serviceInfo.getServiceDescriptor())) {
+ searchResult.add(endpointInfo);
+ }
+ }
+ }
+ }
+ return searchResult;
+ }
+
void dump(IndentingPrintWriter ipw) {
synchronized (mLock) {
dumpLocked(ipw);
@@ -155,5 +173,4 @@ class HubInfoRegistry implements ContextHubHalEndpointCallback.IEndpointLifecycl
ipw.println();
}
-
}
diff --git a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
index c460465bfb11..df5ecf872df4 100644
--- a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
+++ b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
@@ -175,7 +175,7 @@ public final class MediaProjectionManagerService extends SystemService
private void maybeStopMediaProjection(int reason) {
synchronized (mLock) {
- if (!mMediaProjectionStopController.isExemptFromStopping(mProjectionGrant)) {
+ if (!mMediaProjectionStopController.isExemptFromStopping(mProjectionGrant, reason)) {
Slog.d(TAG, "Content Recording: Stopping MediaProjection due to "
+ MediaProjectionStopController.stopReasonToString(reason));
mProjectionGrant.stop();
@@ -1006,9 +1006,9 @@ public final class MediaProjectionManagerService extends SystemService
// Host app has 5 minutes to begin using the token before it is invalid.
// Some apps show a dialog for the user to interact with (selecting recording resolution)
// before starting capture, but after requesting consent.
- final long mDefaultTimeoutMs = Duration.ofMinutes(5).toMillis();
+ final long mDefaultTimeoutMillis = Duration.ofMinutes(5).toMillis();
// The creation timestamp in milliseconds, measured by {@link SystemClock#uptimeMillis}.
- private final long mCreateTimeMs;
+ private final long mCreateTimeMillis;
public final int uid;
public final String packageName;
public final UserHandle userHandle;
@@ -1017,7 +1017,7 @@ public final class MediaProjectionManagerService extends SystemService
private final int mType;
// Values for tracking token validity.
// Timeout value to compare creation time against.
- private final long mTimeoutMs = mDefaultTimeoutMs;
+ private final long mTimeoutMillis = mDefaultTimeoutMillis;
private final int mDisplayId;
private IMediaProjectionCallback mCallback;
@@ -1048,7 +1048,7 @@ public final class MediaProjectionManagerService extends SystemService
userHandle = new UserHandle(UserHandle.getUserId(uid));
mTargetSdkVersion = targetSdkVersion;
mIsPrivileged = isPrivileged;
- mCreateTimeMs = mClock.uptimeMillis();
+ mCreateTimeMillis = mClock.uptimeMillis();
mActivityManagerInternal.notifyMediaProjectionEvent(uid, asBinder(),
MEDIA_PROJECTION_TOKEN_EVENT_CREATED);
mDisplayId = displayId;
@@ -1209,7 +1209,7 @@ public final class MediaProjectionManagerService extends SystemService
}
}
Slog.d(TAG, "Content Recording: handling stopping this projection token"
- + " createTime= " + mCreateTimeMs
+ + " createTime= " + mCreateTimeMillis
+ " countStarts= " + mCountStarts);
stopProjectionLocked(this);
mToken.unlinkToDeath(mDeathEater, 0);
@@ -1272,13 +1272,17 @@ public final class MediaProjectionManagerService extends SystemService
return mDisplayId;
}
+ long getCreateTimeMillis() {
+ return mCreateTimeMillis;
+ }
+
@android.annotation.EnforcePermission(android.Manifest.permission.MANAGE_MEDIA_PROJECTION)
@Override
public boolean isValid() {
isValid_enforcePermission();
synchronized (mLock) {
- final long curMs = mClock.uptimeMillis();
- final boolean hasTimedOut = curMs - mCreateTimeMs > mTimeoutMs;
+ final long curMillis = mClock.uptimeMillis();
+ final boolean hasTimedOut = curMillis - mCreateTimeMillis > mTimeoutMillis;
final boolean virtualDisplayCreated = mVirtualDisplayId != INVALID_DISPLAY;
final boolean isValid =
!hasTimedOut && (mCountStarts <= 1) && !virtualDisplayCreated;
diff --git a/services/core/java/com/android/server/media/projection/MediaProjectionStopController.java b/services/core/java/com/android/server/media/projection/MediaProjectionStopController.java
index f5b26c41015e..c018e6bc1dc7 100644
--- a/services/core/java/com/android/server/media/projection/MediaProjectionStopController.java
+++ b/services/core/java/com/android/server/media/projection/MediaProjectionStopController.java
@@ -27,6 +27,7 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Binder;
+import android.os.SystemClock;
import android.provider.Settings;
import android.telecom.TelecomManager;
import android.telephony.TelephonyCallback;
@@ -46,6 +47,8 @@ public class MediaProjectionStopController {
private static final String TAG = "MediaProjectionStopController";
@VisibleForTesting
+ static final int STOP_REASON_UNKNOWN = 0;
+ @VisibleForTesting
static final int STOP_REASON_KEYGUARD = 1;
@VisibleForTesting
static final int STOP_REASON_CALL_END = 2;
@@ -61,6 +64,7 @@ public class MediaProjectionStopController {
private final ContentResolver mContentResolver;
private boolean mIsInCall;
+ private long mLastCallStartTimeMillis;
public MediaProjectionStopController(Context context, Consumer<Integer> stopReasonConsumer) {
mStopReasonConsumer = stopReasonConsumer;
@@ -95,8 +99,8 @@ public class MediaProjectionStopController {
* Checks whether the given projection grant is exempt from stopping restrictions.
*/
public boolean isExemptFromStopping(
- MediaProjectionManagerService.MediaProjection projectionGrant) {
- return isExempt(projectionGrant, false);
+ MediaProjectionManagerService.MediaProjection projectionGrant, int stopReason) {
+ return isExempt(projectionGrant, stopReason, false);
}
/**
@@ -110,7 +114,8 @@ public class MediaProjectionStopController {
* MediaProjection session
*/
private boolean isExempt(
- MediaProjectionManagerService.MediaProjection projectionGrant, boolean forStart) {
+ MediaProjectionManagerService.MediaProjection projectionGrant, int stopReason,
+ boolean forStart) {
if (projectionGrant == null || projectionGrant.packageName == null) {
return true;
}
@@ -151,6 +156,14 @@ public class MediaProjectionStopController {
return true;
}
+ if (stopReason == STOP_REASON_CALL_END
+ && projectionGrant.getCreateTimeMillis() < mLastCallStartTimeMillis) {
+ Slog.v(TAG,
+ "Continuing MediaProjection as (phone) call started after MediaProjection was"
+ + " created.");
+ return true;
+ }
+
return false;
}
@@ -167,7 +180,7 @@ public class MediaProjectionStopController {
return false;
}
- if (isExempt(projectionGrant, true)) {
+ if (isExempt(projectionGrant, STOP_REASON_UNKNOWN, true)) {
return false;
}
return true;
@@ -188,9 +201,13 @@ public class MediaProjectionStopController {
return;
}
boolean isInCall = mTelecomManager.isInCall();
+ if (isInCall) {
+ mLastCallStartTimeMillis = SystemClock.uptimeMillis();
+ }
if (isInCall == mIsInCall) {
return;
}
+
if (mIsInCall && !isInCall) {
mStopReasonConsumer.accept(STOP_REASON_CALL_END);
}
diff --git a/services/core/java/com/android/server/media/quality/MediaQualityService.java b/services/core/java/com/android/server/media/quality/MediaQualityService.java
index 1f8a2007a9ff..00bab8af44f3 100644
--- a/services/core/java/com/android/server/media/quality/MediaQualityService.java
+++ b/services/core/java/com/android/server/media/quality/MediaQualityService.java
@@ -25,11 +25,11 @@ import android.media.quality.IAmbientBacklightCallback;
import android.media.quality.IMediaQualityManager;
import android.media.quality.IPictureProfileCallback;
import android.media.quality.ISoundProfileCallback;
-import android.media.quality.MediaQualityContract.PictureQuality;
+import android.media.quality.MediaQualityContract;
import android.media.quality.ParamCapability;
import android.media.quality.PictureProfile;
import android.media.quality.SoundProfile;
-import android.os.Bundle;
+import android.os.PersistableBundle;
import android.util.Log;
import com.android.server.SystemService;
@@ -74,10 +74,10 @@ public class MediaQualityService extends SystemService {
SQLiteDatabase db = mMediaQualityDbHelper.getWritableDatabase();
ContentValues values = new ContentValues();
- values.put(PictureQuality.PARAMETER_TYPE, pp.getProfileType());
- values.put(PictureQuality.PARAMETER_NAME, pp.getName());
- values.put(PictureQuality.PARAMETER_PACKAGE, pp.getPackageName());
- values.put(PictureQuality.PARAMETER_INPUT_ID, pp.getInputId());
+ values.put(MediaQualityContract.BaseParameters.PARAMETER_TYPE, pp.getProfileType());
+ values.put(MediaQualityContract.BaseParameters.PARAMETER_NAME, pp.getName());
+ values.put(MediaQualityContract.BaseParameters.PARAMETER_PACKAGE, pp.getPackageName());
+ values.put(MediaQualityContract.BaseParameters.PARAMETER_INPUT_ID, pp.getInputId());
values.put(mMediaQualityDbHelper.SETTINGS, bundleToJson(pp.getParameters()));
// id is auto-generated by SQLite upon successful insertion of row
@@ -98,8 +98,8 @@ public class MediaQualityService extends SystemService {
public PictureProfile getPictureProfile(int type, String name) {
SQLiteDatabase db = mMediaQualityDbHelper.getReadableDatabase();
- String selection = PictureQuality.PARAMETER_TYPE + " = ? AND "
- + PictureQuality.PARAMETER_NAME + " = ?";
+ String selection = MediaQualityContract.BaseParameters.PARAMETER_TYPE + " = ? AND "
+ + MediaQualityContract.BaseParameters.PARAMETER_NAME + " = ?";
String[] selectionArguments = {Integer.toString(type), name};
try (
@@ -127,7 +127,7 @@ public class MediaQualityService extends SystemService {
}
}
- private String bundleToJson(Bundle bundle) {
+ private String bundleToJson(PersistableBundle bundle) {
JSONObject jsonObject = new JSONObject();
if (bundle == null) {
return jsonObject.toString();
@@ -142,9 +142,9 @@ public class MediaQualityService extends SystemService {
return jsonObject.toString();
}
- private Bundle jsonToBundle(String jsonString) {
+ private PersistableBundle jsonToBundle(String jsonString) {
JSONObject jsonObject = null;
- Bundle bundle = new Bundle();
+ PersistableBundle bundle = new PersistableBundle();
try {
jsonObject = new JSONObject(jsonString);
@@ -175,26 +175,26 @@ public class MediaQualityService extends SystemService {
private String[] getAllPictureProfileColumns() {
return new String[]{
- PictureQuality.PARAMETER_ID,
- PictureQuality.PARAMETER_TYPE,
- PictureQuality.PARAMETER_NAME,
- PictureQuality.PARAMETER_INPUT_ID,
- PictureQuality.PARAMETER_PACKAGE,
+ MediaQualityContract.BaseParameters.PARAMETER_ID,
+ MediaQualityContract.BaseParameters.PARAMETER_TYPE,
+ MediaQualityContract.BaseParameters.PARAMETER_NAME,
+ MediaQualityContract.BaseParameters.PARAMETER_INPUT_ID,
+ MediaQualityContract.BaseParameters.PARAMETER_PACKAGE,
mMediaQualityDbHelper.SETTINGS
};
}
private PictureProfile getPictureProfileFromCursor(Cursor cursor) {
- String returnId = cursor.getString(
- cursor.getColumnIndexOrThrow(PictureQuality.PARAMETER_ID));
- int type = cursor.getInt(
- cursor.getColumnIndexOrThrow(PictureQuality.PARAMETER_TYPE));
- String name = cursor.getString(
- cursor.getColumnIndexOrThrow(PictureQuality.PARAMETER_NAME));
- String inputId = cursor.getString(
- cursor.getColumnIndexOrThrow(PictureQuality.PARAMETER_INPUT_ID));
- String packageName = cursor.getString(
- cursor.getColumnIndexOrThrow(PictureQuality.PARAMETER_PACKAGE));
+ String returnId = cursor.getString(cursor.getColumnIndexOrThrow(
+ MediaQualityContract.BaseParameters.PARAMETER_ID));
+ int type = cursor.getInt(cursor.getColumnIndexOrThrow(
+ MediaQualityContract.BaseParameters.PARAMETER_TYPE));
+ String name = cursor.getString(cursor.getColumnIndexOrThrow(
+ MediaQualityContract.BaseParameters.PARAMETER_NAME));
+ String inputId = cursor.getString(cursor.getColumnIndexOrThrow(
+ MediaQualityContract.BaseParameters.PARAMETER_INPUT_ID));
+ String packageName = cursor.getString(cursor.getColumnIndexOrThrow(
+ MediaQualityContract.BaseParameters.PARAMETER_PACKAGE));
String settings = cursor.getString(
cursor.getColumnIndexOrThrow(mMediaQualityDbHelper.SETTINGS));
return new PictureProfile(returnId, type, name, inputId,
@@ -203,7 +203,7 @@ public class MediaQualityService extends SystemService {
@Override
public List<PictureProfile> getPictureProfilesByPackage(String packageName) {
- String selection = PictureQuality.PARAMETER_PACKAGE + " = ?";
+ String selection = MediaQualityContract.BaseParameters.PARAMETER_PACKAGE + " = ?";
String[] selectionArguments = {packageName};
return getPictureProfilesBasedOnConditions(getAllPictureProfileColumns(), selection,
selectionArguments);
@@ -216,7 +216,7 @@ public class MediaQualityService extends SystemService {
@Override
public List<String> getPictureProfilePackageNames() {
- String [] column = {PictureQuality.PARAMETER_NAME};
+ String [] column = {MediaQualityContract.BaseParameters.PARAMETER_NAME};
List<PictureProfile> pictureProfiles = getPictureProfilesBasedOnConditions(column,
null, null);
List<String> packageNames = new ArrayList<>();
diff --git a/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java b/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
index 925ba1752fe2..3e96afe9bee3 100644
--- a/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
+++ b/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
@@ -39,9 +39,11 @@ import android.service.notification.ZenModeConfig.ConfigOrigin;
import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.Keep;
/** Default implementation for {@link DeviceEffectsApplier}. */
-class DefaultDeviceEffectsApplier implements DeviceEffectsApplier {
+@Keep
+public class DefaultDeviceEffectsApplier implements DeviceEffectsApplier {
private static final String TAG = "DeviceEffectsApplier";
private static final String SUPPRESS_AMBIENT_DISPLAY_TOKEN =
"DefaultDeviceEffectsApplier:SuppressAmbientDisplay";
@@ -63,10 +65,10 @@ class DefaultDeviceEffectsApplier implements DeviceEffectsApplier {
@GuardedBy("mRegisterReceiverLock")
private boolean mIsScreenOffReceiverRegistered;
- private ZenDeviceEffects mLastAppliedEffects = new ZenDeviceEffects.Builder().build();
+ protected ZenDeviceEffects mLastAppliedEffects = new ZenDeviceEffects.Builder().build();
private boolean mPendingNightMode;
- DefaultDeviceEffectsApplier(Context context) {
+ public DefaultDeviceEffectsApplier(Context context) {
mContext = context;
mColorDisplayManager = context.getSystemService(ColorDisplayManager.class);
mKeyguardManager = context.getSystemService(KeyguardManager.class);
@@ -79,56 +81,69 @@ class DefaultDeviceEffectsApplier implements DeviceEffectsApplier {
@Override
public void apply(ZenDeviceEffects effects, @ConfigOrigin int origin) {
- Binder.withCleanCallingIdentity(() -> {
- if (mLastAppliedEffects.shouldSuppressAmbientDisplay()
- != effects.shouldSuppressAmbientDisplay()) {
- try {
- traceApplyDeviceEffect("suppressAmbientDisplay",
- effects.shouldSuppressAmbientDisplay());
- mPowerManager.suppressAmbientDisplay(SUPPRESS_AMBIENT_DISPLAY_TOKEN,
- effects.shouldSuppressAmbientDisplay());
- } catch (Exception e) {
- Slog.e(TAG, "Could not change AOD override", e);
- }
- }
+ Binder.withCleanCallingIdentity(
+ () -> {
+ maybeSuppressAmbientDisplay(effects.shouldSuppressAmbientDisplay());
+ maybeDisplayGrayscale(effects.shouldDisplayGrayscale());
+ maybeDimWallpaper(effects.shouldDimWallpaper());
+ maybeUseNightMode(effects.shouldUseNightMode(), origin);
+ });
- if (mLastAppliedEffects.shouldDisplayGrayscale() != effects.shouldDisplayGrayscale()) {
- if (mColorDisplayManager != null) {
- try {
- traceApplyDeviceEffect("displayGrayscale",
- effects.shouldDisplayGrayscale());
- mColorDisplayManager.setSaturationLevel(
- effects.shouldDisplayGrayscale() ? SATURATION_LEVEL_GRAYSCALE
- : SATURATION_LEVEL_FULL_COLOR);
- } catch (Exception e) {
- Slog.e(TAG, "Could not change grayscale override", e);
- }
- }
+ mLastAppliedEffects = effects;
+ }
+
+ protected void maybeSuppressAmbientDisplay(boolean shouldSuppressAmbientDisplay) {
+ if (mLastAppliedEffects.shouldSuppressAmbientDisplay() != shouldSuppressAmbientDisplay) {
+ try {
+ traceApplyDeviceEffect("suppressAmbientDisplay", shouldSuppressAmbientDisplay);
+ mPowerManager.suppressAmbientDisplay(
+ SUPPRESS_AMBIENT_DISPLAY_TOKEN, shouldSuppressAmbientDisplay);
+ } catch (Exception e) {
+ Slog.e(TAG, "Could not change AOD override", e);
}
+ }
+ }
- if (mLastAppliedEffects.shouldDimWallpaper() != effects.shouldDimWallpaper()) {
- if (mWallpaperManager != null) {
- try {
- traceApplyDeviceEffect("dimWallpaper", effects.shouldDimWallpaper());
- mWallpaperManager.setWallpaperDimAmount(
- effects.shouldDimWallpaper() ? WALLPAPER_DIM_AMOUNT_DIMMED
- : WALLPAPER_DIM_AMOUNT_NORMAL);
- } catch (Exception e) {
- Slog.e(TAG, "Could not change wallpaper override", e);
- }
+ protected void maybeDisplayGrayscale(boolean shouldDisplayGrayscale) {
+ if (mLastAppliedEffects.shouldDisplayGrayscale() != shouldDisplayGrayscale) {
+ if (mColorDisplayManager != null) {
+ try {
+ traceApplyDeviceEffect("displayGrayscale", shouldDisplayGrayscale);
+ mColorDisplayManager.setSaturationLevel(
+ shouldDisplayGrayscale
+ ? SATURATION_LEVEL_GRAYSCALE
+ : SATURATION_LEVEL_FULL_COLOR);
+ } catch (Exception e) {
+ Slog.e(TAG, "Could not change grayscale override", e);
}
}
+ }
+ }
- if (mLastAppliedEffects.shouldUseNightMode() != effects.shouldUseNightMode()) {
+ protected void maybeDimWallpaper(boolean shouldDimWallpaper) {
+ if (mLastAppliedEffects.shouldDimWallpaper() != shouldDimWallpaper) {
+ if (mWallpaperManager != null) {
try {
- updateOrScheduleNightMode(effects.shouldUseNightMode(), origin);
+ traceApplyDeviceEffect("dimWallpaper", shouldDimWallpaper);
+ mWallpaperManager.setWallpaperDimAmount(
+ shouldDimWallpaper
+ ? WALLPAPER_DIM_AMOUNT_DIMMED
+ : WALLPAPER_DIM_AMOUNT_NORMAL);
} catch (Exception e) {
- Slog.e(TAG, "Could not change dark theme override", e);
+ Slog.e(TAG, "Could not change wallpaper override", e);
}
}
- });
+ }
+ }
- mLastAppliedEffects = effects;
+ protected void maybeUseNightMode(boolean shouldUseNightMode, @ConfigOrigin int origin) {
+ if (mLastAppliedEffects.shouldUseNightMode() != shouldUseNightMode) {
+ try {
+ updateOrScheduleNightMode(shouldUseNightMode, origin);
+ } catch (Exception e) {
+ Slog.e(TAG, "Could not change dark theme override", e);
+ }
+ }
}
private void updateOrScheduleNightMode(boolean useNightMode, @ConfigOrigin int origin) {
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index ca4f83fd46f6..81dc38a02191 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -1015,7 +1015,13 @@ public class ZenModeHelper {
private static void applyConditionAndReconsiderOverride(ZenRule rule, Condition condition,
int origin) {
if (Flags.modesApi() && Flags.modesUi()) {
- if (origin == ORIGIN_USER_IN_SYSTEMUI && condition != null
+ if (isImplicitRuleId(rule.id)) {
+ // Implicit rules do not use overrides, and always apply conditions directly.
+ // This is compatible with the previous behavior (where the package set the
+ // interruption filter, and no "snoozing" took place if the user changed it later).
+ rule.condition = condition;
+ rule.resetConditionOverride();
+ } else if (origin == ORIGIN_USER_IN_SYSTEMUI && condition != null
&& condition.source == SOURCE_USER_ACTION) {
// Apply as override, instead of actual condition.
// If the new override is the reverse of a previous (still active) override, try
diff --git a/services/core/java/com/android/server/pm/InstallPackageHelper.java b/services/core/java/com/android/server/pm/InstallPackageHelper.java
index d9e76966892c..8168c5493304 100644
--- a/services/core/java/com/android/server/pm/InstallPackageHelper.java
+++ b/services/core/java/com/android/server/pm/InstallPackageHelper.java
@@ -1029,12 +1029,14 @@ final class InstallPackageHelper {
if (reconciledPackages == null) {
return;
}
- if (Flags.improveInstallFreeze()) {
- prepPerformDexoptIfNeeded(reconciledPackages);
- }
- if (renameAndUpdatePaths(requests)
- && commitInstallPackages(reconciledPackages)) {
- success = true;
+ if (renameAndUpdatePaths(requests)) {
+ // rename before dexopt because art will encoded the path in the odex/vdex file
+ if (Flags.improveInstallFreeze()) {
+ prepPerformDexoptIfNeeded(reconciledPackages);
+ }
+ if (commitInstallPackages(reconciledPackages)) {
+ success = true;
+ }
}
}
} finally {
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index 2c0942337b1f..286333cb83a9 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -96,7 +96,6 @@ import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
import android.os.IInterface;
-import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteCallbackList;
@@ -2667,6 +2666,7 @@ public class LauncherAppsService extends SystemService {
}
final String[] packagesNullExtras = packagesWithoutExtras.toArray(
new String[packagesWithoutExtras.size()]);
+
final int n = mListeners.beginBroadcast();
try {
for (int i = 0; i < n; i++) {
@@ -2852,7 +2852,7 @@ public class LauncherAppsService extends SystemService {
class SecureSettingsObserver extends ContentObserver {
SecureSettingsObserver() {
- super(new Handler(Looper.getMainLooper()));
+ super(mCallbackHandler);
}
@Override
@@ -2866,32 +2866,29 @@ public class LauncherAppsService extends SystemService {
if (privateProfile.getIdentifier() == UserHandle.USER_NULL) {
return;
}
-
final int n = mListeners.beginBroadcast();
try {
for (int i = 0; i < n; i++) {
- final IOnAppsChangedListener listener =
- mListeners.getBroadcastItem(i);
+ final IOnAppsChangedListener listener = mListeners.getBroadcastItem(i);
final BroadcastCookie cookie =
- (BroadcastCookie) mListeners.getBroadcastCookie(
- i);
+ (BroadcastCookie) mListeners.getBroadcastCookie(i);
if (!isEnabledProfileOf(cookie, privateProfile,
"onSecureSettingsChange")) {
Log.d(TAG, "onSecureSettingsChange: Skipping - profile not enabled"
+ " or not accessible for package=" + cookie.packageName
+ ", packageUid=" + cookie.callingUid);
- } else {
- try {
- Log.d(TAG,
- "onUserConfigChanged: triggering onUserConfigChanged");
- listener.onUserConfigChanged(
- mUserManagerInternal.getLauncherUserInfo(
- privateProfile.getIdentifier()));
- } catch (RemoteException re) {
- Slog.d(TAG, "onUserConfigChanged: Callback failed ", re);
- }
+ continue;
+ }
+ try {
+ Log.d(TAG, "onUserConfigChanged: triggering onUserConfigChanged");
+ listener.onUserConfigChanged(
+ mUserManagerInternal.getLauncherUserInfo(
+ privateProfile.getIdentifier()));
+ } catch (RemoteException re) {
+ Slog.d(TAG, "onUserConfigChanged: Callback failed ", re);
}
}
+
} finally {
mListeners.finishBroadcast();
}
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 37883f594227..c573293cbf48 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -625,14 +625,6 @@ public final class PowerManagerService extends SystemService
boolean mIsFaceDown = false;
private long mLastFlipTime = 0L;
- // The screen brightness setting override from the window manager
- // to allow the current foreground activity to override the brightness.
- private float mScreenBrightnessOverrideFromWindowManager =
- PowerManager.BRIGHTNESS_INVALID_FLOAT;
-
- // Tag identifying the window/activity that requested the brightness override.
- private CharSequence mScreenBrightnessOverrideFromWmTag = null;
-
// The window manager has determined the user to be inactive via other means.
// Set this to false to disable.
private boolean mUserInactiveOverrideFromWindowManager;
@@ -3663,9 +3655,7 @@ public final class PowerManagerService extends SystemService
// Keep the brightness steady during boot. This requires the
// bootloader brightness and the default brightness to be identical.
screenBrightnessOverride = mScreenBrightnessDefault;
- } else if (isValidBrightness(mScreenBrightnessOverrideFromWindowManager)) {
- screenBrightnessOverride = mScreenBrightnessOverrideFromWindowManager;
- overrideTag = mScreenBrightnessOverrideFromWmTag;
+ overrideTag = "boot";
} else {
screenBrightnessOverride = PowerManager.BRIGHTNESS_INVALID_FLOAT;
}
@@ -4449,19 +4439,6 @@ public final class PowerManagerService extends SystemService
}
}
- private void setScreenBrightnessOverrideFromWindowManagerInternal(
- float brightness, CharSequence tag) {
- synchronized (mLock) {
- if (!BrightnessSynchronizer.floatEquals(mScreenBrightnessOverrideFromWindowManager,
- brightness)) {
- mScreenBrightnessOverrideFromWindowManager = brightness;
- mScreenBrightnessOverrideFromWmTag = tag;
- mDirty |= DIRTY_SETTINGS;
- updatePowerStateLocked();
- }
- }
- }
-
private void setUserInactiveOverrideFromWindowManagerInternal() {
synchronized (mLock) {
mUserInactiveOverrideFromWindowManager = true;
@@ -4800,10 +4777,6 @@ public final class PowerManagerService extends SystemService
+ mMaximumScreenOffTimeoutFromDeviceAdmin + " (enforced="
+ isMaximumScreenOffTimeoutFromDeviceAdminEnforcedLocked() + ")");
pw.println(" mStayOnWhilePluggedInSetting=" + mStayOnWhilePluggedInSetting);
- pw.println(" mScreenBrightnessOverrideFromWindowManager="
- + mScreenBrightnessOverrideFromWindowManager);
- pw.println(" mScreenBrightnessOverrideFromWmTag="
- + mScreenBrightnessOverrideFromWmTag);
pw.println(" mUserActivityTimeoutOverrideFromWindowManager="
+ mUserActivityTimeoutOverrideFromWindowManager);
pw.println(" mUserInactiveOverrideFromWindowManager="
@@ -5193,10 +5166,6 @@ public final class PowerManagerService extends SystemService
proto.write(
PowerServiceSettingsAndConfigurationDumpProto
- .SCREEN_BRIGHTNESS_OVERRIDE_FROM_WINDOW_MANAGER,
- mScreenBrightnessOverrideFromWindowManager);
- proto.write(
- PowerServiceSettingsAndConfigurationDumpProto
.USER_ACTIVITY_TIMEOUT_OVERRIDE_FROM_WINDOW_MANAGER_MS,
mUserActivityTimeoutOverrideFromWindowManager);
proto.write(
@@ -7136,17 +7105,6 @@ public final class PowerManagerService extends SystemService
@VisibleForTesting
final class LocalService extends PowerManagerInternal {
@Override
- public void setScreenBrightnessOverrideFromWindowManager(
- float screenBrightness, CharSequence tag) {
- if (screenBrightness < PowerManager.BRIGHTNESS_MIN
- || screenBrightness > PowerManager.BRIGHTNESS_MAX) {
- screenBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
- tag = null;
- }
- setScreenBrightnessOverrideFromWindowManagerInternal(screenBrightness, tag);
- }
-
- @Override
public void setDozeOverrideFromDreamManager(
int screenState, int reason, float screenBrightnessFloat, int screenBrightnessInt,
boolean useNormalBrightnessForDoze) {
diff --git a/services/core/java/com/android/server/security/adaptiveauthentication/AdaptiveAuthenticationService.java b/services/core/java/com/android/server/security/authenticationpolicy/AuthenticationPolicyService.java
index b129fdc1b6e3..b8a4a9c26feb 100644
--- a/services/core/java/com/android/server/security/adaptiveauthentication/AdaptiveAuthenticationService.java
+++ b/services/core/java/com/android/server/security/authenticationpolicy/AuthenticationPolicyService.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.server.security.adaptiveauthentication;
+package com.android.server.security.authenticationpolicy;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST;
@@ -55,8 +55,8 @@ import java.util.Objects;
/**
* @hide
*/
-public class AdaptiveAuthenticationService extends SystemService {
- private static final String TAG = "AdaptiveAuthenticationService";
+public class AuthenticationPolicyService extends SystemService {
+ private static final String TAG = "AuthenticationPolicyService";
private static final boolean DEBUG = Build.IS_DEBUGGABLE && Log.isLoggable(TAG, Log.DEBUG);
@VisibleForTesting
@@ -78,12 +78,12 @@ public class AdaptiveAuthenticationService extends SystemService {
final SparseIntArray mFailedAttemptsForUser = new SparseIntArray();
private final SparseLongArray mLastLockedTimestamp = new SparseLongArray();
- public AdaptiveAuthenticationService(Context context) {
+ public AuthenticationPolicyService(Context context) {
this(context, new LockPatternUtils(context));
}
@VisibleForTesting
- public AdaptiveAuthenticationService(Context context, LockPatternUtils lockPatternUtils) {
+ public AuthenticationPolicyService(Context context, LockPatternUtils lockPatternUtils) {
super(context);
mLockPatternUtils = lockPatternUtils;
mLockSettings = Objects.requireNonNull(
diff --git a/services/core/java/com/android/server/security/adaptiveauthentication/OWNERS b/services/core/java/com/android/server/security/authenticationpolicy/OWNERS
index 29affcdb81aa..29affcdb81aa 100644
--- a/services/core/java/com/android/server/security/adaptiveauthentication/OWNERS
+++ b/services/core/java/com/android/server/security/authenticationpolicy/OWNERS
diff --git a/services/core/java/com/android/server/security/forensic/SecurityLogSource.java b/services/core/java/com/android/server/security/forensic/SecurityLogSource.java
index 0f1aa42a2f46..e1b49c42018b 100644
--- a/services/core/java/com/android/server/security/forensic/SecurityLogSource.java
+++ b/services/core/java/com/android/server/security/forensic/SecurityLogSource.java
@@ -22,9 +22,7 @@ import android.app.admin.DevicePolicyManager;
import android.app.admin.SecurityLog.SecurityEvent;
import android.content.Context;
import android.security.forensic.ForensicEvent;
-import android.util.ArrayMap;
-import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
@@ -34,10 +32,6 @@ import java.util.stream.Collectors;
public class SecurityLogSource implements DataSource {
private static final String TAG = "Forensic SecurityLogSource";
- private static final String EVENT_TYPE = "SecurityEvent";
- private static final String EVENT_TAG = "TAG";
- private static final String EVENT_TIME = "TIME";
- private static final String EVENT_DATA = "DATA";
private SecurityEventCallback mEventCallback = new SecurityEventCallback();
private DevicePolicyManager mDpm;
@@ -94,46 +88,9 @@ public class SecurityLogSource implements DataSource {
List<ForensicEvent> forensicEvents =
events.stream()
.filter(event -> event != null)
- .map(event -> toForensicEvent(event))
+ .map(event -> new ForensicEvent(event))
.collect(Collectors.toList());
mDataAggregator.addBatchData(forensicEvents);
}
-
- private ForensicEvent toForensicEvent(SecurityEvent event) {
- ArrayMap<String, String> keyValuePairs = new ArrayMap<>();
- keyValuePairs.put(EVENT_TIME, String.valueOf(event.getTimeNanos()));
- // TODO: Map tag to corresponding string
- keyValuePairs.put(EVENT_TAG, String.valueOf(event.getTag()));
- keyValuePairs.put(EVENT_DATA, eventDataToString(event.getData()));
- return new ForensicEvent(EVENT_TYPE, keyValuePairs);
- }
-
- /**
- * Convert event data to a String.
- *
- * @param obj Object containing an Integer, Long, Float, String, null, or Object[] of the
- * same.
- * @return String representation of event data.
- */
- private String eventDataToString(Object obj) {
- if (obj == null) {
- return "";
- } else if (obj instanceof Integer
- || obj instanceof Long
- || obj instanceof Float
- || obj instanceof String) {
- return String.valueOf(obj);
- } else if (obj instanceof Object[]) {
- Object[] objArray = (Object[]) obj;
- String[] strArray = new String[objArray.length];
- for (int i = 0; i < objArray.length; ++i) {
- strArray[i] = eventDataToString(objArray[i]);
- }
- return Arrays.toString((String[]) strArray);
- } else {
- throw new IllegalArgumentException(
- "Unsupported data type: " + obj.getClass().getSimpleName());
- }
- }
}
}
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 465ac2f1731d..887e1861f789 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -61,6 +61,7 @@ import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.PersistableBundle;
+import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -84,6 +85,7 @@ import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.content.PackageMonitor;
import com.android.internal.infra.AndroidFuture;
+import com.android.internal.policy.IDeviceLockedStateListener;
import com.android.internal.util.DumpUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockSettingsInternal;
@@ -105,6 +107,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
+import java.util.stream.IntStream;
/**
* Manages trust agents and trust listeners.
@@ -253,6 +256,10 @@ public class TrustManagerService extends SystemService {
new SparseArray<>();
private final SparseArray<TrustableTimeoutAlarmListener>
mIdleTrustableTimeoutAlarmListenerForUser = new SparseArray<>();
+
+ private final RemoteCallbackList<IDeviceLockedStateListener>
+ mDeviceLockedStateListeners = new RemoteCallbackList<>();
+
private AlarmManager mAlarmManager;
private final Object mAlarmLock = new Object();
@@ -1090,6 +1097,7 @@ public class TrustManagerService extends SystemService {
if (changed) {
notifyTrustAgentsOfDeviceLockState(userId, locked);
notifyKeystoreOfDeviceLockState(userId, locked);
+ notifyDeviceLockedListenersForUser(userId, locked);
// Also update the user's profiles who have unified challenge, since they
// share the same unlocked state (see {@link #isDeviceLocked(int)})
for (int profileHandle : mUserManager.getEnabledProfileIds(userId)) {
@@ -1910,6 +1918,26 @@ public class TrustManagerService extends SystemService {
return mIsInSignificantPlace;
}
+ @EnforcePermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @Override
+ public void registerDeviceLockedStateListener(IDeviceLockedStateListener listener,
+ int deviceId) {
+ super.registerDeviceLockedStateListener_enforcePermission();
+ if (deviceId != Context.DEVICE_ID_DEFAULT) {
+ // Virtual devices are considered insecure.
+ return;
+ }
+ mDeviceLockedStateListeners.register(listener,
+ Integer.valueOf(UserHandle.getUserId(Binder.getCallingUid())));
+ }
+
+ @EnforcePermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @Override
+ public void unregisterDeviceLockedStateListener(IDeviceLockedStateListener listener) {
+ super.unregisterDeviceLockedStateListener_enforcePermission();
+ mDeviceLockedStateListeners.unregister(listener);
+ }
+
private void enforceReportPermission() {
mContext.enforceCallingOrSelfPermission(
Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE, "reporting trust events");
@@ -2031,6 +2059,7 @@ public class TrustManagerService extends SystemService {
}
notifyKeystoreOfDeviceLockState(userId, locked);
+ notifyDeviceLockedListenersForUser(userId, locked);
if (locked) {
try {
@@ -2497,4 +2526,24 @@ public class TrustManagerService extends SystemService {
updateTrust(mUserId, 0 /* flags */);
}
}
+
+ private void notifyDeviceLockedListenersForUser(int userId, boolean locked) {
+ int numListeners = mDeviceLockedStateListeners.beginBroadcast();
+ try {
+ IntStream.range(0, numListeners).forEach(i -> {
+ try {
+ Integer uid = (Integer) mDeviceLockedStateListeners.getBroadcastCookie(i);
+ if (userId == uid.intValue()) {
+ mDeviceLockedStateListeners.getBroadcastItem(i)
+ .onDeviceLockedStateChanged(locked);
+ }
+ } catch (RemoteException re) {
+ Log.i(TAG, "Service died", re);
+ }
+ });
+
+ } finally {
+ mDeviceLockedStateListeners.finishBroadcast();
+ }
+ }
}
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index c6e6e761c0bc..bf93f73cd3bc 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -1623,6 +1623,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
newParent.setResumedActivity(this, "onParentChanged");
}
mAppCompatController.getTransparentPolicy().start();
+ if (mState == INITIALIZING && isRestrictedFixedOrientation(info.screenOrientation)) {
+ Slog.i(TAG, "Ignoring manifest-declared fixed orientation "
+ + ActivityInfo.screenOrientationToString(info.screenOrientation)
+ + " of " + this + " since target sdk 36");
+ }
}
if (rootTask != null && rootTask.topRunningActivity() == this) {
@@ -3192,6 +3197,17 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
/**
+ * Returns {@code true} if the orientation will be ignored for {@link #isUniversalResizeable()}.
+ */
+ private boolean isRestrictedFixedOrientation(
+ @ActivityInfo.ScreenOrientation int orientation) {
+ // Exclude "locked" because it is not explicit portrait or landscape.
+ return orientation != ActivityInfo.SCREEN_ORIENTATION_LOCKED
+ && ActivityInfo.isFixedOrientation(orientation)
+ && isUniversalResizeable();
+ }
+
+ /**
* Returns {@code true} if the fixed orientation, aspect ratio, resizability of this activity
* will be ignored.
*/
@@ -8123,7 +8139,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
ProtoLog.v(WM_DEBUG_ORIENTATION,
"Setting requested orientation %s for %s",
ActivityInfo.screenOrientationToString(requestedOrientation), this);
- setOrientation(requestedOrientation, this);
+ final int resolvedOrientation = setOrientation(requestedOrientation, this);
+ if (resolvedOrientation != requestedOrientation
+ && isRestrictedFixedOrientation(requestedOrientation)) {
+ Slog.i(TAG, "Ignoring requested fixed orientation "
+ + ActivityInfo.screenOrientationToString(requestedOrientation)
+ + " of " + this + " since target sdk 36");
+ }
// Push the new configuration to the requested app in case where it's not pushed, e.g. when
// the request is handled at task level with letterbox.
@@ -8214,9 +8236,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
@ActivityInfo.ScreenOrientation
protected int getOverrideOrientation() {
int candidateOrientation = super.getOverrideOrientation();
- if (candidateOrientation != ActivityInfo.SCREEN_ORIENTATION_LOCKED
- && ActivityInfo.isFixedOrientation(candidateOrientation)
- && isUniversalResizeable()) {
+ if (isRestrictedFixedOrientation(candidateOrientation)) {
candidateOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
}
return mAppCompatController.getOrientationPolicy()
diff --git a/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java b/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java
index fbf9478b4fd9..f2362b943d1a 100644
--- a/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java
+++ b/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java
@@ -16,7 +16,6 @@
package com.android.server.wm;
-import static android.app.CameraCompatTaskInfo.CAMERA_COMPAT_FREEFORM_NONE;
import static android.content.pm.ActivityInfo.OVERRIDE_CAMERA_COMPAT_DISABLE_FORCE_ROTATION;
import static android.content.pm.ActivityInfo.OVERRIDE_CAMERA_COMPAT_DISABLE_FREEFORM_WINDOWING_TREATMENT;
import static android.content.pm.ActivityInfo.OVERRIDE_CAMERA_COMPAT_DISABLE_REFRESH;
@@ -33,7 +32,6 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLAS
import static com.android.server.wm.AppCompatUtils.isChangeEnabled;
import android.annotation.NonNull;
-import android.app.CameraCompatTaskInfo.FreeformCameraCompatMode;
import com.android.server.wm.utils.OptPropFactory;
import com.android.window.flags.Flags;
@@ -165,7 +163,7 @@ class AppCompatCameraOverrides {
*
* <p>The treatment is enabled when the following conditions are met:
* <ul>
- * <li>Property gating the camera compatibility free-form treatment is enabled.
+ * <li>Feature flag gating the camera compatibility free-form treatment is enabled.
* <li>Activity isn't opted out by the device manufacturer with override.
* </ul>
*/
@@ -202,22 +200,10 @@ class AppCompatCameraOverrides {
&& !mActivityRecord.shouldCreateAppCompatDisplayInsets();
}
- @FreeformCameraCompatMode
- int getFreeformCameraCompatMode() {
- return mAppCompatCameraOverridesState.mFreeformCameraCompatMode;
- }
-
- void setFreeformCameraCompatMode(@FreeformCameraCompatMode int freeformCameraCompatMode) {
- mAppCompatCameraOverridesState.mFreeformCameraCompatMode = freeformCameraCompatMode;
- }
-
static class AppCompatCameraOverridesState {
// Whether activity "refresh" was requested but not finished in
// ActivityRecord#activityResumedLocked following the camera compat force rotation in
// DisplayRotationCompatPolicy.
private boolean mIsRefreshRequested;
-
- @FreeformCameraCompatMode
- private int mFreeformCameraCompatMode = CAMERA_COMPAT_FREEFORM_NONE;
}
}
diff --git a/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java b/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java
index 2a0252ab06fd..506477f67bfc 100644
--- a/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java
+++ b/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java
@@ -38,7 +38,6 @@ import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.CameraCompatTaskInfo;
-import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.view.DisplayInfo;
import android.view.Surface;
@@ -46,7 +45,6 @@ import android.view.Surface;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.protolog.ProtoLog;
import com.android.internal.protolog.WmProtoLogGroups;
-import com.android.window.flags.Flags;
/**
* Policy for camera compatibility freeform treatment.
@@ -124,26 +122,6 @@ final class CameraCompatFreeformPolicy implements CameraStateMonitor.CameraCompa
return appBoundsChanged || displayRotationChanged;
}
- /**
- * Whether activity is eligible for camera compatibility free-form treatment.
- *
- * <p>The treatment is applied to a fixed-orientation camera activity in free-form windowing
- * mode. The treatment letterboxes or pillarboxes the activity to the expected orientation and
- * provides changes to the camera and display orientation signals to match those expected on a
- * portrait device in that orientation (for example, on a standard phone).
- *
- * <p>The treatment is enabled when the following conditions are met:
- * <ul>
- * <li>Property gating the camera compatibility free-form treatment is enabled.
- * <li>Activity isn't opted out by the device manufacturer with override.
- * </ul>
- */
- @VisibleForTesting
- boolean isCameraCompatForFreeformEnabledForActivity(@NonNull ActivityRecord activity) {
- return Flags.enableCameraCompatForDesktopWindowing() && !activity.info.isChangeEnabled(
- ActivityInfo.OVERRIDE_CAMERA_COMPAT_DISABLE_FREEFORM_WINDOWING_TREATMENT);
- }
-
@Override
public void onCameraOpened(@NonNull ActivityRecord cameraActivity,
@NonNull String cameraId) {
@@ -159,16 +137,10 @@ final class CameraCompatFreeformPolicy implements CameraStateMonitor.CameraCompa
}
cameraActivity.recomputeConfiguration();
- updateCameraCompatMode(cameraActivity);
cameraActivity.getTask().dispatchTaskInfoChangedIfNeeded(/* force= */ true);
cameraActivity.ensureActivityConfiguration(/* ignoreVisibility= */ false);
}
- private void updateCameraCompatMode(@NonNull ActivityRecord cameraActivity) {
- cameraActivity.mAppCompatController.getAppCompatCameraOverrides()
- .setFreeformCameraCompatMode(getCameraCompatMode(cameraActivity));
- }
-
@Override
public boolean onCameraClosed(@NonNull String cameraId) {
// Top activity in the same task as the camera activity, or `null` if the task is
@@ -277,7 +249,8 @@ final class CameraCompatFreeformPolicy implements CameraStateMonitor.CameraCompa
boolean isTreatmentEnabledForActivity(@NonNull ActivityRecord activity,
boolean checkOrientation) {
int orientation = activity.getRequestedConfigurationOrientation();
- return isCameraCompatForFreeformEnabledForActivity(activity)
+ return activity.mAppCompatController.getAppCompatCameraOverrides()
+ .shouldApplyFreeformTreatmentForCameraCompat()
&& mCameraStateMonitor.isCameraRunningForActivity(activity)
&& (!checkOrientation || orientation != ORIENTATION_UNDEFINED)
&& activity.inFreeformWindowingMode()
diff --git a/services/core/java/com/android/server/wm/DisplayArea.java b/services/core/java/com/android/server/wm/DisplayArea.java
index 3b2479885f57..f40d636b522a 100644
--- a/services/core/java/com/android/server/wm/DisplayArea.java
+++ b/services/core/java/com/android/server/wm/DisplayArea.java
@@ -101,8 +101,6 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> {
DisplayArea(WindowManagerService wms, Type type, String name, int featureId) {
super(wms);
- // TODO(display-area): move this up to ConfigurationContainer
- setOverrideOrientation(SCREEN_ORIENTATION_UNSET);
mType = type;
mName = name;
mFeatureId = featureId;
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index f50417d6659e..c89feb41e723 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -108,6 +108,7 @@ import android.graphics.Rect;
import android.graphics.Region;
import android.hardware.display.DisplayManager;
import android.hardware.display.DisplayManagerInternal;
+import android.hardware.display.DisplayManagerInternal.DisplayBrightnessOverrideRequest;
import android.hardware.power.Mode;
import android.net.Uri;
import android.os.Binder;
@@ -185,8 +186,9 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
private static final long SLEEP_TRANSITION_WAIT_MILLIS = 1000L;
private Object mLastWindowFreezeSource = null;
- private float mScreenBrightnessOverride = PowerManager.BRIGHTNESS_INVALID_FLOAT;
- private CharSequence mScreenBrightnessOverrideTag;
+ // Per-display WindowManager overrides that are passed on.
+ private final SparseArray<DisplayBrightnessOverrideRequest> mDisplayBrightnessOverrides =
+ new SparseArray<>();
private long mUserActivityTimeout = -1;
private boolean mUpdateRotation = false;
// Only set while traversing the default display based on its content.
@@ -775,8 +777,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
UPDATE_FOCUS_WILL_PLACE_SURFACES, false /*updateInputWindows*/);
}
- mScreenBrightnessOverride = PowerManager.BRIGHTNESS_INVALID_FLOAT;
- mScreenBrightnessOverrideTag = null;
+ mDisplayBrightnessOverrides.clear();
mUserActivityTimeout = -1;
mObscureApplicationContentOnSecondaryDisplays = false;
mSustainedPerformanceModeCurrent = false;
@@ -879,18 +880,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
}
if (!mWmService.mDisplayFrozen) {
- final float brightnessOverride = mScreenBrightnessOverride < PowerManager.BRIGHTNESS_MIN
- || mScreenBrightnessOverride > PowerManager.BRIGHTNESS_MAX
- ? PowerManager.BRIGHTNESS_INVALID_FLOAT : mScreenBrightnessOverride;
- CharSequence overrideTag = null;
- if (brightnessOverride != PowerManager.BRIGHTNESS_INVALID_FLOAT) {
- overrideTag = mScreenBrightnessOverrideTag;
- }
- int brightnessFloatAsIntBits = Float.floatToIntBits(brightnessOverride);
// Post these on a handler such that we don't call into power manager service while
// holding the window manager lock to avoid lock contention with power manager lock.
- mHandler.obtainMessage(SET_SCREEN_BRIGHTNESS_OVERRIDE, brightnessFloatAsIntBits,
- 0, overrideTag).sendToTarget();
+ mHandler.obtainMessage(SET_SCREEN_BRIGHTNESS_OVERRIDE, mDisplayBrightnessOverrides)
+ .sendToTarget();
mHandler.obtainMessage(SET_USER_ACTIVITY_TIMEOUT, mUserActivityTimeout).sendToTarget();
}
@@ -1043,10 +1036,13 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
}
if (w.isDrawn() || (w.mActivityRecord != null && w.mActivityRecord.firstWindowDrawn
&& w.mActivityRecord.isVisibleRequested())) {
- if (!syswin && w.mAttrs.screenBrightness >= 0
- && Float.isNaN(mScreenBrightnessOverride)) {
- mScreenBrightnessOverride = w.mAttrs.screenBrightness;
- mScreenBrightnessOverrideTag = w.getWindowTag();
+ if (!syswin && w.mAttrs.screenBrightness >= PowerManager.BRIGHTNESS_MIN
+ && w.mAttrs.screenBrightness <= PowerManager.BRIGHTNESS_MAX
+ && !mDisplayBrightnessOverrides.contains(w.getDisplayId())) {
+ var brightnessOverride = new DisplayBrightnessOverrideRequest();
+ brightnessOverride.brightness = w.mAttrs.screenBrightness;
+ brightnessOverride.tag = w.getWindowTag();
+ mDisplayBrightnessOverrides.put(w.getDisplayId(), brightnessOverride);
}
// This function assumes that the contents of the default display are processed first
@@ -1118,8 +1114,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
public void handleMessage(Message msg) {
switch (msg.what) {
case SET_SCREEN_BRIGHTNESS_OVERRIDE:
- mWmService.mPowerManagerInternal.setScreenBrightnessOverrideFromWindowManager(
- Float.intBitsToFloat(msg.arg1), (CharSequence) msg.obj);
+ var brightnessOverrides =
+ (SparseArray<DisplayBrightnessOverrideRequest>) msg.obj;
+ mWmService.mDisplayManagerInternal.setScreenBrightnessOverrideFromWindowManager(
+ brightnessOverrides);
break;
case SET_USER_ACTIVITY_TIMEOUT:
mWmService.mPowerManagerInternal.
diff --git a/services/core/java/com/android/server/wm/TransitionController.java b/services/core/java/com/android/server/wm/TransitionController.java
index 143d1b72fff9..8562bb23b30f 100644
--- a/services/core/java/com/android/server/wm/TransitionController.java
+++ b/services/core/java/com/android/server/wm/TransitionController.java
@@ -658,8 +658,8 @@ class TransitionController {
}
// Always allow WindowState to assign layers since it won't affect transition.
return wc.asWindowState() != null || (!isPlaying()
- // Don't assign task while collecting.
- && !(wc.asTask() != null && isCollecting()));
+ // Don't assign task or display area layers while collecting.
+ && !((wc.asTask() != null || wc.asDisplayArea() != null) && isCollecting()));
}
@WindowConfiguration.WindowingMode
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 5f92bb626154..2397e032fcc8 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -1676,30 +1676,36 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
* @param orientation the specified orientation. Needs to be one of {@link ScreenOrientation}.
* @param requestingContainer the container which orientation request has changed. Mostly used
* to ensure it gets correct configuration.
+ * @return the resolved override orientation of this window container.
*/
- void setOrientation(@ScreenOrientation int orientation,
+ @ScreenOrientation
+ int setOrientation(@ScreenOrientation int orientation,
@Nullable WindowContainer requestingContainer) {
if (getOverrideOrientation() == orientation) {
- return;
+ return orientation;
}
-
setOverrideOrientation(orientation);
final WindowContainer parent = getParent();
- if (parent != null) {
- if (getConfiguration().orientation != getRequestedConfigurationOrientation()
- // Update configuration directly only if the change won't be dispatched from
- // ancestor. This prevents from computing intermediate configuration when the
- // parent also needs to be updated from the ancestor. E.g. the app requests
- // portrait but the task is still in landscape. While updating from display,
- // the task can be updated to portrait first so the configuration can be
- // computed in a consistent environment.
- && (inMultiWindowMode()
+ if (parent == null) {
+ return orientation;
+ }
+ // The derived class can return a result that is different from the given orientation.
+ final int resolvedOrientation = getOverrideOrientation();
+ if (getConfiguration().orientation != getRequestedConfigurationOrientation(
+ false /* forDisplay */, resolvedOrientation)
+ // Update configuration directly only if the change won't be dispatched from
+ // ancestor. This prevents from computing intermediate configuration when the
+ // parent also needs to be updated from the ancestor. E.g. the app requests
+ // portrait but the task is still in landscape. While updating from display,
+ // the task can be updated to portrait first so the configuration can be
+ // computed in a consistent environment.
+ && (inMultiWindowMode()
|| !handlesOrientationChangeFromDescendant(orientation))) {
- // Resolve the requested orientation.
- onConfigurationChanged(parent.getConfiguration());
- }
- onDescendantOrientationChanged(requestingContainer);
+ // Resolve the requested orientation.
+ onConfigurationChanged(parent.getConfiguration());
}
+ onDescendantOrientationChanged(requestingContainer);
+ return resolvedOrientation;
}
@ScreenOrientation
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 3e7c4ef4019f..9e9dadba6d4f 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -249,8 +249,8 @@ import com.android.server.security.AttestationVerificationManagerService;
import com.android.server.security.FileIntegrityService;
import com.android.server.security.KeyAttestationApplicationIdProviderService;
import com.android.server.security.KeyChainSystemService;
-import com.android.server.security.adaptiveauthentication.AdaptiveAuthenticationService;
import com.android.server.security.advancedprotection.AdvancedProtectionService;
+import com.android.server.security.authenticationpolicy.AuthenticationPolicyService;
import com.android.server.security.forensic.ForensicService;
import com.android.server.security.rkp.RemoteProvisioningService;
import com.android.server.selinux.SelinuxAuditLogsService;
@@ -2660,8 +2660,8 @@ public final class SystemServer implements Dumpable {
t.traceEnd();
if (android.adaptiveauth.Flags.enableAdaptiveAuth()) {
- t.traceBegin("StartAdaptiveAuthenticationService");
- mSystemServiceManager.startService(AdaptiveAuthenticationService.class);
+ t.traceBegin("StartAuthenticationPolicyService");
+ mSystemServiceManager.startService(AuthenticationPolicyService.class);
t.traceEnd();
}
@@ -3062,7 +3062,10 @@ public final class SystemServer implements Dumpable {
if (com.android.ranging.flags.Flags.rangingStackEnabled()) {
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_UWB)
|| context.getPackageManager().hasSystemFeature(
- PackageManager.FEATURE_WIFI_RTT)) {
+ PackageManager.FEATURE_WIFI_RTT)
+ || (com.android.ranging.flags.Flags.rangingCsEnabled()
+ && context.getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_BLUETOOTH_LE_CHANNEL_SOUNDING))) {
t.traceBegin("RangingService");
// TODO: b/375264320 - Remove after RELEASE_RANGING_STACK is ramped to next.
try {
diff --git a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
index 4e868887ea1b..e307e529a40b 100644
--- a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
+++ b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
@@ -144,6 +144,10 @@ public final class ProfcollectForwardingService extends SystemService {
public void onBootPhase(int phase) {
if (phase == PHASE_SYSTEM_SERVICES_READY) {
UsbManager usbManager = getContext().getSystemService(UsbManager.class);
+ if (usbManager == null) {
+ mAdbActive = false;
+ return;
+ }
mAdbActive = ((usbManager.getCurrentFunctions() & UsbManager.FUNCTION_ADB) == 1);
Log.d(LOG_TAG, "ADB is " + mAdbActive + " on system startup");
}
diff --git a/services/tests/apexsystemservices/services/Android.bp b/services/tests/apexsystemservices/services/Android.bp
index 477ea4cdad37..70d84dcf6007 100644
--- a/services/tests/apexsystemservices/services/Android.bp
+++ b/services/tests/apexsystemservices/services/Android.bp
@@ -17,4 +17,5 @@ java_library {
],
visibility: ["//frameworks/base/services/tests/apexsystemservices:__subpackages__"],
apex_available: ["//apex_available:anyapex"],
+ compile_dex: true,
}
diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
index e64d9855bc54..c9963391470e 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
@@ -121,8 +121,8 @@ public final class DisplayPowerControllerTest {
private static final float PROX_SENSOR_MAX_RANGE = 5;
private static final float DOZE_SCALE_FACTOR = 0.34f;
private static final float DEFAULT_DOZE_BRIGHTNESS = 0.121f;
+ private static final float OVERRIDE_BRIGHTNESS = 0.567f;
- private static final float BRIGHTNESS_RAMP_RATE_MINIMUM = 0.0f;
private static final float BRIGHTNESS_RAMP_RATE_FAST_DECREASE = 0.3f;
private static final float BRIGHTNESS_RAMP_RATE_FAST_INCREASE = 0.4f;
private static final float BRIGHTNESS_RAMP_RATE_SLOW_DECREASE = 0.1f;
@@ -2438,6 +2438,36 @@ public final class DisplayPowerControllerTest {
any(BrightnessEvent.class));
}
+ @Test
+ public void brightnessOverrideInPowerRequest_enablesOverrideBrightnessStrategy() {
+ when(mHolder.displayPowerState.getScreenState()).thenReturn(Display.STATE_ON);
+ DisplayPowerRequest dpr = new DisplayPowerRequest();
+ dpr.screenBrightnessOverride = OVERRIDE_BRIGHTNESS;
+ mHolder.dpc.requestPowerState(dpr, /* waitForNegativeProximity= */ false);
+ advanceTime(1); // Run updatePowerState
+
+ verify(mHolder.animator).animateTo(eq(OVERRIDE_BRIGHTNESS), anyFloat(), anyFloat(),
+ eq(false));
+ }
+
+ @Test
+ public void brightnessOverrideRequest_enablesOverrideBrightnessStrategy() {
+ mHolder = createDisplayPowerController(DISPLAY_ID, UNIQUE_ID);
+ when(mHolder.displayPowerState.getScreenState()).thenReturn(Display.STATE_ON);
+
+ DisplayPowerRequest dpr = new DisplayPowerRequest();
+ mHolder.dpc.requestPowerState(dpr, /* waitForNegativeProximity= */ false);
+ advanceTime(1); // Run updatePowerState
+
+ var dbor = new DisplayManagerInternal.DisplayBrightnessOverrideRequest();
+ dbor.brightness = OVERRIDE_BRIGHTNESS;
+ mHolder.dpc.setBrightnessOverrideRequest(dbor);
+ advanceTime(1); // Process the WM brightness override request
+
+ verify(mHolder.animator).animateTo(eq(OVERRIDE_BRIGHTNESS), anyFloat(), anyFloat(),
+ eq(false));
+ }
+
/**
* Creates a mock and registers it to {@link LocalServices}.
*/
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessControllerTest.java
index 4f875c38b92f..49de80179683 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessControllerTest.java
@@ -52,6 +52,7 @@ import com.android.server.display.brightness.strategy.AutoBrightnessFallbackStra
import com.android.server.display.brightness.strategy.AutomaticBrightnessStrategy;
import com.android.server.display.brightness.strategy.DisplayBrightnessStrategy;
import com.android.server.display.brightness.strategy.OffloadBrightnessStrategy;
+import com.android.server.display.brightness.strategy.OverrideBrightnessStrategy;
import com.android.server.display.brightness.strategy.TemporaryBrightnessStrategy;
import com.android.server.display.feature.DisplayManagerFlags;
@@ -155,6 +156,27 @@ public final class DisplayBrightnessControllerTest {
}
@Test
+ public void updateWindowManagerBrightnessOverride() {
+ var request = new DisplayManagerInternal.DisplayBrightnessOverrideRequest();
+ request.brightness = 0.4f;
+ request.tag = "cts";
+ OverrideBrightnessStrategy overrideBrightnessStrategy = mock(
+ OverrideBrightnessStrategy.class);
+ when(mDisplayBrightnessStrategySelector.getOverrideBrightnessStrategy()).thenReturn(
+ overrideBrightnessStrategy);
+
+ when(overrideBrightnessStrategy.updateWindowManagerBrightnessOverride(any()))
+ .thenReturn(false);
+ assertFalse(mDisplayBrightnessController.updateWindowManagerBrightnessOverride(request));
+ verify(overrideBrightnessStrategy).updateWindowManagerBrightnessOverride(request);
+
+ when(overrideBrightnessStrategy.updateWindowManagerBrightnessOverride(any()))
+ .thenReturn(true);
+ assertTrue(mDisplayBrightnessController.updateWindowManagerBrightnessOverride(request));
+ verify(overrideBrightnessStrategy, times(2)).updateWindowManagerBrightnessOverride(request);
+ }
+
+ @Test
public void setCurrentScreenBrightness() {
// Current Screen brightness is set as expected when a different value than the current
// is set
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java
index b99a18c8e68c..a6476910a5de 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java
@@ -183,6 +183,8 @@ public final class DisplayBrightnessStrategySelectorTest {
when(mContext.getContentResolver()).thenReturn(contentResolver);
when(mContext.getResources()).thenReturn(mResources);
when(mInvalidBrightnessStrategy.getName()).thenReturn("InvalidBrightnessStrategy");
+ when(mOverrideBrightnessStrategy.getWindowManagerBrightnessOverride())
+ .thenReturn(PowerManager.BRIGHTNESS_INVALID_FLOAT);
mDisplayBrightnessStrategySelector = new DisplayBrightnessStrategySelector(mContext,
mInjector, DISPLAY_ID, mDisplayManagerFlags);
@@ -284,6 +286,20 @@ public final class DisplayBrightnessStrategySelectorTest {
}
@Test
+ public void selectStrategySelectsOverrideStrategyWhenWindowManagerOverrideIsValid() {
+ DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock(
+ DisplayManagerInternal.DisplayPowerRequest.class);
+ displayPowerRequest.screenBrightnessOverride = Float.NaN;
+ when(mFollowerBrightnessStrategy.getBrightnessToFollow()).thenReturn(Float.NaN);
+ when(mOverrideBrightnessStrategy.getWindowManagerBrightnessOverride()).thenReturn(0.4f);
+ assertEquals(mDisplayBrightnessStrategySelector.selectStrategy(
+ new StrategySelectionRequest(displayPowerRequest, Display.STATE_ON,
+ 0.1f, false, mDisplayOffloadSession,
+ STYLUS_IS_NOT_BEING_USED, /* isBedtimeModeWearEnabled= */ false)),
+ mOverrideBrightnessStrategy);
+ }
+
+ @Test
public void selectStrategySelectsTemporaryStrategyWhenValid() {
DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock(
DisplayManagerInternal.DisplayPowerRequest.class);
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OverrideBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OverrideBrightnessStrategyTest.java
index cc21af19722b..414f274a9b58 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OverrideBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OverrideBrightnessStrategyTest.java
@@ -16,8 +16,9 @@
package com.android.server.display.brightness.strategy;
+import static android.os.PowerManager.BRIGHTNESS_INVALID_FLOAT;
-import static org.junit.Assert.assertEquals;
+import static com.google.common.truth.Truth.assertThat;
import android.hardware.display.DisplayManagerInternal;
@@ -34,7 +35,6 @@ import org.junit.runner.RunWith;
@SmallTest
@RunWith(AndroidJUnit4.class)
-
public class OverrideBrightnessStrategyTest {
private OverrideBrightnessStrategy mOverrideBrightnessStrategy;
@@ -62,7 +62,56 @@ public class OverrideBrightnessStrategyTest {
new StrategyExecutionRequest(displayPowerRequest, 0.2f,
/* userSetBrightnessChanged= */ false,
/* isStylusBeingUsed */ false));
- assertEquals(updatedDisplayBrightnessState, expectedDisplayBrightnessState);
+ assertThat(updatedDisplayBrightnessState).isEqualTo(expectedDisplayBrightnessState);
}
+ @Test
+ public void testUpdateBrightnessWhenWindowManagerOverrideIsRequested() {
+ var overrideRequest = new DisplayManagerInternal.DisplayBrightnessOverrideRequest();
+ overrideRequest.brightness = 0.2f;
+ mOverrideBrightnessStrategy.updateWindowManagerBrightnessOverride(overrideRequest);
+ DisplayManagerInternal.DisplayPowerRequest
+ displayPowerRequest = new DisplayManagerInternal.DisplayPowerRequest();
+ displayPowerRequest.screenBrightnessOverride = BRIGHTNESS_INVALID_FLOAT;
+ BrightnessReason brightnessReason = new BrightnessReason();
+ brightnessReason.setReason(BrightnessReason.REASON_OVERRIDE);
+ DisplayBrightnessState expectedDisplayBrightnessState =
+ new DisplayBrightnessState.Builder()
+ .setBrightness(overrideRequest.brightness)
+ .setBrightnessReason(brightnessReason)
+ .setDisplayBrightnessStrategyName(mOverrideBrightnessStrategy.getName())
+ .build();
+ DisplayBrightnessState updatedDisplayBrightnessState =
+ mOverrideBrightnessStrategy.updateBrightness(
+ new StrategyExecutionRequest(displayPowerRequest, 0.2f,
+ /* userSetBrightnessChanged= */ false,
+ /* isStylusBeingUsed */ false));
+ assertThat(updatedDisplayBrightnessState).isEqualTo(expectedDisplayBrightnessState);
+ }
+
+ @Test
+ public void testUpdateWindowManagerBrightnessOverride() {
+ var request = new DisplayManagerInternal.DisplayBrightnessOverrideRequest();
+ assertThat(mOverrideBrightnessStrategy.updateWindowManagerBrightnessOverride(request))
+ .isFalse();
+ assertThat(mOverrideBrightnessStrategy.getWindowManagerBrightnessOverride())
+ .isEqualTo(BRIGHTNESS_INVALID_FLOAT);
+
+ request.brightness = 0.2f;
+ assertThat(mOverrideBrightnessStrategy.updateWindowManagerBrightnessOverride(request))
+ .isTrue();
+ assertThat(mOverrideBrightnessStrategy.getWindowManagerBrightnessOverride())
+ .isEqualTo(0.2f);
+
+ // Passing the same request doesn't result in an update.
+ assertThat(mOverrideBrightnessStrategy.updateWindowManagerBrightnessOverride(request))
+ .isFalse();
+ assertThat(mOverrideBrightnessStrategy.getWindowManagerBrightnessOverride())
+ .isEqualTo(0.2f);
+
+ assertThat(mOverrideBrightnessStrategy.updateWindowManagerBrightnessOverride(null))
+ .isTrue();
+ assertThat(mOverrideBrightnessStrategy.getWindowManagerBrightnessOverride())
+ .isEqualTo(BRIGHTNESS_INVALID_FLOAT);
+ }
}
diff --git a/services/tests/displayservicetests/src/com/android/server/display/mode/SystemRequestObserverTest.kt b/services/tests/displayservicetests/src/com/android/server/display/mode/SystemRequestObserverTest.kt
index 9ea7ea7ef23d..56e4048c842e 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/mode/SystemRequestObserverTest.kt
+++ b/services/tests/displayservicetests/src/com/android/server/display/mode/SystemRequestObserverTest.kt
@@ -27,6 +27,7 @@ import org.junit.runner.RunWith
import org.mockito.junit.MockitoJUnit
import org.mockito.kotlin.any
import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.clearInvocations
import org.mockito.kotlin.doThrow
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
@@ -149,6 +150,29 @@ class SystemRequestObserverTest {
}
@Test
+ fun testTokenUnlinkToDeath_noVotes() {
+ val systemRequestObserver = SystemRequestObserver(storage)
+
+ systemRequestObserver.requestDisplayModes(mockToken, DISPLAY_ID, null)
+
+ verify(mockToken, never()).unlinkToDeath(any(), eq(0))
+ }
+
+ @Test
+ fun testTokenUnlinkToDeath_removedVotes() {
+ val systemRequestObserver = SystemRequestObserver(storage)
+ val requestedModes = intArrayOf(1, 2, 3)
+
+ systemRequestObserver.requestDisplayModes(mockToken, DISPLAY_ID, requestedModes)
+ systemRequestObserver.requestDisplayModes(mockToken, DISPLAY_ID, null)
+ clearInvocations(mockToken)
+
+ systemRequestObserver.requestDisplayModes(mockToken, DISPLAY_ID, null)
+
+ verify(mockToken, never()).unlinkToDeath(any(), eq(0))
+ }
+
+ @Test
fun testTokenUnlinkToDeathNotCalled_votesForOtherDisplayInStorage() {
val systemRequestObserver = SystemRequestObserver(storage)
val requestedModes = intArrayOf(1, 2, 3)
diff --git a/services/tests/security/forensic/src/com/android/server/security/forensic/ForensicServiceTest.java b/services/tests/security/forensic/src/com/android/server/security/forensic/ForensicServiceTest.java
index 0da6db634330..03c449cc8d69 100644
--- a/services/tests/security/forensic/src/com/android/server/security/forensic/ForensicServiceTest.java
+++ b/services/tests/security/forensic/src/com/android/server/security/forensic/ForensicServiceTest.java
@@ -31,6 +31,9 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import android.annotation.SuppressLint;
+import android.app.admin.ConnectEvent;
+import android.app.admin.DnsEvent;
+import android.app.admin.SecurityLog.SecurityEvent;
import android.content.Context;
import android.os.Looper;
import android.os.PermissionEnforcer;
@@ -40,7 +43,6 @@ import android.os.test.TestLooper;
import android.security.forensic.ForensicEvent;
import android.security.forensic.IForensicServiceCommandCallback;
import android.security.forensic.IForensicServiceStateCallback;
-import android.util.ArrayMap;
import androidx.test.core.app.ApplicationProvider;
@@ -53,7 +55,6 @@ import org.mockito.ArgumentCaptor;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
public class ForensicServiceTest {
private static final int STATE_UNKNOWN = IForensicServiceStateCallback.State.UNKNOWN;
@@ -300,23 +301,19 @@ public class ForensicServiceTest {
ServiceThread mockThread = spy(ServiceThread.class);
mDataAggregator.setHandler(mLooperOfDataAggregator, mockThread);
- String eventOneType = "event_one_type";
- String eventOneMapKey = "event_one_map_key";
- String eventOneMapVal = "event_one_map_val";
- Map<String, String> eventOneMap = new ArrayMap<String, String>();
- eventOneMap.put(eventOneMapKey, eventOneMapVal);
- ForensicEvent eventOne = new ForensicEvent(eventOneType, eventOneMap);
+ SecurityEvent securityEvent = new SecurityEvent(0, new byte[0]);
+ ForensicEvent eventOne = new ForensicEvent(securityEvent);
- String eventTwoType = "event_two_type";
- String eventTwoMapKey = "event_two_map_key";
- String eventTwoMapVal = "event_two_map_val";
- Map<String, String> eventTwoMap = new ArrayMap<String, String>();
- eventTwoMap.put(eventTwoMapKey, eventTwoMapVal);
- ForensicEvent eventTwo = new ForensicEvent(eventTwoType, eventTwoMap);
+ ConnectEvent connectEvent = new ConnectEvent("127.0.0.1", 80, null, 0);
+ ForensicEvent eventTwo = new ForensicEvent(connectEvent);
+
+ DnsEvent dnsEvent = new DnsEvent(null, new String[] {"127.0.0.1"}, 1, null, 0);
+ ForensicEvent eventThree = new ForensicEvent(dnsEvent);
List<ForensicEvent> events = new ArrayList<>();
events.add(eventOne);
events.add(eventTwo);
+ events.add(eventThree);
doReturn(true).when(mForensicEventTransportConnection).addData(any());
@@ -327,18 +324,16 @@ public class ForensicServiceTest {
ArgumentCaptor<List<ForensicEvent>> captor = ArgumentCaptor.forClass(List.class);
verify(mForensicEventTransportConnection).addData(captor.capture());
List<ForensicEvent> receivedEvents = captor.getValue();
- assertEquals(receivedEvents.size(), 2);
+ assertEquals(receivedEvents.size(), 3);
- assertEquals(receivedEvents.getFirst().getType(), eventOneType);
- assertEquals(receivedEvents.getFirst().getKeyValuePairs().size(), 1);
- assertEquals(receivedEvents.getFirst().getKeyValuePairs().get(eventOneMapKey),
- eventOneMapVal);
+ assertEquals(receivedEvents.get(0).getType(), ForensicEvent.SECURITY_EVENT);
+ assertNotNull(receivedEvents.get(0).getSecurityEvent());
- assertEquals(receivedEvents.getLast().getType(), eventTwoType);
- assertEquals(receivedEvents.getLast().getKeyValuePairs().size(), 1);
- assertEquals(receivedEvents.getLast().getKeyValuePairs().get(eventTwoMapKey),
- eventTwoMapVal);
+ assertEquals(receivedEvents.get(1).getType(), ForensicEvent.NETWORK_EVENT_CONNECT);
+ assertNotNull(receivedEvents.get(1).getConnectEvent());
+ assertEquals(receivedEvents.get(2).getType(), ForensicEvent.NETWORK_EVENT_DNS);
+ assertNotNull(receivedEvents.get(2).getDnsEvent());
}
private class MockInjector implements ForensicService.Injector {
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/FlashNotificationsControllerTest.java b/services/tests/servicestests/src/com/android/server/accessibility/FlashNotificationsControllerTest.java
index 0988eeab5913..a55346caeeb1 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/FlashNotificationsControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/FlashNotificationsControllerTest.java
@@ -430,7 +430,7 @@ public class FlashNotificationsControllerTest {
AudioPlaybackConfiguration config = new AudioPlaybackConfiguration(
mock(PlayerBase.PlayerIdCard.class), 0, 0, 0);
config.handleStateEvent(AudioPlaybackConfiguration.PLAYER_STATE_STARTED,
- AudioPlaybackConfiguration.PLAYER_DEVICEID_INVALID);
+ AudioPlaybackConfiguration.PLAYER_DEVICEIDS_INVALID);
AudioAttributes.Builder builder = new AudioAttributes.Builder();
builder.setUsage(AudioAttributes.USAGE_ALARM);
diff --git a/services/tests/servicestests/src/com/android/server/audio/LoudnessCodecHelperTest.java b/services/tests/servicestests/src/com/android/server/audio/LoudnessCodecHelperTest.java
index 84c0ab38ca48..0d44021bae09 100644
--- a/services/tests/servicestests/src/com/android/server/audio/LoudnessCodecHelperTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/LoudnessCodecHelperTest.java
@@ -314,12 +314,13 @@ public class LoudnessCodecHelperTest {
AudioDeviceInfo[] devicesStatic = AudioManager.getDevicesStatic(GET_DEVICES_OUTPUTS);
assumeTrue(devIdx < devicesStatic.length);
Log.d(TAG, "Out devices number " + devicesStatic.length + ". Picking index " + devIdx);
- int deviceId = devicesStatic[devIdx].getId();
+ int[] deviceIds = new int[1];
+ deviceIds[0] = devicesStatic[devIdx].getId();
PlayerBase.PlayerIdCard idCard = Mockito.mock(PlayerBase.PlayerIdCard.class);
AudioPlaybackConfiguration apc =
new AudioPlaybackConfiguration(idCard, piid, /*uid=*/1, /*pid=*/myPid());
- apc.handleStateEvent(PLAYER_UPDATE_DEVICE_ID, deviceId);
+ apc.handleStateEvent(PLAYER_UPDATE_DEVICE_ID, deviceIds);
apc.handleSessionIdEvent(sessionId);
apc.handleAudioAttributesEvent(new AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_MEDIA)
diff --git a/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java b/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java
index 51c2ad1d1134..687a1ab4c7aa 100644
--- a/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/companion/virtual/audio/VirtualAudioControllerTest.java
@@ -200,7 +200,9 @@ public class VirtualAudioControllerTest {
AudioPlaybackConfiguration audioPlaybackConfiguration =
new AudioPlaybackConfiguration(
playerIdCard, /* piid= */ 1000, appUid, /* pid= */ 1000);
- audioPlaybackConfiguration.handleStateEvent(PLAYER_STATE_STARTED, /* deviceId= */1);
+ int[] deviceIds = new int[1];
+ deviceIds[0] = 1;
+ audioPlaybackConfiguration.handleStateEvent(PLAYER_STATE_STARTED, deviceIds);
configs.add(audioPlaybackConfiguration);
}
return configs;
diff --git a/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java
index 510c2bcabad0..b2a7d20fb948 100644
--- a/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java
@@ -664,7 +664,7 @@ public class MediaProjectionManagerServiceTest {
mClockInjector);
MediaProjectionManagerService.MediaProjection projection = createProjectionPreconditions(
service);
- mClock.fastForward(projection.mDefaultTimeoutMs + 10);
+ mClock.fastForward(projection.mDefaultTimeoutMillis + 10);
// Immediate timeout - so no longer valid.
assertThat(projection.isValid()).isFalse();
diff --git a/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionStopControllerTest.java b/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionStopControllerTest.java
index 89d2d2847007..affcfc14034e 100644
--- a/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionStopControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionStopControllerTest.java
@@ -194,12 +194,14 @@ public class MediaProjectionStopControllerTest {
@Test
public void testExemptFromStoppingNullProjection() throws Exception {
- assertThat(mStopController.isExemptFromStopping(null)).isTrue();
+ assertThat(mStopController.isExemptFromStopping(null,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
}
@Test
public void testExemptFromStoppingInvalidProjection() throws Exception {
- assertThat(mStopController.isExemptFromStopping(createMediaProjection(null))).isTrue();
+ assertThat(mStopController.isExemptFromStopping(createMediaProjection(null),
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
}
@Test
@@ -213,7 +215,8 @@ public class MediaProjectionStopControllerTest {
Settings.Global.putInt(mContext.getContentResolver(),
DISABLE_SCREEN_SHARE_PROTECTIONS_FOR_APPS_AND_NOTIFICATIONS, 1);
- assertThat(mStopController.isExemptFromStopping(mediaProjection)).isTrue();
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
} finally {
Settings.Global.putInt(mContext.getContentResolver(),
DISABLE_SCREEN_SHARE_PROTECTIONS_FOR_APPS_AND_NOTIFICATIONS, value);
@@ -230,7 +233,8 @@ public class MediaProjectionStopControllerTest {
eq(mediaProjection.uid), eq(mediaProjection.packageName),
nullable(String.class),
nullable(String.class));
- assertThat(mStopController.isExemptFromStopping(mediaProjection)).isTrue();
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
}
@Test
@@ -244,7 +248,8 @@ public class MediaProjectionStopControllerTest {
doReturn(PackageManager.PERMISSION_DENIED).when(
mPackageManager).checkPermission(
RECORD_SENSITIVE_CONTENT, mediaProjection.packageName);
- assertThat(mStopController.isExemptFromStopping(mediaProjection)).isTrue();
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -261,7 +266,8 @@ public class MediaProjectionStopControllerTest {
packages.valueAt(0));
doReturn(PackageManager.PERMISSION_DENIED).when(mPackageManager).checkPermission(
RECORD_SENSITIVE_CONTENT, mediaProjection.packageName);
- assertThat(mStopController.isExemptFromStopping(mediaProjection)).isTrue();
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
}
@Test
@@ -270,7 +276,8 @@ public class MediaProjectionStopControllerTest {
PACKAGE_NAME);
doReturn(PackageManager.PERMISSION_DENIED).when(mPackageManager).checkPermission(
RECORD_SENSITIVE_CONTENT, mediaProjection.packageName);
- assertThat(mStopController.isExemptFromStopping(mediaProjection)).isTrue();
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
}
@Test
@@ -278,7 +285,8 @@ public class MediaProjectionStopControllerTest {
MediaProjectionManagerService.MediaProjection mediaProjection = createMediaProjection();
doReturn(PackageManager.PERMISSION_GRANTED).when(mPackageManager).checkPermission(
RECORD_SENSITIVE_CONTENT, mediaProjection.packageName);
- assertThat(mStopController.isExemptFromStopping(mediaProjection)).isTrue();
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isTrue();
}
@Test
@@ -287,7 +295,8 @@ public class MediaProjectionStopControllerTest {
mediaProjection.notifyVirtualDisplayCreated(1);
doReturn(PackageManager.PERMISSION_DENIED).when(mPackageManager).checkPermission(
RECORD_SENSITIVE_CONTENT, mediaProjection.packageName);
- assertThat(mStopController.isExemptFromStopping(mediaProjection)).isFalse();
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_UNKNOWN)).isFalse();
}
@Test
@@ -368,6 +377,36 @@ public class MediaProjectionStopControllerTest {
verify(mStopConsumer).accept(MediaProjectionStopController.STOP_REASON_CALL_END);
}
+ @Test
+ @EnableFlags(com.android.media.projection.flags.Flags.FLAG_STOP_MEDIA_PROJECTION_ON_CALL_END)
+ public void testExemptFromStopping_callEnd_callBeforeMediaProjection() throws Exception {
+ when(mTelecomManager.isInCall()).thenReturn(true);
+ mStopController.callStateChanged();
+
+ MediaProjectionManagerService.MediaProjection mediaProjection = createMediaProjection();
+ mediaProjection.notifyVirtualDisplayCreated(1);
+ doReturn(PackageManager.PERMISSION_DENIED).when(mPackageManager).checkPermission(
+ RECORD_SENSITIVE_CONTENT, mediaProjection.packageName);
+
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_CALL_END)).isFalse();
+ }
+
+ @Test
+ @EnableFlags(com.android.media.projection.flags.Flags.FLAG_STOP_MEDIA_PROJECTION_ON_CALL_END)
+ public void testExemptFromStopping_callEnd_callAfterMediaProjection() throws Exception {
+ MediaProjectionManagerService.MediaProjection mediaProjection = createMediaProjection();
+ mediaProjection.notifyVirtualDisplayCreated(1);
+ doReturn(PackageManager.PERMISSION_DENIED).when(mPackageManager).checkPermission(
+ RECORD_SENSITIVE_CONTENT, mediaProjection.packageName);
+
+ when(mTelecomManager.isInCall()).thenReturn(true);
+ mStopController.callStateChanged();
+
+ assertThat(mStopController.isExemptFromStopping(mediaProjection,
+ MediaProjectionStopController.STOP_REASON_CALL_END)).isTrue();
+ }
+
private MediaProjectionManagerService.MediaProjection createMediaProjection()
throws NameNotFoundException {
return createMediaProjection(PACKAGE_NAME);
diff --git a/services/tests/servicestests/src/com/android/server/security/adaptiveauthentication/OWNERS b/services/tests/servicestests/src/com/android/server/security/adaptiveauthentication/OWNERS
deleted file mode 100644
index bc8efa92c16f..000000000000
--- a/services/tests/servicestests/src/com/android/server/security/adaptiveauthentication/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-include /services/core/java/com/android/server/security/adaptiveauthentication/OWNERS \ No newline at end of file
diff --git a/services/tests/servicestests/src/com/android/server/security/adaptiveauthentication/AdaptiveAuthenticationServiceTest.java b/services/tests/servicestests/src/com/android/server/security/authenticationpolicy/AuthenticationPolicyServiceTest.java
index 154494a13072..2238a1be97a1 100644
--- a/services/tests/servicestests/src/com/android/server/security/adaptiveauthentication/AdaptiveAuthenticationServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/security/authenticationpolicy/AuthenticationPolicyServiceTest.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package com.android.server.security.adaptiveauthentication;
+package com.android.server.security.authenticationpolicy;
import static android.adaptiveauth.Flags.FLAG_ENABLE_ADAPTIVE_AUTH;
import static android.adaptiveauth.Flags.FLAG_REPORT_BIOMETRIC_AUTH_ATTEMPTS;
import static android.security.Flags.FLAG_REPORT_PRIMARY_AUTH_ATTEMPTS;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST;
-import static com.android.server.security.adaptiveauthentication.AdaptiveAuthenticationService.MAX_ALLOWED_FAILED_AUTH_ATTEMPTS;
+import static com.android.server.security.authenticationpolicy.AuthenticationPolicyService.MAX_ALLOWED_FAILED_AUTH_ATTEMPTS;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;
@@ -66,12 +66,12 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
- * atest FrameworksServicesTests:AdaptiveAuthenticationServiceTest
+ * atest FrameworksServicesTests:AuthenticationPolicyServiceTest
*/
@Presubmit
@SmallTest
@RunWith(AndroidJUnit4.class)
-public class AdaptiveAuthenticationServiceTest {
+public class AuthenticationPolicyServiceTest {
@Rule
public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
@@ -81,7 +81,7 @@ public class AdaptiveAuthenticationServiceTest {
private static final int REASON_UNKNOWN = 0; // BiometricRequestConstants.RequestReason
private Context mContext;
- private AdaptiveAuthenticationService mAdaptiveAuthenticationService;
+ private AuthenticationPolicyService mAuthenticationPolicyService;
@Mock
LockPatternUtils mLockPatternUtils;
@@ -124,9 +124,9 @@ public class AdaptiveAuthenticationServiceTest {
LocalServices.removeServiceForTest(UserManagerInternal.class);
LocalServices.addService(UserManagerInternal.class, mUserManager);
- mAdaptiveAuthenticationService = new AdaptiveAuthenticationService(
+ mAuthenticationPolicyService = new AuthenticationPolicyService(
mContext, mLockPatternUtils);
- mAdaptiveAuthenticationService.init();
+ mAuthenticationPolicyService.init();
verify(mLockSettings).registerLockSettingsStateListener(
mLockSettingsStateListenerCaptor.capture());
@@ -318,13 +318,13 @@ public class AdaptiveAuthenticationServiceTest {
private void verifyNotLockDevice(int expectedCntFailedAttempts, int userId) {
assertEquals(expectedCntFailedAttempts,
- mAdaptiveAuthenticationService.mFailedAttemptsForUser.get(userId));
+ mAuthenticationPolicyService.mFailedAttemptsForUser.get(userId));
verify(mWindowManager, never()).lockNow();
}
private void verifyLockDevice(int userId) {
assertEquals(MAX_ALLOWED_FAILED_AUTH_ATTEMPTS,
- mAdaptiveAuthenticationService.mFailedAttemptsForUser.get(userId));
+ mAuthenticationPolicyService.mFailedAttemptsForUser.get(userId));
verify(mLockPatternUtils).requireStrongAuth(
eq(SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST), eq(userId));
// If userId is MANAGED_PROFILE_USER_ID, the StrongAuthFlag of its parent (PRIMARY_USER_ID)
diff --git a/services/tests/servicestests/src/com/android/server/security/authenticationpolicy/OWNERS b/services/tests/servicestests/src/com/android/server/security/authenticationpolicy/OWNERS
new file mode 100644
index 000000000000..4310d1a3a9db
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/security/authenticationpolicy/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/security/authenticationpolicy/OWNERS \ No newline at end of file
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 020670dc0f0a..bf61d06a80a7 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
@@ -72,6 +72,7 @@ import static android.service.notification.ZenModeConfig.ORIGIN_USER_IN_SYSTEMUI
import static android.service.notification.ZenModeConfig.ZenRule.OVERRIDE_ACTIVATE;
import static android.service.notification.ZenModeConfig.ZenRule.OVERRIDE_DEACTIVATE;
import static android.service.notification.ZenModeConfig.ZenRule.OVERRIDE_NONE;
+import static android.service.notification.ZenModeConfig.implicitRuleId;
import static android.service.notification.ZenPolicy.PEOPLE_TYPE_CONTACTS;
import static android.service.notification.ZenPolicy.PEOPLE_TYPE_NONE;
import static android.service.notification.ZenPolicy.PEOPLE_TYPE_STARRED;
@@ -201,9 +202,6 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.xmlpull.v1.XmlPullParserException;
-import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
-import platform.test.runner.parameterized.Parameters;
-
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
@@ -223,6 +221,9 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
+import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
+import platform.test.runner.parameterized.Parameters;
+
@SmallTest
@SuppressLint("GuardedBy") // It's ok for this test to access guarded methods from the service.
@RunWith(ParameterizedAndroidJunit4.class)
@@ -7067,6 +7068,50 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertThat(getZenRule(ruleId).getConditionOverride()).isEqualTo(OVERRIDE_NONE);
}
+ @Test
+ @EnableFlags({FLAG_MODES_API, FLAG_MODES_UI})
+ public void setAutomaticZenRuleState_implicitRuleManualActivation_doesNotUseOverride() {
+ mContext.getTestablePermissions().setPermission(Manifest.permission.MANAGE_NOTIFICATIONS,
+ PERMISSION_GRANTED); // So that canManageAZR succeeds.
+ mZenModeHelper.applyGlobalZenModeAsImplicitZenRule(UserHandle.CURRENT, CUSTOM_PKG_NAME,
+ CUSTOM_PKG_UID, ZEN_MODE_IMPORTANT_INTERRUPTIONS);
+ mZenModeHelper.applyGlobalZenModeAsImplicitZenRule(UserHandle.CURRENT, CUSTOM_PKG_NAME,
+ CUSTOM_PKG_UID, ZEN_MODE_OFF);
+ ZenRule implicitRule = getZenRule(implicitRuleId(CUSTOM_PKG_NAME));
+ assertThat(implicitRule.isActive()).isFalse();
+
+ mZenModeHelper.setAutomaticZenRuleState(UserHandle.CURRENT, implicitRule.id,
+ new Condition(implicitRule.conditionId, "on!", STATE_TRUE, SOURCE_USER_ACTION),
+ ORIGIN_USER_IN_SYSTEMUI, SYSTEM_UID);
+
+ implicitRule = getZenRule(implicitRuleId(CUSTOM_PKG_NAME));
+ assertThat(mZenModeHelper.getAutomaticZenRuleState(UserHandle.CURRENT, implicitRule.id))
+ .isEqualTo(STATE_TRUE);
+ assertThat(implicitRule.isActive()).isTrue();
+ assertThat(implicitRule.getConditionOverride()).isEqualTo(OVERRIDE_NONE);
+ }
+
+ @Test
+ @EnableFlags({FLAG_MODES_API, FLAG_MODES_UI})
+ public void setAutomaticZenRuleState_implicitRuleManualDeactivation_doesNotUseOverride() {
+ mContext.getTestablePermissions().setPermission(Manifest.permission.MANAGE_NOTIFICATIONS,
+ PERMISSION_GRANTED); // So that canManageAZR succeeds.
+ mZenModeHelper.applyGlobalZenModeAsImplicitZenRule(UserHandle.CURRENT, CUSTOM_PKG_NAME,
+ CUSTOM_PKG_UID, ZEN_MODE_IMPORTANT_INTERRUPTIONS);
+ ZenRule implicitRule = getZenRule(implicitRuleId(CUSTOM_PKG_NAME));
+ assertThat(implicitRule.isActive()).isTrue();
+
+ mZenModeHelper.setAutomaticZenRuleState(UserHandle.CURRENT, implicitRule.id,
+ new Condition(implicitRule.conditionId, "off!", STATE_FALSE, SOURCE_USER_ACTION),
+ ORIGIN_USER_IN_SYSTEMUI, SYSTEM_UID);
+
+ implicitRule = getZenRule(implicitRuleId(CUSTOM_PKG_NAME));
+ assertThat(mZenModeHelper.getAutomaticZenRuleState(UserHandle.CURRENT, implicitRule.id))
+ .isEqualTo(STATE_FALSE);
+ assertThat(implicitRule.isActive()).isFalse();
+ assertThat(implicitRule.getConditionOverride()).isEqualTo(OVERRIDE_NONE);
+ }
+
private ZenRule getZenRule(String ruleId) {
return checkNotNull(mZenModeHelper.mConfig.automaticRules.get(ruleId),
"Didn't find rule with id %s", ruleId);
diff --git a/services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java b/services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java
index 3c2f9616bec5..eb44daabd002 100644
--- a/services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java
+++ b/services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java
@@ -747,6 +747,23 @@ public class VibrationThreadTest {
}
@Test
+ @DisableFlags(Flags.FLAG_PRIMITIVE_COMPOSITION_ABSOLUTE_DELAY)
+ public void vibrate_singleVibratorComposedAndNoCapability_triggersHalAndReturnsUnsupported() {
+ VibrationEffect effect = VibrationEffect.startComposition()
+ .addPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 1f)
+ .compose();
+ HalVibration vibration = startThreadAndDispatcher(effect);
+ waitForCompletion();
+
+ verify(mManagerHooks).noteVibratorOn(eq(UID), eq(0L));
+ verify(mManagerHooks, never()).noteVibratorOff(eq(UID));
+ verify(mControllerCallbacks, never()).onComplete(eq(VIBRATOR_ID), eq(vibration.id));
+ verifyCallbacksTriggered(vibration, Status.IGNORED_UNSUPPORTED);
+ assertTrue(mVibratorProviders.get(VIBRATOR_ID).getEffectSegments(vibration.id).isEmpty());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_PRIMITIVE_COMPOSITION_ABSOLUTE_DELAY)
public void vibrate_singleVibratorComposedAndNoCapability_ignoresVibration() {
VibrationEffect effect = VibrationEffect.startComposition()
.addPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 1f)
@@ -887,7 +904,7 @@ public class VibrationThreadTest {
fakeVibrator.setMaxEnvelopeEffectSize(10);
fakeVibrator.setMinEnvelopeEffectControlPointDurationMillis(20);
- VibrationEffect effect = VibrationEffect.startWaveformEnvelope()
+ VibrationEffect effect = new VibrationEffect.WaveformEnvelopeBuilder()
.addControlPoint(/*amplitude=*/ 0.1f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 30)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 20)
@@ -922,12 +939,14 @@ public class VibrationThreadTest {
fakeVibrator.setMaxEnvelopeEffectSize(10);
fakeVibrator.setMinEnvelopeEffectControlPointDurationMillis(20);
- VibrationEffect effect = VibrationEffect.startWaveformEnvelope(/*initialFrequency=*/ 30)
+ VibrationEffect effect = new VibrationEffect.WaveformEnvelopeBuilder()
+ .setInitialFrequencyHz(/*initialFrequencyHz=*/ 30)
.addControlPoint(/*amplitude=*/ 0.1f, /*frequencyHz=*/ 60f, /*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.3f, /*frequencyHz=*/ 100f, /*timeMillis=*/ 30)
.addControlPoint(/*amplitude=*/ 0.4f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 20)
.addControlPoint(/*amplitude=*/ 0.0f, /*frequencyHz=*/ 120f, /*timeMillis=*/ 30)
.build();
+
HalVibration vibration = startThreadAndDispatcher(effect);
waitForCompletion();
diff --git a/services/tests/wmtests/AndroidManifest.xml b/services/tests/wmtests/AndroidManifest.xml
index 6e6b70d319ab..5f2f3ed67432 100644
--- a/services/tests/wmtests/AndroidManifest.xml
+++ b/services/tests/wmtests/AndroidManifest.xml
@@ -17,10 +17,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.frameworks.wmtests">
- <!-- Uses API introduced in P (28) -->
+ <!-- Uses API introduced in S (31). Using SDK 31+ avoids Google Play Protect popups. -->
<uses-sdk
android:minSdkVersion="1"
- android:targetSdkVersion="28" />
+ android:targetSdkVersion="31" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
diff --git a/services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java b/services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java
index e447565a55bd..2635bb306400 100644
--- a/services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java
@@ -96,53 +96,46 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
private static final String TEST_PACKAGE_1 = "com.android.frameworks.wmtests";
private static final String TEST_PACKAGE_2 = "com.test.package.two";
private static final String CAMERA_ID_1 = "camera-1";
- private static final String CAMERA_ID_2 = "camera-2";
- private CameraManager mMockCameraManager;
- private Handler mMockHandler;
private AppCompatConfiguration mAppCompatConfiguration;
private CameraManager.AvailabilityCallback mCameraAvailabilityCallback;
private CameraCompatFreeformPolicy mCameraCompatFreeformPolicy;
private ActivityRecord mActivity;
- private Task mTask;
private ActivityRefresher mActivityRefresher;
@Before
public void setUp() throws Exception {
mAppCompatConfiguration = mDisplayContent.mWmService.mAppCompatConfiguration;
spyOn(mAppCompatConfiguration);
- when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
- .thenReturn(true);
- when(mAppCompatConfiguration.isCameraCompatRefreshEnabled())
- .thenReturn(true);
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled()).thenReturn(true);
+ when(mAppCompatConfiguration.isCameraCompatRefreshEnabled()).thenReturn(true);
when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(true);
- mMockCameraManager = mock(CameraManager.class);
+ final CameraManager mockCameraManager = mock(CameraManager.class);
doAnswer(invocation -> {
mCameraAvailabilityCallback = invocation.getArgument(1);
return null;
- }).when(mMockCameraManager).registerAvailabilityCallback(
+ }).when(mockCameraManager).registerAvailabilityCallback(
any(Executor.class), any(CameraManager.AvailabilityCallback.class));
- when(mContext.getSystemService(CameraManager.class)).thenReturn(mMockCameraManager);
+ when(mContext.getSystemService(CameraManager.class)).thenReturn(mockCameraManager);
mDisplayContent.setIgnoreOrientationRequest(true);
- mMockHandler = mock(Handler.class);
+ final Handler mockHandler = mock(Handler.class);
- when(mMockHandler.postDelayed(any(Runnable.class), anyLong())).thenAnswer(
+ when(mockHandler.postDelayed(any(Runnable.class), anyLong())).thenAnswer(
invocation -> {
((Runnable) invocation.getArgument(0)).run();
return null;
});
- mActivityRefresher = new ActivityRefresher(mDisplayContent.mWmService, mMockHandler);
- CameraStateMonitor cameraStateMonitor =
- new CameraStateMonitor(mDisplayContent, mMockHandler);
- mCameraCompatFreeformPolicy =
- new CameraCompatFreeformPolicy(mDisplayContent, cameraStateMonitor,
- mActivityRefresher);
+ mActivityRefresher = new ActivityRefresher(mDisplayContent.mWmService, mockHandler);
+ final CameraStateMonitor cameraStateMonitor = new CameraStateMonitor(mDisplayContent,
+ mockHandler);
+ mCameraCompatFreeformPolicy = new CameraCompatFreeformPolicy(mDisplayContent,
+ cameraStateMonitor, mActivityRefresher);
setDisplayRotation(Surface.ROTATION_90);
mCameraCompatFreeformPolicy.start();
@@ -250,10 +243,12 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
public void testShouldApplyCameraCompatFreeformTreatment_overrideEnabled_returnsFalse() {
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
+ mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
+
assertTrue(mActivity.info
.isChangeEnabled(OVERRIDE_CAMERA_COMPAT_DISABLE_FREEFORM_WINDOWING_TREATMENT));
- assertFalse(mCameraCompatFreeformPolicy.isCameraCompatForFreeformEnabledForActivity(
- mActivity));
+ assertFalse(mCameraCompatFreeformPolicy.isTreatmentEnabledForActivity(
+ mActivity, /* checkOrientation= */ true));
}
@Test
@@ -261,8 +256,10 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
public void testShouldApplyCameraCompatFreeformTreatment_notDisabledByOverride_returnsTrue() {
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
- assertTrue(mCameraCompatFreeformPolicy.isCameraCompatForFreeformEnabledForActivity(
- mActivity));
+ mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
+
+ assertTrue(mCameraCompatFreeformPolicy.isTreatmentEnabledForActivity(
+ mActivity, /* checkOrientation= */ true));
}
@Test
@@ -406,7 +403,7 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
private void configureActivityAndDisplay(@ScreenOrientation int activityOrientation,
@Orientation int naturalOrientation, @WindowingMode int windowingMode) {
- mTask = new TaskBuilder(mSupervisor)
+ final Task task = new TaskBuilder(mSupervisor)
.setDisplay(mDisplayContent)
.setWindowingMode(windowingMode)
.build();
@@ -416,7 +413,7 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
.setComponent(ComponentName.createRelative(mContext,
com.android.server.wm.CameraCompatFreeformPolicyTests.class.getName()))
.setScreenOrientation(activityOrientation)
- .setTask(mTask)
+ .setTask(task)
.build();
spyOn(mActivity.mAppCompatController.getAppCompatCameraOverrides());
@@ -429,13 +426,11 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
}
private void assertInCameraCompatMode(@CameraCompatTaskInfo.FreeformCameraCompatMode int mode) {
- assertEquals(mode, mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .getFreeformCameraCompatMode());
+ assertEquals(mode, mCameraCompatFreeformPolicy.getCameraCompatMode(mActivity));
}
private void assertNotInCameraCompatMode() {
- assertEquals(CAMERA_COMPAT_FREEFORM_NONE, mActivity.mAppCompatController
- .getAppCompatCameraOverrides().getFreeformCameraCompatMode());
+ assertInCameraCompatMode(CAMERA_COMPAT_FREEFORM_NONE);
}
private void assertActivityRefreshRequested(boolean refreshRequested) throws Exception {
@@ -471,7 +466,8 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
private Configuration createConfiguration(boolean letterbox) {
final Configuration configuration = new Configuration();
- Rect bounds = letterbox ? new Rect(300, 0, 700, 600) : new Rect(0, 0, 1000, 600);
+ Rect bounds = letterbox ? new Rect(/*left*/ 300, /*top*/ 0, /*right*/ 700, /*bottom*/ 600)
+ : new Rect(/*left*/ 0, /*top*/ 0, /*right*/ 1000, /*bottom*/ 600);
configuration.windowConfiguration.setAppBounds(bounds);
return configuration;
}
diff --git a/telephony/java/android/telephony/CellularIdentifierDisclosure.aidl b/telephony/java/android/telephony/CellularIdentifierDisclosure.aidl
new file mode 100644
index 000000000000..1e41d6e2cc31
--- /dev/null
+++ b/telephony/java/android/telephony/CellularIdentifierDisclosure.aidl
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+
+/** @hide */
+package android.telephony;
+
+parcelable CellularIdentifierDisclosure;
diff --git a/telephony/java/android/telephony/CellularIdentifierDisclosure.java b/telephony/java/android/telephony/CellularIdentifierDisclosure.java
index 7b2db6d59819..0b6a70feac9d 100644
--- a/telephony/java/android/telephony/CellularIdentifierDisclosure.java
+++ b/telephony/java/android/telephony/CellularIdentifierDisclosure.java
@@ -16,11 +16,16 @@
package android.telephony;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
+import com.android.internal.telephony.flags.Flags;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
@@ -31,16 +36,88 @@ import java.util.Objects;
*
* @hide
*/
+@SystemApi
+@FlaggedApi(Flags.FLAG_CELLULAR_IDENTIFIER_DISCLOSURE_INDICATIONS)
public final class CellularIdentifierDisclosure implements Parcelable {
private static final String TAG = "CellularIdentifierDisclosure";
+ /* Non-access stratum protocol messages */
+ /** Unknown */
+ public static final int NAS_PROTOCOL_MESSAGE_UNKNOWN = 0;
+ /** ATTACH REQUESTS. Sample reference: TS 24.301 8.2.4 Applies to 2g, 3g, and 4g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST = 1;
+ /** IDENTITY RESPONSE. Sample Reference: TS 24.301 8.2.19.
+ * Applies to 2g, 3g, 4g, and 5g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE = 2;
+ /** DETACH_REQUEST. Sample Reference: TS 24.301 8.2.11. Applies to 2g, 3g, and 4g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_DETACH_REQUEST = 3;
+ /** TRACKING AREA UPDATE (TAU) REQUEST. Sample Reference: 3GPP TS 24.301 8.2.29.
+ * Note: that per the spec, only temporary IDs should be sent in the TAU Request, but since the
+ * EPS Mobile Identity field supports IMSIs, this is included as an extra safety measure to
+ * combat implementation bugs. Applies to 4g and 5g networks. */
+ public static final int NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST = 4;
+ /** LOCATION UPDATE REQUEST. Sample Reference: TS 24.008 4.4.3. Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST = 5;
+ /** AUTHENTICATION AND CIPHERING RESPONSE. Reference: 3GPP TS 24.008 4.7.7.1.
+ * Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE = 6;
+ /** REGISTRATION REQUEST. Reference: 3GPP TS 24.501 8.2.6. Applies to 5g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST = 7;
+ /** DEREGISTRATION REQUEST. Reference: 3GPP TS 24.501 8.2.12. Applies to 5g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST = 8;
+ /** CONNECTION MANAGEMENT REESTABLISHMENT REQUEST. Reference: 3GPP TS 24.008 9.2.4.
+ * Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST = 9;
+ /** CONNECTION MANAGEMENT SERVICE REQUEST. Reference: 3GPP TS 24.008 9.2.9.
+ * Applies to 2g and 3g networks */
+ public static final int NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST = 10;
+ /** IMEI DETATCH INDICATION. Reference: 3GPP TS 24.008 9.2.14.
+ * Applies to 2g and 3g networks. Used for circuit-switched detach. */
+ public static final int NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION = 11;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"NAS_PROTOCOL_MESSAGE_"}, value = {NAS_PROTOCOL_MESSAGE_UNKNOWN,
+ NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST, NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE,
+ NAS_PROTOCOL_MESSAGE_DETACH_REQUEST, NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST,
+ NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST,
+ NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE,
+ NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST, NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST,
+ NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST,
+ NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST, NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION})
+ public @interface NasProtocolMessage {
+ }
+
+ /* Cellular identifiers */
+ /** Unknown */
+ public static final int CELLULAR_IDENTIFIER_UNKNOWN = 0;
+ /** IMSI (International Mobile Subscriber Identity) */
+ public static final int CELLULAR_IDENTIFIER_IMSI = 1;
+ /** IMEI (International Mobile Equipment Identity) */
+ public static final int CELLULAR_IDENTIFIER_IMEI = 2;
+ /** 5G-specific SUCI (Subscription Concealed Identifier) */
+ public static final int CELLULAR_IDENTIFIER_SUCI = 3;
+
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"CELLULAR_IDENTIFIER_"}, value = {CELLULAR_IDENTIFIER_UNKNOWN,
+ CELLULAR_IDENTIFIER_IMSI, CELLULAR_IDENTIFIER_IMEI, CELLULAR_IDENTIFIER_SUCI})
+ public @interface CellularIdentifier {
+ }
+
private @NasProtocolMessage int mNasProtocolMessage;
private @CellularIdentifier int mCellularIdentifier;
private String mPlmn;
private boolean mIsEmergency;
+ /**
+ * Constructor for new CellularIdentifierDisclosure instances.
+ *
+ * @hide
+ */
+ @TestApi
public CellularIdentifierDisclosure(@NasProtocolMessage int nasProtocolMessage,
- @CellularIdentifier int cellularIdentifier, String plmn, boolean isEmergency) {
+ @CellularIdentifier int cellularIdentifier, @NonNull String plmn, boolean isEmergency) {
mNasProtocolMessage = nasProtocolMessage;
mCellularIdentifier = cellularIdentifier;
mPlmn = plmn;
@@ -51,18 +128,30 @@ public final class CellularIdentifierDisclosure implements Parcelable {
readFromParcel(in);
}
+ /**
+ * @return the NAS protocol message associated with the disclosed identifier.
+ */
public @NasProtocolMessage int getNasProtocolMessage() {
return mNasProtocolMessage;
}
+ /**
+ * @return the identifier disclosed.
+ */
public @CellularIdentifier int getCellularIdentifier() {
return mCellularIdentifier;
}
- public String getPlmn() {
+ /**
+ * @return the PLMN associated with the disclosure.
+ */
+ @NonNull public String getPlmn() {
return mPlmn;
}
+ /**
+ * @return if the disclosure is associated with an emergency call.
+ */
public boolean isEmergency() {
return mIsEmergency;
}
@@ -73,14 +162,14 @@ public final class CellularIdentifierDisclosure implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
+ public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeInt(mNasProtocolMessage);
out.writeInt(mCellularIdentifier);
out.writeBoolean(mIsEmergency);
out.writeString8(mPlmn);
}
- public static final Parcelable.Creator<CellularIdentifierDisclosure> CREATOR =
+ public static final @NonNull Parcelable.Creator<CellularIdentifierDisclosure> CREATOR =
new Parcelable.Creator<CellularIdentifierDisclosure>() {
public CellularIdentifierDisclosure createFromParcel(Parcel in) {
return new CellularIdentifierDisclosure(in);
@@ -120,42 +209,4 @@ public final class CellularIdentifierDisclosure implements Parcelable {
mIsEmergency = in.readBoolean();
mPlmn = in.readString8();
}
-
- public static final int NAS_PROTOCOL_MESSAGE_UNKNOWN = 0;
- public static final int NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST = 1;
- public static final int NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE = 2;
- public static final int NAS_PROTOCOL_MESSAGE_DETACH_REQUEST = 3;
- public static final int NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST = 4;
- public static final int NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST = 5;
- public static final int NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE = 6;
- public static final int NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST = 7;
- public static final int NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST = 8;
- public static final int NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST = 9;
- public static final int NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST = 10;
- public static final int NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION = 11;
-
- /** @hide */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = {"NAS_PROTOCOL_MESSAGE_"}, value = {NAS_PROTOCOL_MESSAGE_UNKNOWN,
- NAS_PROTOCOL_MESSAGE_ATTACH_REQUEST, NAS_PROTOCOL_MESSAGE_IDENTITY_RESPONSE,
- NAS_PROTOCOL_MESSAGE_DETACH_REQUEST, NAS_PROTOCOL_MESSAGE_TRACKING_AREA_UPDATE_REQUEST,
- NAS_PROTOCOL_MESSAGE_LOCATION_UPDATE_REQUEST,
- NAS_PROTOCOL_MESSAGE_AUTHENTICATION_AND_CIPHERING_RESPONSE,
- NAS_PROTOCOL_MESSAGE_REGISTRATION_REQUEST, NAS_PROTOCOL_MESSAGE_DEREGISTRATION_REQUEST,
- NAS_PROTOCOL_MESSAGE_CM_REESTABLISHMENT_REQUEST,
- NAS_PROTOCOL_MESSAGE_CM_SERVICE_REQUEST, NAS_PROTOCOL_MESSAGE_IMSI_DETACH_INDICATION})
- public @interface NasProtocolMessage {
- }
-
- public static final int CELLULAR_IDENTIFIER_UNKNOWN = 0;
- public static final int CELLULAR_IDENTIFIER_IMSI = 1;
- public static final int CELLULAR_IDENTIFIER_IMEI = 2;
- public static final int CELLULAR_IDENTIFIER_SUCI = 3;
-
- /** @hide */
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(prefix = {"CELLULAR_IDENTIFIER_"}, value = {CELLULAR_IDENTIFIER_UNKNOWN,
- CELLULAR_IDENTIFIER_IMSI, CELLULAR_IDENTIFIER_IMEI, CELLULAR_IDENTIFIER_SUCI})
- public @interface CellularIdentifier {
- }
}
diff --git a/telephony/java/android/telephony/SecurityAlgorithmUpdate.aidl b/telephony/java/android/telephony/SecurityAlgorithmUpdate.aidl
new file mode 100644
index 000000000000..bee30bd43df9
--- /dev/null
+++ b/telephony/java/android/telephony/SecurityAlgorithmUpdate.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+/** @hide */
+package android.telephony;
+
+parcelable SecurityAlgorithmUpdate;
diff --git a/telephony/java/android/telephony/SecurityAlgorithmUpdate.java b/telephony/java/android/telephony/SecurityAlgorithmUpdate.java
index 57209eb68de8..d635b555276b 100644
--- a/telephony/java/android/telephony/SecurityAlgorithmUpdate.java
+++ b/telephony/java/android/telephony/SecurityAlgorithmUpdate.java
@@ -16,11 +16,16 @@
package android.telephony;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
+import com.android.internal.telephony.flags.Flags;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
@@ -31,112 +36,42 @@ import java.util.Objects;
*
* @hide
*/
+@SystemApi
+@FlaggedApi(Flags.FLAG_SECURITY_ALGORITHMS_UPDATE_INDICATIONS)
public final class SecurityAlgorithmUpdate implements Parcelable {
private static final String TAG = "SecurityAlgorithmUpdate";
- private @ConnectionEvent int mConnectionEvent;
- private @SecurityAlgorithm int mEncryption;
- private @SecurityAlgorithm int mIntegrity;
- private boolean mIsUnprotectedEmergency;
-
- public SecurityAlgorithmUpdate(@ConnectionEvent int connectionEvent,
- @SecurityAlgorithm int encryption, @SecurityAlgorithm int integrity,
- boolean isUnprotectedEmergency) {
- mConnectionEvent = connectionEvent;
- mEncryption = encryption;
- mIntegrity = integrity;
- mIsUnprotectedEmergency = isUnprotectedEmergency;
- }
-
- private SecurityAlgorithmUpdate(Parcel in) {
- readFromParcel(in);
- }
-
- public @ConnectionEvent int getConnectionEvent() {
- return mConnectionEvent;
- }
-
- public @SecurityAlgorithm int getEncryption() {
- return mEncryption;
- }
-
- public @SecurityAlgorithm int getIntegrity() {
- return mIntegrity;
- }
-
- public boolean isUnprotectedEmergency() {
- return mIsUnprotectedEmergency;
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeInt(mConnectionEvent);
- out.writeInt(mEncryption);
- out.writeInt(mIntegrity);
- out.writeBoolean(mIsUnprotectedEmergency);
- }
-
- private void readFromParcel(@NonNull Parcel in) {
- mConnectionEvent = in.readInt();
- mEncryption = in.readInt();
- mIntegrity = in.readInt();
- mIsUnprotectedEmergency = in.readBoolean();
- }
-
- public static final Parcelable.Creator<SecurityAlgorithmUpdate> CREATOR =
- new Parcelable.Creator<SecurityAlgorithmUpdate>() {
- public SecurityAlgorithmUpdate createFromParcel(Parcel in) {
- return new SecurityAlgorithmUpdate(in);
- }
-
- public SecurityAlgorithmUpdate[] newArray(int size) {
- return new SecurityAlgorithmUpdate[size];
- }
- };
-
- @Override
- public String toString() {
- return TAG + ":{ mConnectionEvent = " + mConnectionEvent + " mEncryption = " + mEncryption
- + " mIntegrity = " + mIntegrity + " mIsUnprotectedEmergency = "
- + mIsUnprotectedEmergency;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof SecurityAlgorithmUpdate)) return false;
- SecurityAlgorithmUpdate that = (SecurityAlgorithmUpdate) o;
- return mConnectionEvent == that.mConnectionEvent
- && mEncryption == that.mEncryption
- && mIntegrity == that.mIntegrity
- && mIsUnprotectedEmergency == that.mIsUnprotectedEmergency;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(mConnectionEvent, mEncryption, mIntegrity, mIsUnprotectedEmergency);
- }
-
+ /** 2G GSM circuit switched */
public static final int CONNECTION_EVENT_CS_SIGNALLING_GSM = 0;
+ /** 2G GPRS packet services */
public static final int CONNECTION_EVENT_PS_SIGNALLING_GPRS = 1;
+ /** 3G circuit switched*/
public static final int CONNECTION_EVENT_CS_SIGNALLING_3G = 2;
+ /** 3G packet switched*/
public static final int CONNECTION_EVENT_PS_SIGNALLING_3G = 3;
+ /** 4G Non-access stratum */
public static final int CONNECTION_EVENT_NAS_SIGNALLING_LTE = 4;
+ /** 4G Access-stratum */
public static final int CONNECTION_EVENT_AS_SIGNALLING_LTE = 5;
+ /** VOLTE SIP */
public static final int CONNECTION_EVENT_VOLTE_SIP = 6;
+ /** VOLTE SIP SOS (emergency) */
public static final int CONNECTION_EVENT_VOLTE_SIP_SOS = 7;
+ /** VOLTE RTP */
public static final int CONNECTION_EVENT_VOLTE_RTP = 8;
+ /** VOLTE RTP SOS (emergency) */
public static final int CONNECTION_EVENT_VOLTE_RTP_SOS = 9;
+ /** 5G Non-access stratum */
public static final int CONNECTION_EVENT_NAS_SIGNALLING_5G = 10;
+ /** 5G Access stratum */
public static final int CONNECTION_EVENT_AS_SIGNALLING_5G = 11;
+ /** VoNR SIP */
public static final int CONNECTION_EVENT_VONR_SIP = 12;
+ /** VoNR SIP SOS (emergency) */
public static final int CONNECTION_EVENT_VONR_SIP_SOS = 13;
+ /** VoNR RTP */
public static final int CONNECTION_EVENT_VONR_RTP = 14;
+ /** VoNR RTP SOS (emergency) */
public static final int CONNECTION_EVENT_VONR_RTP_SOS = 15;
/** @hide */
@@ -153,48 +88,101 @@ public final class SecurityAlgorithmUpdate implements Parcelable {
public @interface ConnectionEvent {
}
+ /* GSM CS services, see 3GPP TS 43.020 for details */
+ /** A5/0 - the null cipher */
public static final int SECURITY_ALGORITHM_A50 = 0;
+ /** A5/1 cipher */
public static final int SECURITY_ALGORITHM_A51 = 1;
+ /** A5/2 cipher */
public static final int SECURITY_ALGORITHM_A52 = 2;
+ /** A5/3 cipher */
public static final int SECURITY_ALGORITHM_A53 = 3;
+ /** A5/4 cipher */
public static final int SECURITY_ALGORITHM_A54 = 4;
+ /* GPRS PS services (3GPP TS 43.020) */
+ /** GEA0 - null cipher */
public static final int SECURITY_ALGORITHM_GEA0 = 14;
+ /** GEA1 cipher */
public static final int SECURITY_ALGORITHM_GEA1 = 15;
+ /** GEA2 cipher */
public static final int SECURITY_ALGORITHM_GEA2 = 16;
+ /** GEA3 cipher */
public static final int SECURITY_ALGORITHM_GEA3 = 17;
+ /** GEA4 cipher */
public static final int SECURITY_ALGORITHM_GEA4 = 18;
+ /** GEA5 cipher */
public static final int SECURITY_ALGORITHM_GEA5 = 19;
+ /* 3G PS/CS services (3GPP TS 33.102) */
+ /** UEA0 - null cipher */
public static final int SECURITY_ALGORITHM_UEA0 = 29;
+ /** UEA1 cipher */
public static final int SECURITY_ALGORITHM_UEA1 = 30;
+ /** UEA2 cipher */
public static final int SECURITY_ALGORITHM_UEA2 = 31;
+ /* 4G PS services & 5G NSA (3GPP TS 33.401) */
+ /** EEA0 - null cipher */
public static final int SECURITY_ALGORITHM_EEA0 = 41;
+ /** EEA1 */
public static final int SECURITY_ALGORITHM_EEA1 = 42;
+ /** EEA2 */
public static final int SECURITY_ALGORITHM_EEA2 = 43;
+ /** EEA3 */
public static final int SECURITY_ALGORITHM_EEA3 = 44;
+ /* 5G PS services (3GPP TS 33.401 for 5G NSA and 3GPP TS 33.501 for 5G SA) */
+ /** NEA0 - the null cipher */
public static final int SECURITY_ALGORITHM_NEA0 = 55;
+ /** NEA1 */
public static final int SECURITY_ALGORITHM_NEA1 = 56;
+ /** NEA2 */
public static final int SECURITY_ALGORITHM_NEA2 = 57;
+ /** NEA3 */
public static final int SECURITY_ALGORITHM_NEA3 = 58;
+ /* IMS and SIP layer security (See 3GPP TS 33.203) */
+ /** No IPsec config */
public static final int SECURITY_ALGORITHM_SIP_NO_IPSEC_CONFIG = 66;
+ /** No IMS security, recommended to use SIP_NO_IPSEC_CONFIG and SIP_NULL instead */
public static final int SECURITY_ALGORITHM_IMS_NULL = 67;
+ /* IPSEC is present */
+ /** SIP security is not enabled */
public static final int SECURITY_ALGORITHM_SIP_NULL = 68;
+ /** AES GCM mode */
public static final int SECURITY_ALGORITHM_AES_GCM = 69;
+ /** AES GMAC mode */
public static final int SECURITY_ALGORITHM_AES_GMAC = 70;
+ /** AES CBC mode */
public static final int SECURITY_ALGORITHM_AES_CBC = 71;
+ /** DES EDE3 CBC mode */
public static final int SECURITY_ALGORITHM_DES_EDE3_CBC = 72;
+ /** AES EDE3 CBC mode */
public static final int SECURITY_ALGORITHM_AES_EDE3_CBC = 73;
+ /** HMAC SHA1 96 */
public static final int SECURITY_ALGORITHM_HMAC_SHA1_96 = 74;
+ /** HMAC MD5 96 */
public static final int SECURITY_ALGORITHM_HMAC_MD5_96 = 75;
+ /* RTP and SRTP (see 3GPP TS 33.328) */
+ /** RTP only, SRTP is not being used */
public static final int SECURITY_ALGORITHM_RTP = 85;
+ /* When SRTP is available and used */
+ /** SRTP with null ciphering */
public static final int SECURITY_ALGORITHM_SRTP_NULL = 86;
+ /** SRTP with AES counter mode */
public static final int SECURITY_ALGORITHM_SRTP_AES_COUNTER = 87;
+ /** SRTP with AES F8 mode */
public static final int SECURITY_ALGORITHM_SRTP_AES_F8 = 88;
+ /** SRTP with HMAC SHA1 */
public static final int SECURITY_ALGORITHM_SRTP_HMAC_SHA1 = 89;
+ /* Ciphers for ePDG (3GPP TS 33.402) */
+ /** ePDG encryption - AES GCM mode */
public static final int SECURITY_ALGORITHM_ENCR_AES_GCM_16 = 99;
+ /** ePDG encryption - AES GCM CBC mode */
public static final int SECURITY_ALGORITHM_ENCR_AES_CBC = 100;
+ /** ePDG authentication - HMAC SHA1 256 128 */
public static final int SECURITY_ALGORITHM_AUTH_HMAC_SHA2_256_128 = 101;
+ /** Unknown */
public static final int SECURITY_ALGORITHM_UNKNOWN = 113;
+ /** Other */
public static final int SECURITY_ALGORITHM_OTHER = 114;
+ /** Proprietary algorithms */
public static final int SECURITY_ALGORITHM_ORYX = 124;
/** @hide */
@@ -220,4 +208,109 @@ public final class SecurityAlgorithmUpdate implements Parcelable {
public @interface SecurityAlgorithm {
}
+ private @ConnectionEvent int mConnectionEvent;
+ private @SecurityAlgorithm int mEncryption;
+ private @SecurityAlgorithm int mIntegrity;
+ private boolean mIsUnprotectedEmergency;
+
+ /**
+ * Constructor for new SecurityAlgorithmUpdate instances.
+ *
+ * @hide
+ */
+ @TestApi
+ public SecurityAlgorithmUpdate(@ConnectionEvent int connectionEvent,
+ @SecurityAlgorithm int encryption, @SecurityAlgorithm int integrity,
+ boolean isUnprotectedEmergency) {
+ mConnectionEvent = connectionEvent;
+ mEncryption = encryption;
+ mIntegrity = integrity;
+ mIsUnprotectedEmergency = isUnprotectedEmergency;
+ }
+
+ private SecurityAlgorithmUpdate(Parcel in) {
+ readFromParcel(in);
+ }
+
+ /**
+ * @return the connection event.
+ */
+ public @ConnectionEvent int getConnectionEvent() {
+ return mConnectionEvent;
+ }
+
+ /**
+ * @return the encryption algorithm.
+ */
+ public @SecurityAlgorithm int getEncryption() {
+ return mEncryption;
+ }
+
+ /**
+ * @return the integrity algorithm.
+ */
+ public @SecurityAlgorithm int getIntegrity() {
+ return mIntegrity;
+ }
+
+ /**
+ * @return if the security algorithm update is associated with an unprotected emergency call.
+ */
+ public boolean isUnprotectedEmergency() {
+ return mIsUnprotectedEmergency;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(@NonNull Parcel out, int flags) {
+ out.writeInt(mConnectionEvent);
+ out.writeInt(mEncryption);
+ out.writeInt(mIntegrity);
+ out.writeBoolean(mIsUnprotectedEmergency);
+ }
+
+ private void readFromParcel(@NonNull Parcel in) {
+ mConnectionEvent = in.readInt();
+ mEncryption = in.readInt();
+ mIntegrity = in.readInt();
+ mIsUnprotectedEmergency = in.readBoolean();
+ }
+
+ public static final @NonNull Parcelable.Creator<SecurityAlgorithmUpdate> CREATOR =
+ new Parcelable.Creator<SecurityAlgorithmUpdate>() {
+ public SecurityAlgorithmUpdate createFromParcel(Parcel in) {
+ return new SecurityAlgorithmUpdate(in);
+ }
+
+ public SecurityAlgorithmUpdate[] newArray(int size) {
+ return new SecurityAlgorithmUpdate[size];
+ }
+ };
+
+ @Override
+ public String toString() {
+ return TAG + ":{ mConnectionEvent = " + mConnectionEvent + " mEncryption = " + mEncryption
+ + " mIntegrity = " + mIntegrity + " mIsUnprotectedEmergency = "
+ + mIsUnprotectedEmergency;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof SecurityAlgorithmUpdate)) return false;
+ SecurityAlgorithmUpdate that = (SecurityAlgorithmUpdate) o;
+ return mConnectionEvent == that.mConnectionEvent
+ && mEncryption == that.mEncryption
+ && mIntegrity == that.mIntegrity
+ && mIsUnprotectedEmergency == that.mIsUnprotectedEmergency;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mConnectionEvent, mEncryption, mIntegrity, mIsUnprotectedEmergency);
+ }
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java
index 887b79883710..23203ed65e9a 100644
--- a/telephony/java/android/telephony/satellite/SatelliteManager.java
+++ b/telephony/java/android/telephony/satellite/SatelliteManager.java
@@ -281,6 +281,14 @@ public final class SatelliteManager {
"satellite_access_configuration";
/**
+ * Bundle key to get the response from
+ * {@link #requestSelectedNbIotSatelliteSubscriptionId(Executor, OutcomeReceiver)}.
+ * @hide
+ */
+ public static final String KEY_SELECTED_NB_IOT_SATELLITE_SUBSCRIPTION_ID =
+ "selected_nb_iot_satellite_subscription_id";
+
+ /**
* The request was successfully processed.
* @hide
*/
@@ -531,6 +539,12 @@ public final class SatelliteManager {
@FlaggedApi(Flags.FLAG_SATELLITE_SYSTEM_APIS)
public static final int SATELLITE_RESULT_ENABLE_IN_PROGRESS = 29;
+ /**
+ * There is no valid satellite subscription selected.
+ * @hide
+ */
+ public static final int SATELLITE_RESULT_NO_VALID_SATELLITE_SUBSCRIPTION = 30;
+
/** @hide */
@IntDef(prefix = {"SATELLITE_RESULT_"}, value = {
SATELLITE_RESULT_SUCCESS,
@@ -562,7 +576,8 @@ public final class SatelliteManager {
SATELLITE_RESULT_LOCATION_NOT_AVAILABLE,
SATELLITE_RESULT_EMERGENCY_CALL_IN_PROGRESS,
SATELLITE_RESULT_DISABLE_IN_PROGRESS,
- SATELLITE_RESULT_ENABLE_IN_PROGRESS
+ SATELLITE_RESULT_ENABLE_IN_PROGRESS,
+ SATELLITE_RESULT_NO_VALID_SATELLITE_SUBSCRIPTION
})
@Retention(RetentionPolicy.SOURCE)
public @interface SatelliteResult {}
@@ -2464,6 +2479,68 @@ public final class SatelliteManager {
}
/**
+ * Request to get the currently selected satellite subscription id as an {@link Integer}.
+ *
+ * @param executor The executor on which the callback will be called.
+ * @param callback The callback object to which the result will be delivered.
+ * If the request is successful, {@link OutcomeReceiver#onResult(Object)}
+ * will return the time after which the satellite will be visible.
+ * If the request is not successful, {@link OutcomeReceiver#onError(Throwable)}
+ * will return a {@link SatelliteException} with the {@link SatelliteResult}.
+ *
+ * @throws SecurityException if the caller doesn't have required permission.
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.SATELLITE_COMMUNICATION)
+ public void requestSelectedNbIotSatelliteSubscriptionId(
+ @NonNull @CallbackExecutor Executor executor,
+ @NonNull OutcomeReceiver<Integer, SatelliteException> callback) {
+ Objects.requireNonNull(executor);
+ Objects.requireNonNull(callback);
+
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ ResultReceiver receiver = new ResultReceiver(null) {
+ @Override
+ protected void onReceiveResult(int resultCode, Bundle resultData) {
+ if (resultCode == SATELLITE_RESULT_SUCCESS) {
+ if (resultData
+ .containsKey(KEY_SELECTED_NB_IOT_SATELLITE_SUBSCRIPTION_ID)) {
+ int selectedSatelliteSubscriptionId =
+ resultData
+ .getInt(KEY_SELECTED_NB_IOT_SATELLITE_SUBSCRIPTION_ID);
+ executor.execute(() -> Binder.withCleanCallingIdentity(() ->
+ callback.onResult(selectedSatelliteSubscriptionId)));
+ } else {
+ loge(
+ "KEY_SELECTED_NB_IOT_SATELLITE_SUBSCRIPTION_ID does not exist."
+ );
+ executor.execute(() -> Binder.withCleanCallingIdentity(() ->
+ callback.onError(new SatelliteException(
+ SATELLITE_RESULT_REQUEST_FAILED))));
+ }
+ } else {
+ executor.execute(() -> Binder.withCleanCallingIdentity(() ->
+ callback.onError(new SatelliteException(resultCode))));
+ }
+ }
+ };
+ telephony.requestSelectedNbIotSatelliteSubscriptionId(receiver);
+ } else {
+ loge("requestSelectedNbIotSatelliteSubscriptionId() invalid telephony");
+ executor.execute(() -> Binder.withCleanCallingIdentity(() -> callback.onError(
+ new SatelliteException(SATELLITE_RESULT_ILLEGAL_STATE))));
+ }
+ } catch (RemoteException ex) {
+ loge("requestSelectedNbIotSatelliteSubscriptionId() RemoteException: " + ex);
+ executor.execute(() -> Binder.withCleanCallingIdentity(() -> callback.onError(
+ new SatelliteException(SATELLITE_RESULT_ILLEGAL_STATE))));
+ }
+ }
+
+ /**
* Inform whether the device is aligned with the satellite in both real and demo mode.
*
* In demo mode, framework will send datagram to modem only when device is aligned with
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index a58427318b55..d22e9fa20101 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -3018,6 +3018,17 @@ interface ITelephony {
+ "android.Manifest.permission.SATELLITE_COMMUNICATION)")
void requestTimeForNextSatelliteVisibility(in ResultReceiver receiver);
+
+ /**
+ * Request to get the currently selected satellite subscription id.
+ *
+ * @param receiver Result receiver to get the error code of the request and the currently
+ * selected satellite subscription id.
+ */
+ @JavaPassthrough(annotation="@android.annotation.RequiresPermission("
+ + "android.Manifest.permission.SATELLITE_COMMUNICATION)")
+ void requestSelectedNbIotSatelliteSubscriptionId(in ResultReceiver receiver);
+
/**
* Inform whether the device is aligned with the satellite in both real and demo mode.
*
diff --git a/test-mock/src/android/test/mock/MockContentResolver.java b/test-mock/src/android/test/mock/MockContentResolver.java
index 8f4bcccb0cba..af6ee3d0f71b 100644
--- a/test-mock/src/android/test/mock/MockContentResolver.java
+++ b/test-mock/src/android/test/mock/MockContentResolver.java
@@ -24,6 +24,7 @@ import android.content.Context;
import android.content.IContentProvider;
import android.database.ContentObserver;
import android.net.Uri;
+import android.util.Log;
import java.util.Collection;
import java.util.HashMap;
@@ -53,6 +54,7 @@ import java.util.Map;
* </div>
*/
public class MockContentResolver extends ContentResolver {
+ private static final String TAG = "MockContentResolver";
Map<String, ContentProvider> mProviders;
/**
@@ -105,6 +107,7 @@ public class MockContentResolver extends ContentResolver {
if (provider != null) {
return provider.getIContentProvider();
} else {
+ Log.w(TAG, "Provider does not exist: " + name);
return null;
}
}
diff --git a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt
index 2c998c4217ac..d2c9eb30e2fc 100644
--- a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt
+++ b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt
@@ -155,14 +155,16 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
?: error("Unable to find resource $MINIMIZE_BUTTON_VIEW\n")
}
- fun minimizeDesktopApp(wmHelper: WindowManagerStateHelper, device: UiDevice) {
+ fun minimizeDesktopApp(wmHelper: WindowManagerStateHelper, device: UiDevice, isPip: Boolean = false) {
val caption = getCaptionForTheApp(wmHelper, device)
val minimizeButton = getMinimizeButtonForTheApp(caption)
minimizeButton.click()
wmHelper
.StateSyncBuilder()
.withAppTransitionIdle()
- .withWindowSurfaceDisappeared(innerHelper)
+ .apply {
+ if (isPip) withPipShown() else withWindowSurfaceDisappeared(innerHelper)
+ }
.waitForAndVerify()
}
diff --git a/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt b/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt
index d1f866843be6..34350ab98046 100644
--- a/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt
+++ b/tests/Input/src/com/android/server/input/KeyGestureControllerTests.kt
@@ -676,47 +676,47 @@ class KeyGestureControllerTests {
intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE)
),
TestData(
- "ALT + [ -> Resizes a task to fit the left half of the screen",
+ "META + [ -> Resizes a task to fit the left half of the screen",
intArrayOf(
- KeyEvent.KEYCODE_ALT_LEFT,
+ KeyEvent.KEYCODE_META_LEFT,
KeyEvent.KEYCODE_LEFT_BRACKET
),
KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_LEFT_FREEFORM_WINDOW,
intArrayOf(KeyEvent.KEYCODE_LEFT_BRACKET),
- KeyEvent.META_ALT_ON,
+ KeyEvent.META_META_ON,
intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE)
),
TestData(
- "ALT + ] -> Resizes a task to fit the right half of the screen",
+ "META + ] -> Resizes a task to fit the right half of the screen",
intArrayOf(
- KeyEvent.KEYCODE_ALT_LEFT,
+ KeyEvent.KEYCODE_META_LEFT,
KeyEvent.KEYCODE_RIGHT_BRACKET
),
KeyGestureEvent.KEY_GESTURE_TYPE_SNAP_RIGHT_FREEFORM_WINDOW,
intArrayOf(KeyEvent.KEYCODE_RIGHT_BRACKET),
- KeyEvent.META_ALT_ON,
+ KeyEvent.META_META_ON,
intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE)
),
TestData(
- "ALT + '=' -> Maximizes a task to fit the screen",
+ "META + '=' -> Toggles maximization of a task to maximized and restore its bounds",
intArrayOf(
- KeyEvent.KEYCODE_ALT_LEFT,
+ KeyEvent.KEYCODE_META_LEFT,
KeyEvent.KEYCODE_EQUALS
),
- KeyGestureEvent.KEY_GESTURE_TYPE_MAXIMIZE_FREEFORM_WINDOW,
+ KeyGestureEvent.KEY_GESTURE_TYPE_TOGGLE_MAXIMIZE_FREEFORM_WINDOW,
intArrayOf(KeyEvent.KEYCODE_EQUALS),
- KeyEvent.META_ALT_ON,
+ KeyEvent.META_META_ON,
intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE)
),
TestData(
- "ALT + '-' -> Restores a task size to its previous bounds",
+ "META + '-' -> Minimizes a freeform task",
intArrayOf(
- KeyEvent.KEYCODE_ALT_LEFT,
+ KeyEvent.KEYCODE_META_LEFT,
KeyEvent.KEYCODE_MINUS
),
- KeyGestureEvent.KEY_GESTURE_TYPE_RESTORE_FREEFORM_WINDOW_SIZE,
+ KeyGestureEvent.KEY_GESTURE_TYPE_MINIMIZE_FREEFORM_WINDOW,
intArrayOf(KeyEvent.KEYCODE_MINUS),
- KeyEvent.META_ALT_ON,
+ KeyEvent.META_META_ON,
intArrayOf(KeyGestureEvent.ACTION_GESTURE_COMPLETE)
),
TestData(